blob: 5b742b884dc7484ffa53e878025e9ce6ac51d5f2 [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
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
812with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600813with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200819with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_threads
833with_thread
834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
838with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700840with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_fpectl
842with_libm
843with_libc
844enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000845with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800846with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000847'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 ac_precious_vars='build_alias
849host_alias
850target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100851MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100857CPP
858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
INADA Naokia8f8d5b2017-06-29 00:31:53 +0900899runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001152 -runstatedir | --runstatedir | --runstatedi | --runstated \
1153 | --runstate | --runstat | --runsta | --runst | --runs \
1154 | --run | --ru | --r)
1155 ac_prev=runstatedir ;;
1156 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1157 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1158 | --run=* | --ru=* | --r=*)
1159 runstatedir=$ac_optarg ;;
1160
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1162 ac_prev=sbindir ;;
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1164 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1170 | --sha | --sh)
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1175 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 -site | --site | --sit)
1179 ac_prev=site ;;
1180 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1184 ac_prev=srcdir ;;
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1201 verbose=yes ;;
1202
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
1206 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1214 *"
1215"with_$ac_useropt"
1216"*) ;;
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1219 esac
1220 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1230 *"
1231"with_$ac_useropt"
1232"*) ;;
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1235 esac
1236 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 --x)
1239 # Obsolete; use --with-x.
1240 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 *=*)
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 export $ac_envvar ;;
1269
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001270 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ;;
1277
1278 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279done
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
1285
Matthias Kloseb9621712010-04-24 17:59:49 +00001286if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1288 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1291 esac
1292fi
1293
1294# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001298 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001301 # Remove trailing slashes.
1302 case $ac_val in
1303 */ )
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1306 esac
1307 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001313done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# There might be people who depend on the old broken behavior: `$host'
1316# used to hold the argument of --host etc.
1317# FIXME: To remove some day.
1318build=$build_alias
1319host=$host_alias
1320target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322# FIXME: To remove some day.
1323if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 elif test "x$build_alias" != "x$host_alias"; then
1327 cross_compiling=yes
1328 fi
1329fi
1330
1331ac_tool_prefix=
1332test -n "$host_alias" && ac_tool_prefix=$host_alias-
1333
1334test "$silent" = yes && exec 6>/dev/null
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338ac_ls_di=`ls -di .` &&
1339ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001340 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343
1344
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345# Find the source files, if location was not specified.
1346if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)[^/].*/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\/\)$/{
1364 s//\1/
1365 q
1366 }
1367 /^X\(\/\).*/{
1368 s//\1/
1369 q
1370 }
1371 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374 srcdir=..
1375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001376else
1377 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001383ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1384ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001386 pwd)`
1387# When building in place, set srcdir=.
1388if test "$ac_abs_confdir" = "$ac_pwd"; then
1389 srcdir=.
1390fi
1391# Remove unnecessary trailing slashes from srcdir.
1392# Double slashes in file names in object file debugging info
1393# mess up M-x gdb in Emacs.
1394case $srcdir in
1395*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1396esac
1397for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1402done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001403
Martin v. Löwis11437992002-04-12 09:54:03 +00001404#
1405# Report the --help message.
1406#
1407if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1410 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001411\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412
1413Usage: $0 [OPTION]... [VAR=VALUE]...
1414
1415To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416VAR=VALUE. See below for descriptions of some of the useful variables.
1417
1418Defaults for the options are specified in brackets.
1419
1420Configuration:
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001425 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1430
Martin v. Löwis11437992002-04-12 09:54:03 +00001431Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437By default, \`make install' will install all the files in
1438\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440for instance \`--prefix=\$HOME'.
1441
1442For better control, use the options below.
1443
1444Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
INADA Naokia8f8d5b2017-06-29 00:31:53 +09001451 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 --libdir=DIR object code libraries [EPREFIX/lib]
1453 --includedir=DIR C header files [PREFIX/include]
1454 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1455 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1456 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1457 --infodir=DIR info documentation [DATAROOTDIR/info]
1458 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1459 --mandir=DIR man documentation [DATAROOTDIR/man]
1460 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1461 --htmldir=DIR html documentation [DOCDIR]
1462 --dvidir=DIR dvi documentation [DOCDIR]
1463 --pdfdir=DIR pdf documentation [DOCDIR]
1464 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466
1467 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001468
1469System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001472 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001473_ACEOF
1474fi
1475
1476if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001477 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001478 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001479 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 cat <<\_ACEOF
1481
1482Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001483 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1485 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001486 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001487 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --enable-framework[=INSTALLDIR]
1489 Build (MacOSX|Darwin) framework
1490 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001491 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001492 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1493 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001494 --enable-loadable-sqlite-extensions
1495 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --enable-ipv6 Enable ipv6 (with ipv4) support
1497 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001498 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501Optional Packages:
1502 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1503 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001504 --with-universal-archs=ARCH
1505 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001506 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001511 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001512 --with-cxx-main=<compiler>
1513 compile main() and link python executable with C++
1514 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with-suffix=.exe set executable suffix
1516 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001517 --with-assertions build with C assertions enabled
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001518 --with-lto Enable Link Time Optimization in PGO builds.
1519 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001520 --with-hash-algorithm=[fnv|siphash24]
1521 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001522 --with-address-sanitizer
1523 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001525 --with-system-expat build pyexpat module using an installed expat
1526 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001527 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001528 --with-system-libmpdec build _decimal module using an installed libmpdec
1529 library
Ned Deilyd819b932013-09-06 01:07:05 -07001530 --with-tcltk-includes='-I...'
1531 override search for Tcl and Tk include files
1532 --with-tcltk-libs='-L...'
1533 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001534 --with-dbmliborder=db1:db2:...
1535 order to check db backends for dbm. Valid value is a
1536 colon separated string with the backend names
1537 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with(out)-threads[=DIRECTORY]
1539 disable/enable thread support
1540 --with(out)-thread[=DIRECTORY]
1541 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001542 --with(out)-doc-strings disable/enable documentation strings
1543 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001544 --with(out)-c-locale-coercion
1545 disable/enable C locale coercion to a UTF-8 based
1546 locale
1547 --with(out)-c-locale-warning
1548 disable/enable locale compatibility warning in the C
1549 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001550 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001551 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001552 --with-fpectl enable SIGFPE catching
1553 --with-libm=STRING math library
1554 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001555 --with(out)-computed-gotos
1556 Use computed gotos in evaluation loop (enabled by
1557 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001558 --with(out)-ensurepip=[=upgrade]
1559 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001562 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001571 PKG_CONFIG path to pkg-config utility
1572 PKG_CONFIG_PATH
1573 directories to add to pkg-config's search path
1574 PKG_CONFIG_LIBDIR
1575 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001576
1577Use these variables to override the choices made by `configure' or to help
1578it to find libraries and programs with nonstandard names/locations.
1579
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001580Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001583fi
1584
1585if test "$ac_init_help" = "recursive"; then
1586 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 test -d "$ac_dir" ||
1589 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1590 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_builddir=.
1592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593case "$ac_dir" in
1594.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1595*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001596 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001598 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 case $ac_top_builddir_sub in
1600 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1601 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1602 esac ;;
1603esac
1604ac_abs_top_builddir=$ac_pwd
1605ac_abs_builddir=$ac_pwd$ac_dir_suffix
1606# for backward compatibility:
1607ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001608
1609case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 ac_top_srcdir=$ac_top_builddir_sub
1613 ac_abs_top_srcdir=$ac_pwd ;;
1614 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 ac_top_srcdir=$srcdir
1617 ac_abs_top_srcdir=$srcdir ;;
1618 *) # Relative name.
1619 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1620 ac_top_srcdir=$ac_top_build_prefix$srcdir
1621 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001622esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 cd "$ac_dir" || { ac_status=$?; continue; }
1626 # Check for guested configure.
1627 if test -f "$ac_srcdir/configure.gnu"; then
1628 echo &&
1629 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1630 elif test -f "$ac_srcdir/configure"; then
1631 echo &&
1632 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001633 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635 fi || ac_status=$?
1636 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 done
1638fi
1639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001641if $ac_init_version; then
1642 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001643python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001644generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001645
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001646Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001647This configure script is free software; the Free Software Foundation
1648gives unlimited permission to copy, distribute and modify it.
1649_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001650 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001652
1653## ------------------------ ##
1654## Autoconf initialization. ##
1655## ------------------------ ##
1656
1657# ac_fn_c_try_compile LINENO
1658# --------------------------
1659# Try to compile conftest.$ac_ext, and return whether this succeeded.
1660ac_fn_c_try_compile ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663 rm -f conftest.$ac_objext
1664 if { { ac_try="$ac_compile"
1665case "(($ac_try" in
1666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1667 *) ac_try_echo=$ac_try;;
1668esac
1669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1670$as_echo "$ac_try_echo"; } >&5
1671 (eval "$ac_compile") 2>conftest.err
1672 ac_status=$?
1673 if test -s conftest.err; then
1674 grep -v '^ *+' conftest.err >conftest.er1
1675 cat conftest.er1 >&5
1676 mv -f conftest.er1 conftest.err
1677 fi
1678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1679 test $ac_status = 0; } && {
1680 test -z "$ac_c_werror_flag" ||
1681 test ! -s conftest.err
1682 } && test -s conftest.$ac_objext; then :
1683 ac_retval=0
1684else
1685 $as_echo "$as_me: failed program was:" >&5
1686sed 's/^/| /' conftest.$ac_ext >&5
1687
1688 ac_retval=1
1689fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001690 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001691 as_fn_set_status $ac_retval
1692
1693} # ac_fn_c_try_compile
1694
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001695# ac_fn_c_try_cpp LINENO
1696# ----------------------
1697# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1698ac_fn_c_try_cpp ()
1699{
1700 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701 if { { ac_try="$ac_cpp conftest.$ac_ext"
1702case "(($ac_try" in
1703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704 *) ac_try_echo=$ac_try;;
1705esac
1706eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707$as_echo "$ac_try_echo"; } >&5
1708 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1709 ac_status=$?
1710 if test -s conftest.err; then
1711 grep -v '^ *+' conftest.err >conftest.er1
1712 cat conftest.er1 >&5
1713 mv -f conftest.er1 conftest.err
1714 fi
1715 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716 test $ac_status = 0; } > conftest.i && {
1717 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1718 test ! -s conftest.err
1719 }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=1
1726fi
1727 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1728 as_fn_set_status $ac_retval
1729
1730} # ac_fn_c_try_cpp
1731
Matthias Kloseb9621712010-04-24 17:59:49 +00001732# ac_fn_c_try_link LINENO
1733# -----------------------
1734# Try to link conftest.$ac_ext, and return whether this succeeded.
1735ac_fn_c_try_link ()
1736{
1737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1738 rm -f conftest.$ac_objext conftest$ac_exeext
1739 if { { ac_try="$ac_link"
1740case "(($ac_try" in
1741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1742 *) ac_try_echo=$ac_try;;
1743esac
1744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1745$as_echo "$ac_try_echo"; } >&5
1746 (eval "$ac_link") 2>conftest.err
1747 ac_status=$?
1748 if test -s conftest.err; then
1749 grep -v '^ *+' conftest.err >conftest.er1
1750 cat conftest.er1 >&5
1751 mv -f conftest.er1 conftest.err
1752 fi
1753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1754 test $ac_status = 0; } && {
1755 test -z "$ac_c_werror_flag" ||
1756 test ! -s conftest.err
1757 } && test -s conftest$ac_exeext && {
1758 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001759 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 }; then :
1761 ac_retval=0
1762else
1763 $as_echo "$as_me: failed program was:" >&5
1764sed 's/^/| /' conftest.$ac_ext >&5
1765
1766 ac_retval=1
1767fi
1768 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1769 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1770 # interfere with the next link command; also delete a directory that is
1771 # left behind by Apple's compiler. We do this before executing the actions.
1772 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001773 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 as_fn_set_status $ac_retval
1775
1776} # ac_fn_c_try_link
1777
Matthias Kloseb9621712010-04-24 17:59:49 +00001778# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1779# -------------------------------------------------------
1780# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1781# the include files in INCLUDES and setting the cache variable VAR
1782# accordingly.
1783ac_fn_c_check_header_mongrel ()
1784{
1785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001786 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001789if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001790 $as_echo_n "(cached) " >&6
1791fi
1792eval ac_res=\$$3
1793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1794$as_echo "$ac_res" >&6; }
1795else
1796 # Is the header compilable?
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1798$as_echo_n "checking $2 usability... " >&6; }
1799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801$4
1802#include <$2>
1803_ACEOF
1804if ac_fn_c_try_compile "$LINENO"; then :
1805 ac_header_compiler=yes
1806else
1807 ac_header_compiler=no
1808fi
1809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1811$as_echo "$ac_header_compiler" >&6; }
1812
1813# Is the header present?
1814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1815$as_echo_n "checking $2 presence... " >&6; }
1816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1817/* end confdefs.h. */
1818#include <$2>
1819_ACEOF
1820if ac_fn_c_try_cpp "$LINENO"; then :
1821 ac_header_preproc=yes
1822else
1823 ac_header_preproc=no
1824fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001825rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1827$as_echo "$ac_header_preproc" >&6; }
1828
1829# So? What about this header?
1830case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1831 yes:no: )
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1833$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1835$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1836 ;;
1837 no:yes:* )
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1839$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1841$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1843$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1845$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1847$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001848( $as_echo "## --------------------------------------- ##
1849## Report this to https://bugs.python.org/ ##
1850## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 ) | sed "s/^/$as_me: WARNING: /" >&2
1852 ;;
1853esac
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001857 $as_echo_n "(cached) " >&6
1858else
1859 eval "$3=\$ac_header_compiler"
1860fi
1861eval ac_res=\$$3
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1863$as_echo "$ac_res" >&6; }
1864fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001865 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001866
1867} # ac_fn_c_check_header_mongrel
1868
1869# ac_fn_c_try_run LINENO
1870# ----------------------
1871# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1872# that executables *can* be run.
1873ac_fn_c_try_run ()
1874{
1875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876 if { { ac_try="$ac_link"
1877case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_link") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1887 { { case "(($ac_try" in
1888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1889 *) ac_try_echo=$ac_try;;
1890esac
1891eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1892$as_echo "$ac_try_echo"; } >&5
1893 (eval "$ac_try") 2>&5
1894 ac_status=$?
1895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896 test $ac_status = 0; }; }; then :
1897 ac_retval=0
1898else
1899 $as_echo "$as_me: program exited with status $ac_status" >&5
1900 $as_echo "$as_me: failed program was:" >&5
1901sed 's/^/| /' conftest.$ac_ext >&5
1902
1903 ac_retval=$ac_status
1904fi
1905 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001906 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 as_fn_set_status $ac_retval
1908
1909} # ac_fn_c_try_run
1910
1911# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1912# -------------------------------------------------------
1913# Tests whether HEADER exists and can be compiled using the include files in
1914# INCLUDES, setting the cache variable VAR accordingly.
1915ac_fn_c_check_header_compile ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926#include <$2>
1927_ACEOF
1928if ac_fn_c_try_compile "$LINENO"; then :
1929 eval "$3=yes"
1930else
1931 eval "$3=no"
1932fi
1933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1934fi
1935eval ac_res=\$$3
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1937$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001939
1940} # ac_fn_c_check_header_compile
1941
Matthias Kloseb9621712010-04-24 17:59:49 +00001942# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1943# -------------------------------------------
1944# Tests whether TYPE exists after having included INCLUDES, setting cache
1945# variable VAR accordingly.
1946ac_fn_c_check_type ()
1947{
1948 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1950$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001951if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 $as_echo_n "(cached) " >&6
1953else
1954 eval "$3=no"
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958int
1959main ()
1960{
1961if (sizeof ($2))
1962 return 0;
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$4
1971int
1972main ()
1973{
1974if (sizeof (($2)))
1975 return 0;
1976 ;
1977 return 0;
1978}
1979_ACEOF
1980if ac_fn_c_try_compile "$LINENO"; then :
1981
1982else
1983 eval "$3=yes"
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989eval ac_res=\$$3
1990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1991$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001992 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994} # ac_fn_c_check_type
1995
Matthias Kloseb9621712010-04-24 17:59:49 +00001996# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1997# --------------------------------------------
1998# Tries to find the compile-time value of EXPR in a program that includes
1999# INCLUDES, setting VAR accordingly. Returns whether the value could be
2000# computed
2001ac_fn_c_compute_int ()
2002{
2003 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2004 if test "$cross_compiling" = yes; then
2005 # Depending upon the size, compute the lo and hi bounds.
2006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$4
2009int
2010main ()
2011{
2012static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002013test_array [0] = 0;
2014return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 ac_lo=0 ac_mid=0
2022 while :; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$4
2026int
2027main ()
2028{
2029static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002030test_array [0] = 0;
2031return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_hi=$ac_mid; break
2039else
2040 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2041 if test $ac_lo -le $ac_mid; then
2042 ac_lo= ac_hi=
2043 break
2044 fi
2045 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 done
2049else
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002057test_array [0] = 0;
2058return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065 ac_hi=-1 ac_mid=-1
2066 while :; do
2067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2068/* end confdefs.h. */
2069$4
2070int
2071main ()
2072{
2073static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002074test_array [0] = 0;
2075return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_lo=$ac_mid; break
2083else
2084 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2085 if test $ac_mid -le $ac_hi; then
2086 ac_lo= ac_hi=
2087 break
2088 fi
2089 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092 done
2093else
2094 ac_lo= ac_hi=
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099# Binary search between lo and hi bounds.
2100while test "x$ac_lo" != "x$ac_hi"; do
2101 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002109test_array [0] = 0;
2110return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002187if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002243
2244} # ac_fn_c_check_func
2245
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002246# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2247# ---------------------------------------------
2248# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2249# accordingly.
2250ac_fn_c_check_decl ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 as_decl_name=`echo $2|sed 's/ *(.*//'`
2254 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2256$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2257if eval \${$3+:} false; then :
2258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$4
2263int
2264main ()
2265{
2266#ifndef $as_decl_name
2267#ifdef __cplusplus
2268 (void) $as_decl_use;
2269#else
2270 (void) $as_decl_name;
2271#endif
2272#endif
2273
2274 ;
2275 return 0;
2276}
2277_ACEOF
2278if ac_fn_c_try_compile "$LINENO"; then :
2279 eval "$3=yes"
2280else
2281 eval "$3=no"
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$3
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289
2290} # ac_fn_c_check_decl
2291
Matthias Kloseb9621712010-04-24 17:59:49 +00002292# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2293# ----------------------------------------------------
2294# Tries to find if the field MEMBER exists in type AGGR, after including
2295# INCLUDES, setting cache variable VAR accordingly.
2296ac_fn_c_check_member ()
2297{
2298 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2300$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002301if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002302 $as_echo_n "(cached) " >&6
2303else
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305/* end confdefs.h. */
2306$5
2307int
2308main ()
2309{
2310static $2 ac_aggr;
2311if (ac_aggr.$3)
2312return 0;
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$4=yes"
2319else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$5
2323int
2324main ()
2325{
2326static $2 ac_aggr;
2327if (sizeof ac_aggr.$3)
2328return 0;
2329 ;
2330 return 0;
2331}
2332_ACEOF
2333if ac_fn_c_try_compile "$LINENO"; then :
2334 eval "$4=yes"
2335else
2336 eval "$4=no"
2337fi
2338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$4
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002346
2347} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Ned Deily4829bc62016-09-12 17:29:04 -04002352It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002353generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo "PATH: $as_dir"
2390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Kloseb9621712010-04-24 17:59:49 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# 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 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Kloseb9621712010-04-24 17:59:49 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596else
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601do
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$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 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Trent Nelson4d4ec652012-10-16 08:51:24 -04002701
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002702if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002703 # If we're building out-of-tree, we need to make sure the following
2704 # resources get picked up before their $srcdir counterparts.
2705 # Objects/ -> typeslots.inc
2706 # Include/ -> Python-ast.h, graminit.h
2707 # Python/ -> importlib.h
2708 # (A side effect of this is that these resources will automatically be
2709 # regenerated when building out-of-tree, regardless of whether or not
2710 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2711 # off.)
2712 BASECPPFLAGS="-IObjects -IInclude -IPython"
2713else
2714 BASECPPFLAGS=""
2715fi
2716
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717
2718
2719
2720
Victor Stinner9ed34a82017-05-02 22:35:58 +02002721if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723# Extract the first word of "git", so it can be a program name with args.
2724set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2726$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002727if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002728 $as_echo_n "(cached) " >&6
2729else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 if test -n "$HAS_GIT"; then
2731 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732else
2733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2734for as_dir in $PATH
2735do
2736 IFS=$as_save_IFS
2737 test -z "$as_dir" && as_dir=.
2738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2742 break 2
2743 fi
2744done
2745 done
2746IFS=$as_save_IFS
2747
Ned Deily5c4b0d02017-03-04 00:19:55 -05002748 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749fi
2750fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=$ac_cv_prog_HAS_GIT
2752if test -n "$HAS_GIT"; then
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2754$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755else
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2757$as_echo "no" >&6; }
2758fi
2759
2760
2761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765then
Ned Deily554626a2017-03-20 23:41:52 -04002766 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2767 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002768 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002770 GITVERSION=""
2771 GITTAG=""
2772 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773fi
2774
2775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002777
2778
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002779ac_aux_dir=
2780for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2781 if test -f "$ac_dir/install-sh"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/install-sh -c"
2784 break
2785 elif test -f "$ac_dir/install.sh"; then
2786 ac_aux_dir=$ac_dir
2787 ac_install_sh="$ac_aux_dir/install.sh -c"
2788 break
2789 elif test -f "$ac_dir/shtool"; then
2790 ac_aux_dir=$ac_dir
2791 ac_install_sh="$ac_aux_dir/shtool install -c"
2792 break
2793 fi
2794done
2795if test -z "$ac_aux_dir"; then
2796 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2797fi
2798
2799# These three variables are undocumented and unsupported,
2800# and are intended to be withdrawn in a future Autoconf release.
2801# They can cause serious problems if a builder's source tree is in a directory
2802# whose full name contains unusual characters.
2803ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2804ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2805ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2806
2807
2808# Make sure we can run config.sub.
2809$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2810 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2811
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2813$as_echo_n "checking build system type... " >&6; }
2814if ${ac_cv_build+:} false; then :
2815 $as_echo_n "(cached) " >&6
2816else
2817 ac_build_alias=$build_alias
2818test "x$ac_build_alias" = x &&
2819 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2820test "x$ac_build_alias" = x &&
2821 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2822ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2823 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2824
2825fi
2826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2827$as_echo "$ac_cv_build" >&6; }
2828case $ac_cv_build in
2829*-*-*) ;;
2830*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2831esac
2832build=$ac_cv_build
2833ac_save_IFS=$IFS; IFS='-'
2834set x $ac_cv_build
2835shift
2836build_cpu=$1
2837build_vendor=$2
2838shift; shift
2839# Remember, the first character of IFS is used to create $*,
2840# except with old shells:
2841build_os=$*
2842IFS=$ac_save_IFS
2843case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2844
2845
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2847$as_echo_n "checking host system type... " >&6; }
2848if ${ac_cv_host+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 if test "x$host_alias" = x; then
2852 ac_cv_host=$ac_cv_build
2853else
2854 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2855 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2856fi
2857
2858fi
2859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2860$as_echo "$ac_cv_host" >&6; }
2861case $ac_cv_host in
2862*-*-*) ;;
2863*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2864esac
2865host=$ac_cv_host
2866ac_save_IFS=$IFS; IFS='-'
2867set x $ac_cv_host
2868shift
2869host_cpu=$1
2870host_vendor=$2
2871shift; shift
2872# Remember, the first character of IFS is used to create $*,
2873# except with old shells:
2874host_os=$*
2875IFS=$ac_save_IFS
2876case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2877
2878
2879
doko@python.orga10e4a92013-01-25 18:45:12 +01002880
2881
Ned Deilyfcbc2462014-08-22 13:32:49 -07002882# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2883rm -f pybuilddir.txt
2884
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885for ac_prog in python$PACKAGE_VERSION python3 python
2886do
2887 # Extract the first word of "$ac_prog", so it can be a program name with args.
2888set dummy $ac_prog; ac_word=$2
2889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2890$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002891if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002892 $as_echo_n "(cached) " >&6
2893else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002894 if test -n "$PYTHON_FOR_REGEN"; then
2895 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896else
2897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2898for as_dir in $PATH
2899do
2900 IFS=$as_save_IFS
2901 test -z "$as_dir" && as_dir=.
2902 for ac_exec_ext in '' $ac_executable_extensions; do
2903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2906 break 2
2907 fi
2908done
2909 done
2910IFS=$as_save_IFS
2911
2912fi
2913fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2915if test -n "$PYTHON_FOR_REGEN"; then
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2917$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918else
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2920$as_echo "no" >&6; }
2921fi
2922
2923
Victor Stinnera5c62a82017-05-03 18:21:48 +02002924 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002925done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002926test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002927
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928
2929
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002930if test "$cross_compiling" = yes; then
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2932$as_echo_n "checking for python interpreter for cross build... " >&6; }
2933 if test -z "$PYTHON_FOR_BUILD"; then
2934 for interp in python$PACKAGE_VERSION python3 python; do
2935 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002936 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 +02002937 break
2938 fi
2939 interp=
2940 done
2941 if test x$interp = x; then
2942 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2943 fi
2944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2945$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002946 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 +02002947 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002948elif test "$cross_compiling" = maybe; then
2949 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002950else
2951 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Benjamin Petersond23f8222009-04-05 19:13:16 +00002956if test "$prefix" != "/"; then
2957 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2958fi
2959
2960
Martin v. Löwis11437992002-04-12 09:54:03 +00002961
2962
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002963# We don't use PACKAGE_ variables, and they cause conflicts
2964# with other autoconf-based packages that include Python.h
2965grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2966rm confdefs.h
2967mv confdefs.h.new confdefs.h
2968
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002969
Ned Deily4829bc62016-09-12 17:29:04 -04002970VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002971
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002972# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002973
2974SOVERSION=1.0
2975
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976# The later defininition of _XOPEN_SOURCE disables certain features
2977# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980
2981
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002987
2988
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2990# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002994
2995
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000
3001
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3003# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3004# them.
3005
Matthias Kloseb9621712010-04-24 17:59:49 +00003006$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003007
3008
3009
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003010define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003011
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003012# Arguments passed to configure.
3013
3014CONFIG_ARGS="$ac_configure_args"
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3017$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003019if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 case $enableval in
3022 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 # Locate the best usable SDK, see Mac/README.txt for more
3024 # information
3025 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003026 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003028 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3029 if test ! -d "${enableval}"
3030 then
3031 enableval=/
3032 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
3036 case $enableval in
3037 no)
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040 ;;
3041 *)
3042 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043 if test ! -d "${UNIVERSALSDK}"
3044 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003045 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 ;;
3048 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003049
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051else
3052
3053 UNIVERSALSDK=
3054 enable_universalsdk=
3055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058if test -n "${UNIVERSALSDK}"
3059then
Matthias Kloseb9621712010-04-24 17:59:49 +00003060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3061$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062else
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003067
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003068
Ned Deily87adb6e2013-10-18 21:09:56 -07003069ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003070
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071# For backward compatibility reasons we prefer to select '32-bit' if available,
3072# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074if test "`uname -s`" = "Darwin"
3075then
3076 if test -n "${UNIVERSALSDK}"
3077 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003078 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003079 then
3080 UNIVERSAL_ARCHS="intel"
3081 fi
3082 fi
3083fi
3084
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 UNIVERSAL_ARCHS="$withval"
3093
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094fi
3095
Ned Deily87adb6e2013-10-18 21:09:56 -07003096if test -n "${UNIVERSALSDK}"
3097then
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3099$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3100else
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3102$as_echo "no" >&6; }
3103fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003105
3106# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108 withval=$with_framework_name;
3109 PYTHONFRAMEWORK=${withval}
3110 PYTHONFRAMEWORKDIR=${withval}.framework
3111 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3112
3113else
3114
3115 PYTHONFRAMEWORK=Python
3116 PYTHONFRAMEWORKDIR=Python.framework
3117 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3118
3119fi
3120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003122if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003124 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003126 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 esac
3128 case $enableval in
3129 no)
3130 PYTHONFRAMEWORK=
3131 PYTHONFRAMEWORKDIR=no-framework
3132 PYTHONFRAMEWORKPREFIX=
3133 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST=
3135 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 FRAMEWORKALTINSTALLFIRST=
3137 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE"; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003145 ;;
3146 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003150 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003151 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3152 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003153 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003155
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003156 if test "x${prefix}" = "xNONE" ; then
3157 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 else
3160 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3161 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003162
3163 case "${enableval}" in
3164 /System*)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 if test "${prefix}" = "NONE" ; then
3167 # See below
3168 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3169 fi
3170 ;;
3171
3172 /Library*)
3173 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3174 ;;
3175
3176 */Library/Frameworks)
3177 MDIR="`dirname "${enableval}"`"
3178 MDIR="`dirname "${MDIR}"`"
3179 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3180
3181 if test "${prefix}" = "NONE"; then
3182 # User hasn't specified the
3183 # --prefix option, but wants to install
3184 # the framework in a non-default location,
3185 # ensure that the compatibility links get
3186 # installed relative to that prefix as well
3187 # instead of in /usr/local.
3188 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3189 fi
3190 ;;
3191
3192 *)
3193 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3194 ;;
3195 esac
3196
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003205 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3206
3207 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3208
Jack Jansene578a632001-08-15 01:27:14 +00003209 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Guido van Rossum563e7081996-09-10 18:20:48 +00003211else
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansene578a632001-08-15 01:27:14 +00003213 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003214 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORKPREFIX=
3216 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217 FRAMEWORKINSTALLFIRST=
3218 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003219 FRAMEWORKALTINSTALLFIRST=
3220 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222 if test "x${prefix}" = "xNONE" ; then
3223 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3224 else
3225 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3226 fi
Jack Jansene578a632001-08-15 01:27:14 +00003227 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230fi
3231
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
3233
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
3235
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239
3240
3241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003243
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003245
3246cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003247#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003248_ACEOF
3249
3250
Jack Jansene578a632001-08-15 01:27:14 +00003251##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003252## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003253## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003254##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003255# Set name for machine-dependent library files
3256
Matthias Kloseb9621712010-04-24 17:59:49 +00003257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3258$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259if test -z "$MACHDEP"
3260then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 # avoid using uname for cross builds
3262 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003263 # ac_sys_system and ac_sys_release are used for setting
3264 # a lot of different things including 'define_xopen_source'
3265 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003267 *-*-linux-android*)
3268 ac_sys_system=Linux-android
3269 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 *-*-linux*)
3271 ac_sys_system=Linux
3272 ;;
3273 *-*-cygwin*)
3274 ac_sys_system=Cygwin
3275 ;;
3276 *)
3277 # for now, limit cross builds to known configurations
3278 MACHDEP="unknown"
3279 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3280 esac
3281 ac_sys_release=
3282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003284 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003285 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003286 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003288 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 fi
3291 ac_md_system=`echo $ac_sys_system |
3292 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3293 ac_md_release=`echo $ac_sys_release |
3294 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3295 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003296
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003298 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003299 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003300 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003301 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003302 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003303 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003304fi
Guido van Rossum91922671997-10-09 20:24:13 +00003305
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003306
3307if test "$cross_compiling" = yes; then
3308 case "$host" in
3309 *-*-linux*)
3310 case "$host_cpu" in
3311 arm*)
3312 _host_cpu=arm
3313 ;;
3314 *)
3315 _host_cpu=$host_cpu
3316 esac
3317 ;;
3318 *-*-cygwin*)
3319 _host_cpu=
3320 ;;
3321 *)
3322 # for now, limit cross builds to known configurations
3323 MACHDEP="unknown"
3324 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3325 esac
3326 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3327fi
3328
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003329# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3330# disable features if it is defined, without any means to access these
3331# features as extensions. For these systems, we skip the definition of
3332# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3333# some feature, make sure there is no alternative way to access this
3334# feature. Also, when using wildcards, make sure you have verified the
3335# need for not defining _XOPEN_SOURCE on all systems matching the
3336# wildcard, and that the wildcard does not include future systems
3337# (which may remove their limitations).
3338case $ac_sys_system/$ac_sys_release in
3339 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3340 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003341 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003342 # In addition, Stefan Krah confirms that issue #1244610 exists through
3343 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003344 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345 define_xopen_source=no
3346 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3347 # also defined. This can be overridden by defining _BSD_SOURCE
3348 # As this has a different meaning on Linux, only define it on OpenBSD
3349
Matthias Kloseb9621712010-04-24 17:59:49 +00003350$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003351
3352 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003353 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003354 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3355 # also defined. This can be overridden by defining _BSD_SOURCE
3356 # As this has a different meaning on Linux, only define it on OpenBSD
3357
Matthias Kloseb9621712010-04-24 17:59:49 +00003358$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003359
3360 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003361 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3362 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3363 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003364 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 +00003365 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003366 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3367 # request to enable features supported by the standard as a request
3368 # to disable features not supported by the standard. The best way
3369 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3370 # entirely and define __EXTENSIONS__ instead.
3371 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003372 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3374 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003375 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003376 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003377 define_xopen_source=no;;
3378 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003379 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003380 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003381 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003382 # On FreeBSD 4, the math functions C89 does not cover are never defined
3383 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3384 FreeBSD/4.*)
3385 define_xopen_source=no;;
3386 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3387 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3388 # identifies itself as Darwin/7.*
3389 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3390 # disables platform specific features beyond repair.
3391 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3392 # has no effect, don't bother defining them
3393 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003394 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003395 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003396 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003397 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3398 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3399 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003400 AIX/4)
3401 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003402 AIX/5)
3403 if test `uname -r` -eq 1; then
3404 define_xopen_source=no
3405 fi
3406 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003407 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3408 # defining NI_NUMERICHOST.
3409 QNX/6.3.2)
3410 define_xopen_source=no
3411 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003412
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413esac
3414
3415if test $define_xopen_source = yes
3416then
Victor Stinner14d098d2011-09-07 22:29:43 +02003417 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Victor Stinner14d098d2011-09-07 22:29:43 +02003419$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3423 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3424 # several APIs are not declared. Since this is also needed in some
3425 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Matthias Kloseb9621712010-04-24 17:59:49 +00003427$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003430
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003431$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003433fi
3434
Christian Heimes647cd872013-12-07 23:39:33 +01003435# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3436case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003437 hp*|HP*)
3438 define_stdc_a1=yes;;
3439 *)
3440 define_stdc_a1=no;;
3441esac
3442
3443if test $define_stdc_a1 = yes
3444then
Christian Heimes647cd872013-12-07 23:39:33 +01003445
3446$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3447
Christian Heimesb02bcae2013-12-08 15:21:08 +01003448fi
Christian Heimes647cd872013-12-07 23:39:33 +01003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3451# it may influence the way we can build extensions, so distutils
3452# needs to check it
3453
Thomas Wouters477c8d52006-05-27 19:21:47 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003456EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003457
Guido van Rossum627b2d71993-12-24 10:39:16 +00003458# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003459
3460# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3461# for debug/optimization stuff. BASECFLAGS is for flags that are required
3462# just to get things to compile and link. Users are free to override OPT
3463# when running configure or make. The build should not break if they do.
3464# BASECFLAGS should generally not be messed with, however.
3465
3466# XXX shouldn't some/most/all of this code be merged with the stuff later
3467# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3469$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003472if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003474 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003475 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476 without_gcc=yes;;
3477 yes) CC=gcc
3478 without_gcc=no;;
3479 *) CC=$withval
3480 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003481 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003484 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003485 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003486 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003487 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003488 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489fi
3490
Matthias Kloseb9621712010-04-24 17:59:49 +00003491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3492$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003493
Zachary Ware5af85642015-12-21 12:09:17 -06003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3495$as_echo_n "checking for --with-icc... " >&6; }
3496
3497# Check whether --with-icc was given.
3498if test "${with_icc+set}" = set; then :
3499 withval=$with_icc;
3500 case $withval in
3501 no) CC=${CC:-cc}
3502 with_icc=no;;
3503 yes) CC=icc
3504 CXX=icpc
3505 with_icc=yes;;
3506 *) CC=$withval
3507 with_icc=$withval;;
3508 esac
3509else
3510
3511 with_icc=no
3512fi
3513
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3515$as_echo "$with_icc" >&6; }
3516
Guido van Rossum8b131c51995-03-09 14:10:13 +00003517# If the user switches compilers, we can't believe the cache
3518if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3519then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003520 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003521(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522fi
3523
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003524# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3525# when the compiler supports them, but we don't always want -O2, and
3526# we set -g later.
3527if test -z "$CFLAGS"; then
3528 CFLAGS=
3529fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530
3531if test "$ac_sys_system" = "Darwin"
3532then
3533 # Compiler selection on MacOSX is more complicated than
3534 # AC_PROG_CC can handle, see Mac/README.txt for more
3535 # information
3536 if test -z "${CC}"
3537 then
3538 found_gcc=
3539 found_clang=
3540 as_save_IFS=$IFS; IFS=:
3541 for as_dir in $PATH
3542 do
3543 IFS=$as_save_IFS
3544 if test -x $as_dir/gcc; then
3545 if test -z "${found_gcc}"; then
3546 found_gcc=$as_dir/gcc
3547 fi
3548 fi
3549 if test -x $as_dir/clang; then
3550 if test -z "${found_clang}"; then
3551 found_clang=$as_dir/clang
3552 fi
3553 fi
3554 done
3555 IFS=$as_save_IFS
3556
3557 if test -n "$found_gcc" -a -n "$found_clang"
3558 then
3559 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3560 then
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3562$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3563 CC="$found_clang"
3564 CXX="$found_clang++"
3565 fi
3566
3567
3568 elif test -z "$found_gcc" -a -n "$found_clang"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3571$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3572 CC="$found_clang"
3573 CXX="$found_clang++"
3574
3575 elif test -z "$found_gcc" -a -z "$found_clang"
3576 then
3577 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3578 if test -n "${found_clang}"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3581$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3582 CC="${found_clang}"
3583 CXX="`/usr/bin/xcrun -find clang++`"
3584
3585 # else: use default behaviour
3586 fi
3587 fi
3588 fi
3589fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003590ac_ext=c
3591ac_cpp='$CPP $CPPFLAGS'
3592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_c_compiler_gnu
3595if test -n "$ac_tool_prefix"; then
3596 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3597set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3599$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003600if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003602else
3603 if test -n "$CC"; then
3604 ac_cv_prog_CC="$CC" # Let the user override the test.
3605else
Martin v. Löwis11437992002-04-12 09:54:03 +00003606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3607for as_dir in $PATH
3608do
3609 IFS=$as_save_IFS
3610 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $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 +00003615 break 2
3616 fi
3617done
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003620
Jack Jansendd19cf82001-12-06 22:36:17 +00003621fi
3622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003623CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003624if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3626$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3629$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003630fi
3631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632
Martin v. Löwis11437992002-04-12 09:54:03 +00003633fi
3634if test -z "$ac_cv_prog_CC"; then
3635 ac_ct_CC=$CC
3636 # Extract the first word of "gcc", so it can be a program name with args.
3637set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3639$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003640if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003642else
3643 if test -n "$ac_ct_CC"; then
3644 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3645else
3646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3647for as_dir in $PATH
3648do
3649 IFS=$as_save_IFS
3650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $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 +00003655 break 2
3656 fi
3657done
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003660
3661fi
3662fi
3663ac_ct_CC=$ac_cv_prog_ac_ct_CC
3664if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3666$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3669$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test "x$ac_ct_CC" = x; then
3673 CC=""
3674 else
3675 case $cross_compiling:$ac_tool_warned in
3676yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003679ac_tool_warned=yes ;;
3680esac
3681 CC=$ac_ct_CC
3682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003683else
3684 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003685fi
3686
Jack Jansendd19cf82001-12-06 22:36:17 +00003687if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688 if test -n "$ac_tool_prefix"; then
3689 # 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 +00003690set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003693if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003695else
3696 if test -n "$CC"; then
3697 ac_cv_prog_CC="$CC" # Let the user override the test.
3698else
Martin v. Löwis11437992002-04-12 09:54:03 +00003699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3700for as_dir in $PATH
3701do
3702 IFS=$as_save_IFS
3703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $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 +00003708 break 2
3709 fi
3710done
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003712IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003713
3714fi
3715fi
3716CC=$ac_cv_prog_CC
3717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003727fi
3728if test -z "$CC"; then
3729 # Extract the first word of "cc", so it can be a program name with args.
3730set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003733if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003735else
3736 if test -n "$CC"; then
3737 ac_cv_prog_CC="$CC" # Let the user override the test.
3738else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH
3742do
3743 IFS=$as_save_IFS
3744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3748 ac_prog_rejected=yes
3749 continue
3750 fi
3751 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 $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 +00003753 break 2
3754 fi
3755done
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003758
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759if test $ac_prog_rejected = yes; then
3760 # We found a bogon in the path, so make sure we never use it.
3761 set dummy $ac_cv_prog_CC
3762 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764 # We chose a different compiler from the bogus one.
3765 # However, it has the same basename, so the bogon will be chosen
3766 # first if we set CC to just the basename; use the full file name.
3767 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003768 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 fi
3770fi
3771fi
3772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3776$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777else
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3779$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780fi
3781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
3784if test -z "$CC"; then
3785 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 do
3788 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003792if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003794else
3795 if test -n "$CC"; then
3796 ac_cv_prog_CC="$CC" # Let the user override the test.
3797else
Martin v. Löwis11437992002-04-12 09:54:03 +00003798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $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 +00003807 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003809done
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
3813fi
3814fi
3815CC=$ac_cv_prog_CC
3816if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3818$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003822fi
3823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 test -n "$CC" && break
3826 done
3827fi
3828if test -z "$CC"; then
3829 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003831do
3832 # Extract the first word of "$ac_prog", so it can be a program name with args.
3833set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003836if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
3839 if test -n "$ac_ct_CC"; then
3840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3841else
3842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3843for as_dir in $PATH
3844do
3845 IFS=$as_save_IFS
3846 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $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 +00003851 break 2
3852 fi
3853done
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003856
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858fi
3859ac_ct_CC=$ac_cv_prog_ac_ct_CC
3860if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3862$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863else
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 test -n "$ac_ct_CC" && break
3870done
Michael W. Hudson54241132001-12-07 15:38:26 +00003871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872 if test "x$ac_ct_CC" = x; then
3873 CC=""
3874 else
3875 case $cross_compiling:$ac_tool_warned in
3876yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_tool_warned=yes ;;
3880esac
3881 CC=$ac_ct_CC
3882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003883fi
3884
3885fi
3886
3887
Matthias Kloseb9621712010-04-24 17:59:49 +00003888test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003890as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003891See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892
3893# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003894$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3895set X $ac_compile
3896ac_compiler=$2
3897for ac_option in --version -v -V -qversion; do
3898 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899case "(($ac_try" in
3900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3901 *) ac_try_echo=$ac_try;;
3902esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3904$as_echo "$ac_try_echo"; } >&5
3905 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 if test -s conftest.err; then
3908 sed '10a\
3909... rest of stderr output deleted ...
3910 10q' conftest.err >conftest.er1
3911 cat conftest.er1 >&5
3912 fi
3913 rm -f conftest.er1 conftest.err
3914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3915 test $ac_status = 0; }
3916done
Martin v. Löwis11437992002-04-12 09:54:03 +00003917
Matthias Kloseb9621712010-04-24 17:59:49 +00003918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003919/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003920
Martin v. Löwis11437992002-04-12 09:54:03 +00003921int
3922main ()
3923{
3924
3925 ;
3926 return 0;
3927}
3928_ACEOF
3929ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003930ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003931# Try to create an executable without -o first, disregard a.out.
3932# It will help us diagnose broken compilers, and finding out an intuition
3933# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3935$as_echo_n "checking whether the C compiler works... " >&6; }
3936ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3937
3938# The possible output files:
3939ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941ac_rmfiles=
3942for ac_file in $ac_files
3943do
3944 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3947 esac
3948done
3949rm -f $ac_rmfiles
3950
Matthias Kloseb9621712010-04-24 17:59:49 +00003951if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952case "(($ac_try" in
3953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3954 *) ac_try_echo=$ac_try;;
3955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3957$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3963# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3964# in a Makefile. We should not override ac_cv_exeext if it was cached,
3965# so that the user can short-circuit this test for compilers unknown to
3966# Autoconf.
3967for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003968do
3969 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 ;;
3973 [ab].out )
3974 # We found the default executable, but exeext='' is most
3975 # certainly right.
3976 break;;
3977 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 then :; else
3980 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3981 fi
3982 # We set ac_cv_exeext here because the later test for it is not
3983 # safe: cross compilers may not add the suffix if given an `-o'
3984 # argument, so we may need to know it at that point already.
3985 # Even if this section looks crufty: it has the advantage of
3986 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987 break;;
3988 * )
3989 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 esac
3991done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992test "$ac_cv_exeext" = no && ac_cv_exeext=
3993
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003994else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 ac_file=''
3996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003997if test -z "$ac_file"; then :
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3999$as_echo "no" >&6; }
4000$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004001sed 's/^/| /' conftest.$ac_ext >&5
4002
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004005as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004006See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004007else
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4009$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4012$as_echo_n "checking for C compiler default output file name... " >&6; }
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4014$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4020$as_echo_n "checking for suffix of executables... " >&6; }
4021if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4033# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4034# work properly (i.e., refer to `conftest.exe'), while it won't with
4035# `rm'.
4036for ac_file in conftest.exe conftest conftest.*; do
4037 test -f "$ac_file" || continue
4038 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004040 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4041 break;;
4042 * ) break;;
4043 esac
4044done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004048as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004049See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004051rm -f conftest conftest$ac_cv_exeext
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4053$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054
4055rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004056EXEEXT=$ac_cv_exeext
4057ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4059/* end confdefs.h. */
4060#include <stdio.h>
4061int
4062main ()
4063{
4064FILE *f = fopen ("conftest.out", "w");
4065 return ferror (f) || fclose (f) != 0;
4066
4067 ;
4068 return 0;
4069}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004071ac_clean_files="$ac_clean_files conftest.out"
4072# Check that the compiler produces executables we can run. If not, either
4073# the compiler is broken, or we cross compile.
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4075$as_echo_n "checking whether we are cross compiling... " >&6; }
4076if test "$cross_compiling" != yes; then
4077 { { ac_try="$ac_link"
4078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
4082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
4084 (eval "$ac_link") 2>&5
4085 ac_status=$?
4086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }
4088 if { ac_try='./conftest$ac_cv_exeext'
4089 { { case "(($ac_try" in
4090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4091 *) ac_try_echo=$ac_try;;
4092esac
4093eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4094$as_echo "$ac_try_echo"; } >&5
4095 (eval "$ac_try") 2>&5
4096 ac_status=$?
4097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4098 test $ac_status = 0; }; }; then
4099 cross_compiling=no
4100 else
4101 if test "$cross_compiling" = maybe; then
4102 cross_compiling=yes
4103 else
4104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004106as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004107If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004108See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 fi
4110 fi
4111fi
4112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4113$as_echo "$cross_compiling" >&6; }
4114
4115rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4116ac_clean_files=$ac_clean_files_save
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4118$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004119if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo_n "(cached) " >&6
4121else
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004123/* end confdefs.h. */
4124
4125int
4126main ()
4127{
4128
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004134if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135case "(($ac_try" in
4136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4137 *) ac_try_echo=$ac_try;;
4138esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4140$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4144 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145 for ac_file in conftest.o conftest.obj conftest.*; do
4146 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004149 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4150 break;;
4151 esac
4152done
4153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004155sed 's/^/| /' conftest.$ac_ext >&5
4156
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004159as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004160See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004161fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4165$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166OBJEXT=$ac_cv_objext
4167ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4169$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004170if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004175
Martin v. Löwis11437992002-04-12 09:54:03 +00004176int
4177main ()
4178{
4179#ifndef __GNUC__
4180 choke me
4181#endif
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 ac_compiler_gnu=yes
4189else
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_cv_c_compiler_gnu=$ac_compiler_gnu
4194
4195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4197$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4198if test $ac_compiler_gnu = yes; then
4199 GCC=yes
4200else
4201 GCC=
4202fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_test_CFLAGS=${CFLAGS+set}
4204ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4206$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004207if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004209else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 ac_save_c_werror_flag=$ac_c_werror_flag
4211 ac_c_werror_flag=yes
4212 ac_cv_prog_cc_g=no
4213 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
Martin v. Löwis11437992002-04-12 09:54:03 +00004217int
4218main ()
4219{
4220
4221 ;
4222 return 0;
4223}
4224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004226 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227else
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 CFLAGS=""
4229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241
Matthias Kloseb9621712010-04-24 17:59:49 +00004242else
4243 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246/* end confdefs.h. */
4247
4248int
4249main ()
4250{
4251
4252 ;
4253 return 0;
4254}
4255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4264 ac_c_werror_flag=$ac_save_c_werror_flag
4265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4267$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004268if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270elif test $ac_cv_prog_cc_g = yes; then
4271 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004272 CFLAGS="-g -O2"
4273 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004274 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275 fi
4276else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277 if test "$GCC" = yes; then
4278 CFLAGS="-O2"
4279 else
4280 CFLAGS=
4281 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4284$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004285if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004286 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004289ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* end confdefs.h. */
4292#include <stdarg.h>
4293#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004294struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004295/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4296struct buf { int x; };
4297FILE * (*rcsopen) (struct buf *, struct stat *, int);
4298static char *e (p, i)
4299 char **p;
4300 int i;
4301{
4302 return p[i];
4303}
4304static char *f (char * (*g) (char **, int), char **p, ...)
4305{
4306 char *s;
4307 va_list v;
4308 va_start (v,p);
4309 s = g (p, va_arg (v,int));
4310 va_end (v);
4311 return s;
4312}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313
4314/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4315 function prototypes and stuff, but not '\xHH' hex character constants.
4316 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4319 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4324 inside strings and character constants. */
4325#define FOO(x) 'x'
4326int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4327
Skip Montanaro6dead952003-09-25 14:50:04 +00004328int test (int i, double x);
4329struct s1 {int (*f) (int a);};
4330struct s2 {int (*f) (double a);};
4331int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4332int argc;
4333char **argv;
4334int
4335main ()
4336{
4337return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4338 ;
4339 return 0;
4340}
4341_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4343 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004344do
4345 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349rm -f core conftest.err conftest.$ac_objext
4350 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004351done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004353CC=$ac_save_CC
4354
4355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356# AC_CACHE_VAL
4357case "x$ac_cv_prog_cc_c89" in
4358 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4360$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4363$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004364 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4367$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004368esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004369if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004370
Matthias Kloseb9621712010-04-24 17:59:49 +00004371fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004372
Martin v. Löwis11437992002-04-12 09:54:03 +00004373ac_ext=c
4374ac_cpp='$CPP $CPPFLAGS'
4375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4377ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004379ac_ext=c
4380ac_cpp='$CPP $CPPFLAGS'
4381ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4382ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4383ac_compiler_gnu=$ac_cv_c_compiler_gnu
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4385$as_echo_n "checking how to run the C preprocessor... " >&6; }
4386# On Suns, sometimes $CPP names a directory.
4387if test -n "$CPP" && test -d "$CPP"; then
4388 CPP=
4389fi
4390if test -z "$CPP"; then
4391 if ${ac_cv_prog_CPP+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393else
4394 # Double quotes because CPP needs to be expanded
4395 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4396 do
4397 ac_preproc_ok=false
4398for ac_c_preproc_warn_flag in '' yes
4399do
4400 # Use a header file that comes with gcc, so configuring glibc
4401 # with a fresh cross-compiler works.
4402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4403 # <limits.h> exists even on freestanding compilers.
4404 # On the NeXT, cc -E runs the code through the compiler's parser,
4405 # not just through cpp. "Syntax error" is here to catch this case.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#ifdef __STDC__
4409# include <limits.h>
4410#else
4411# include <assert.h>
4412#endif
4413 Syntax error
4414_ACEOF
4415if ac_fn_c_try_cpp "$LINENO"; then :
4416
4417else
4418 # Broken: fails on valid input.
4419continue
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423 # OK, works on sane cases. Now check whether nonexistent headers
4424 # can be detected and how.
4425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4426/* end confdefs.h. */
4427#include <ac_nonexistent.h>
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430 # Broken: success on invalid input.
4431continue
4432else
4433 # Passes both tests.
4434ac_preproc_ok=:
4435break
4436fi
4437rm -f conftest.err conftest.i conftest.$ac_ext
4438
4439done
4440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4441rm -f conftest.i conftest.err conftest.$ac_ext
4442if $ac_preproc_ok; then :
4443 break
4444fi
4445
4446 done
4447 ac_cv_prog_CPP=$CPP
4448
4449fi
4450 CPP=$ac_cv_prog_CPP
4451else
4452 ac_cv_prog_CPP=$CPP
4453fi
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4455$as_echo "$CPP" >&6; }
4456ac_preproc_ok=false
4457for ac_c_preproc_warn_flag in '' yes
4458do
4459 # Use a header file that comes with gcc, so configuring glibc
4460 # with a fresh cross-compiler works.
4461 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4462 # <limits.h> exists even on freestanding compilers.
4463 # On the NeXT, cc -E runs the code through the compiler's parser,
4464 # not just through cpp. "Syntax error" is here to catch this case.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#ifdef __STDC__
4468# include <limits.h>
4469#else
4470# include <assert.h>
4471#endif
4472 Syntax error
4473_ACEOF
4474if ac_fn_c_try_cpp "$LINENO"; then :
4475
4476else
4477 # Broken: fails on valid input.
4478continue
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482 # OK, works on sane cases. Now check whether nonexistent headers
4483 # can be detected and how.
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <ac_nonexistent.h>
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489 # Broken: success on invalid input.
4490continue
4491else
4492 # Passes both tests.
4493ac_preproc_ok=:
4494break
4495fi
4496rm -f conftest.err conftest.i conftest.$ac_ext
4497
4498done
4499# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4500rm -f conftest.i conftest.err conftest.$ac_ext
4501if $ac_preproc_ok; then :
4502
4503else
4504 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4506as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4507See \`config.log' for more details" "$LINENO" 5; }
4508fi
4509
4510ac_ext=c
4511ac_cpp='$CPP $CPPFLAGS'
4512ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4513ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4514ac_compiler_gnu=$ac_cv_c_compiler_gnu
4515
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4517$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4518if ${ac_cv_path_GREP+:} false; then :
4519 $as_echo_n "(cached) " >&6
4520else
4521 if test -z "$GREP"; then
4522 ac_path_GREP_found=false
4523 # Loop through the user's path and test for each of PROGNAME-LIST
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4526do
4527 IFS=$as_save_IFS
4528 test -z "$as_dir" && as_dir=.
4529 for ac_prog in grep ggrep; do
4530 for ac_exec_ext in '' $ac_executable_extensions; do
4531 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4532 as_fn_executable_p "$ac_path_GREP" || continue
4533# Check for GNU ac_path_GREP and select it if it is found.
4534 # Check for GNU $ac_path_GREP
4535case `"$ac_path_GREP" --version 2>&1` in
4536*GNU*)
4537 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4538*)
4539 ac_count=0
4540 $as_echo_n 0123456789 >"conftest.in"
4541 while :
4542 do
4543 cat "conftest.in" "conftest.in" >"conftest.tmp"
4544 mv "conftest.tmp" "conftest.in"
4545 cp "conftest.in" "conftest.nl"
4546 $as_echo 'GREP' >> "conftest.nl"
4547 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4548 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4549 as_fn_arith $ac_count + 1 && ac_count=$as_val
4550 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4551 # Best one so far, save it but keep looking for a better one
4552 ac_cv_path_GREP="$ac_path_GREP"
4553 ac_path_GREP_max=$ac_count
4554 fi
4555 # 10*(2^10) chars as input seems more than enough
4556 test $ac_count -gt 10 && break
4557 done
4558 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4559esac
4560
4561 $ac_path_GREP_found && break 3
4562 done
4563 done
4564 done
4565IFS=$as_save_IFS
4566 if test -z "$ac_cv_path_GREP"; then
4567 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4568 fi
4569else
4570 ac_cv_path_GREP=$GREP
4571fi
4572
4573fi
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4575$as_echo "$ac_cv_path_GREP" >&6; }
4576 GREP="$ac_cv_path_GREP"
4577
4578
Łukasz Langaa785c872016-09-09 17:37:37 -07004579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4580$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4581if ${ac_cv_path_SED+:} false; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4585 for ac_i in 1 2 3 4 5 6 7; do
4586 ac_script="$ac_script$as_nl$ac_script"
4587 done
4588 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4589 { ac_script=; unset ac_script;}
4590 if test -z "$SED"; then
4591 ac_path_SED_found=false
4592 # Loop through the user's path and test for each of PROGNAME-LIST
4593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in $PATH
4595do
4596 IFS=$as_save_IFS
4597 test -z "$as_dir" && as_dir=.
4598 for ac_prog in sed gsed; do
4599 for ac_exec_ext in '' $ac_executable_extensions; do
4600 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4601 as_fn_executable_p "$ac_path_SED" || continue
4602# Check for GNU ac_path_SED and select it if it is found.
4603 # Check for GNU $ac_path_SED
4604case `"$ac_path_SED" --version 2>&1` in
4605*GNU*)
4606 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4607*)
4608 ac_count=0
4609 $as_echo_n 0123456789 >"conftest.in"
4610 while :
4611 do
4612 cat "conftest.in" "conftest.in" >"conftest.tmp"
4613 mv "conftest.tmp" "conftest.in"
4614 cp "conftest.in" "conftest.nl"
4615 $as_echo '' >> "conftest.nl"
4616 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4617 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4618 as_fn_arith $ac_count + 1 && ac_count=$as_val
4619 if test $ac_count -gt ${ac_path_SED_max-0}; then
4620 # Best one so far, save it but keep looking for a better one
4621 ac_cv_path_SED="$ac_path_SED"
4622 ac_path_SED_max=$ac_count
4623 fi
4624 # 10*(2^10) chars as input seems more than enough
4625 test $ac_count -gt 10 && break
4626 done
4627 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4628esac
4629
4630 $ac_path_SED_found && break 3
4631 done
4632 done
4633 done
4634IFS=$as_save_IFS
4635 if test -z "$ac_cv_path_SED"; then
4636 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4637 fi
4638else
4639 ac_cv_path_SED=$SED
4640fi
4641
4642fi
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4644$as_echo "$ac_cv_path_SED" >&6; }
4645 SED="$ac_cv_path_SED"
4646 rm -f conftest.sed
4647
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004648
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004649
4650
Matthias Kloseb9621712010-04-24 17:59:49 +00004651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4652$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004654# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004655if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004656 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004657
4658 case $withval in
4659 no) with_cxx_main=no
4660 MAINCC='$(CC)';;
4661 yes) with_cxx_main=yes
4662 MAINCC='$(CXX)';;
4663 *) with_cxx_main=yes
4664 MAINCC=$withval
4665 if test -z "$CXX"
4666 then
4667 CXX=$withval
4668 fi;;
4669 esac
4670else
4671
4672 with_cxx_main=no
4673 MAINCC='$(CC)'
4674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004675fi
4676
Matthias Kloseb9621712010-04-24 17:59:49 +00004677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4678$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004679
4680preset_cxx="$CXX"
4681if test -z "$CXX"
4682then
4683 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 gcc) if test -n "$ac_tool_prefix"; then
4685 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4686set dummy ${ac_tool_prefix}g++; ac_word=$2
4687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4688$as_echo_n "checking for $ac_word... " >&6; }
4689if ${ac_cv_path_CXX+:} false; then :
4690 $as_echo_n "(cached) " >&6
4691else
4692 case $CXX in
4693 [\\/]* | ?:[\\/]*)
4694 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4695 ;;
4696 *)
4697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in notfound
4699do
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
4702 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706 break 2
4707 fi
4708done
4709 done
4710IFS=$as_save_IFS
4711
4712 ;;
4713esac
4714fi
4715CXX=$ac_cv_path_CXX
4716if test -n "$CXX"; then
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4718$as_echo "$CXX" >&6; }
4719else
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4721$as_echo "no" >&6; }
4722fi
4723
4724
4725fi
4726if test -z "$ac_cv_path_CXX"; then
4727 ac_pt_CXX=$CXX
4728 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004732if ${ac_cv_path_ac_pt_CXX+:} false; then :
4733 $as_echo_n "(cached) " >&6
4734else
4735 case $ac_pt_CXX in
4736 [\\/]* | ?:[\\/]*)
4737 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4738 ;;
4739 *)
4740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in notfound
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
4745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749 break 2
4750 fi
4751done
4752 done
4753IFS=$as_save_IFS
4754
4755 ;;
4756esac
4757fi
4758ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4759if test -n "$ac_pt_CXX"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4761$as_echo "$ac_pt_CXX" >&6; }
4762else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764$as_echo "no" >&6; }
4765fi
4766
4767 if test "x$ac_pt_CXX" = x; then
4768 CXX="g++"
4769 else
4770 case $cross_compiling:$ac_tool_warned in
4771yes:)
4772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4774ac_tool_warned=yes ;;
4775esac
4776 CXX=$ac_pt_CXX
4777 fi
4778else
4779 CXX="$ac_cv_path_CXX"
4780fi
4781 ;;
4782 cc) if test -n "$ac_tool_prefix"; then
4783 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4784set dummy ${ac_tool_prefix}c++; ac_word=$2
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4786$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004787if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789else
4790 case $CXX in
4791 [\\/]* | ?:[\\/]*)
4792 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4793 ;;
4794 *)
4795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4796for as_dir in notfound
4797do
4798 IFS=$as_save_IFS
4799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804 break 2
4805 fi
4806done
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004808IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004809
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 ;;
4811esac
4812fi
4813CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004814if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4816$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004817else
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4819$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004821
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822
4823fi
4824if test -z "$ac_cv_path_CXX"; then
4825 ac_pt_CXX=$CXX
4826 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4829$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004830if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004831 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004832else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004833 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835 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 +00004836 ;;
4837 *)
4838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4839for as_dir in notfound
4840do
4841 IFS=$as_save_IFS
4842 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004843 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004845 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 break 2
4848 fi
4849done
Matthias Kloseb9621712010-04-24 17:59:49 +00004850 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004851IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004853 ;;
4854esac
4855fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4857if test -n "$ac_pt_CXX"; then
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4859$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004860else
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4862$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004864
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004865 if test "x$ac_pt_CXX" = x; then
4866 CXX="c++"
4867 else
4868 case $cross_compiling:$ac_tool_warned in
4869yes:)
4870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4872ac_tool_warned=yes ;;
4873esac
4874 CXX=$ac_pt_CXX
4875 fi
4876else
4877 CXX="$ac_cv_path_CXX"
4878fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004879 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880 clang|*/clang) if test -n "$ac_tool_prefix"; then
4881 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4882set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4884$as_echo_n "checking for $ac_word... " >&6; }
4885if ${ac_cv_path_CXX+:} false; then :
4886 $as_echo_n "(cached) " >&6
4887else
4888 case $CXX in
4889 [\\/]* | ?:[\\/]*)
4890 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4891 ;;
4892 *)
4893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in notfound
4895do
4896 IFS=$as_save_IFS
4897 test -z "$as_dir" && as_dir=.
4898 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004900 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4902 break 2
4903 fi
4904done
4905 done
4906IFS=$as_save_IFS
4907
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 ;;
4909esac
4910fi
4911CXX=$ac_cv_path_CXX
4912if test -n "$CXX"; then
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4914$as_echo "$CXX" >&6; }
4915else
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4917$as_echo "no" >&6; }
4918fi
4919
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004920
4921fi
4922if test -z "$ac_cv_path_CXX"; then
4923 ac_pt_CXX=$CXX
4924 # Extract the first word of "clang++", so it can be a program name with args.
4925set dummy clang++; ac_word=$2
4926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4927$as_echo_n "checking for $ac_word... " >&6; }
4928if ${ac_cv_path_ac_pt_CXX+:} false; then :
4929 $as_echo_n "(cached) " >&6
4930else
4931 case $ac_pt_CXX in
4932 [\\/]* | ?:[\\/]*)
4933 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4934 ;;
4935 *)
4936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937for as_dir in notfound
4938do
4939 IFS=$as_save_IFS
4940 test -z "$as_dir" && as_dir=.
4941 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004943 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4945 break 2
4946 fi
4947done
4948 done
4949IFS=$as_save_IFS
4950
4951 ;;
4952esac
4953fi
4954ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4955if test -n "$ac_pt_CXX"; then
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4957$as_echo "$ac_pt_CXX" >&6; }
4958else
4959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4960$as_echo "no" >&6; }
4961fi
4962
4963 if test "x$ac_pt_CXX" = x; then
4964 CXX="clang++"
4965 else
4966 case $cross_compiling:$ac_tool_warned in
4967yes:)
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4969$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4970ac_tool_warned=yes ;;
4971esac
4972 CXX=$ac_pt_CXX
4973 fi
4974else
4975 CXX="$ac_cv_path_CXX"
4976fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004977 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004978 icc|*/icc) if test -n "$ac_tool_prefix"; then
4979 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4980set dummy ${ac_tool_prefix}icpc; ac_word=$2
4981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4982$as_echo_n "checking for $ac_word... " >&6; }
4983if ${ac_cv_path_CXX+:} false; then :
4984 $as_echo_n "(cached) " >&6
4985else
4986 case $CXX in
4987 [\\/]* | ?:[\\/]*)
4988 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4989 ;;
4990 *)
4991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4992for as_dir in notfound
4993do
4994 IFS=$as_save_IFS
4995 test -z "$as_dir" && as_dir=.
4996 for ac_exec_ext in '' $ac_executable_extensions; do
4997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4998 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5000 break 2
5001 fi
5002done
5003 done
5004IFS=$as_save_IFS
5005
5006 ;;
5007esac
5008fi
5009CXX=$ac_cv_path_CXX
5010if test -n "$CXX"; then
5011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5012$as_echo "$CXX" >&6; }
5013else
5014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5015$as_echo "no" >&6; }
5016fi
5017
5018
5019fi
5020if test -z "$ac_cv_path_CXX"; then
5021 ac_pt_CXX=$CXX
5022 # Extract the first word of "icpc", so it can be a program name with args.
5023set dummy icpc; ac_word=$2
5024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5025$as_echo_n "checking for $ac_word... " >&6; }
5026if ${ac_cv_path_ac_pt_CXX+:} false; then :
5027 $as_echo_n "(cached) " >&6
5028else
5029 case $ac_pt_CXX in
5030 [\\/]* | ?:[\\/]*)
5031 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5032 ;;
5033 *)
5034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035for as_dir in notfound
5036do
5037 IFS=$as_save_IFS
5038 test -z "$as_dir" && as_dir=.
5039 for ac_exec_ext in '' $ac_executable_extensions; do
5040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5041 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5043 break 2
5044 fi
5045done
5046 done
5047IFS=$as_save_IFS
5048
5049 ;;
5050esac
5051fi
5052ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5053if test -n "$ac_pt_CXX"; then
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5055$as_echo "$ac_pt_CXX" >&6; }
5056else
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5058$as_echo "no" >&6; }
5059fi
5060
5061 if test "x$ac_pt_CXX" = x; then
5062 CXX="icpc"
5063 else
5064 case $cross_compiling:$ac_tool_warned in
5065yes:)
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5068ac_tool_warned=yes ;;
5069esac
5070 CXX=$ac_pt_CXX
5071 fi
5072else
5073 CXX="$ac_cv_path_CXX"
5074fi
5075 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005076 esac
5077 if test "$CXX" = "notfound"
5078 then
5079 CXX=""
5080 fi
5081fi
5082if test -z "$CXX"
5083then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 if test -n "$ac_tool_prefix"; then
5085 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5086 do
5087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5090$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005091if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005093else
5094 if test -n "$CXX"; then
5095 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5096else
5097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005104 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106 break 2
5107 fi
5108done
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005111
5112fi
5113fi
5114CXX=$ac_cv_prog_CXX
5115if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5117$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005118else
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121fi
5122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005123
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005124 test -n "$CXX" && break
5125 done
5126fi
5127if test -z "$CXX"; then
5128 ac_ct_CXX=$CXX
5129 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5130do
5131 # Extract the first word of "$ac_prog", so it can be a program name with args.
5132set dummy $ac_prog; ac_word=$2
5133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5134$as_echo_n "checking for $ac_word... " >&6; }
5135if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5136 $as_echo_n "(cached) " >&6
5137else
5138 if test -n "$ac_ct_CXX"; then
5139 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5140else
5141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144 IFS=$as_save_IFS
5145 test -z "$as_dir" && as_dir=.
5146 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005148 ac_cv_prog_ac_ct_CXX="$ac_prog"
5149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5150 break 2
5151 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005152done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005153 done
5154IFS=$as_save_IFS
5155
5156fi
5157fi
5158ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5159if test -n "$ac_ct_CXX"; then
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5161$as_echo "$ac_ct_CXX" >&6; }
5162else
5163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164$as_echo "no" >&6; }
5165fi
5166
5167
5168 test -n "$ac_ct_CXX" && break
5169done
5170
5171 if test "x$ac_ct_CXX" = x; then
5172 CXX="notfound"
5173 else
5174 case $cross_compiling:$ac_tool_warned in
5175yes:)
5176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5178ac_tool_warned=yes ;;
5179esac
5180 CXX=$ac_ct_CXX
5181 fi
5182fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005183
5184 if test "$CXX" = "notfound"
5185 then
5186 CXX=""
5187 fi
5188fi
5189if test "$preset_cxx" != "$CXX"
5190then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005191 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192
5193 By default, distutils will build C++ extension modules with \"$CXX\".
5194 If this is not intended, then set CXX on the configure command line.
5195 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005196$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197
5198 By default, distutils will build C++ extension modules with \"$CXX\".
5199 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005200 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005201fi
5202
5203
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5205
5206
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5208$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5209cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005210#undef bfin
5211#undef cris
5212#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005214#undef hppa
5215#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005216#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005217#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005218#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005219#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005220#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005221#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005222 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005223#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224# if defined(__x86_64__) && defined(__LP64__)
5225 x86_64-linux-gnu
5226# elif defined(__x86_64__) && defined(__ILP32__)
5227 x86_64-linux-gnux32
5228# elif defined(__i386__)
5229 i386-linux-gnu
5230# elif defined(__aarch64__) && defined(__AARCH64EL__)
5231# if defined(__ILP32__)
5232 aarch64_ilp32-linux-gnu
5233# else
5234 aarch64-linux-gnu
5235# endif
5236# elif defined(__aarch64__) && defined(__AARCH64EB__)
5237# if defined(__ILP32__)
5238 aarch64_be_ilp32-linux-gnu
5239# else
5240 aarch64_be-linux-gnu
5241# endif
5242# elif defined(__alpha__)
5243 alpha-linux-gnu
5244# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5245# if defined(__ARMEL__)
5246 arm-linux-gnueabihf
5247# else
5248 armeb-linux-gnueabihf
5249# endif
5250# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5251# if defined(__ARMEL__)
5252 arm-linux-gnueabi
5253# else
5254 armeb-linux-gnueabi
5255# endif
5256# elif defined(__hppa__)
5257 hppa-linux-gnu
5258# elif defined(__ia64__)
5259 ia64-linux-gnu
5260# elif defined(__m68k__) && !defined(__mcoldfire__)
5261 m68k-linux-gnu
5262# elif defined(__mips_hard_float) && defined(_MIPSEL)
5263# if _MIPS_SIM == _ABIO32
5264 mipsel-linux-gnu
5265# elif _MIPS_SIM == _ABIN32
5266 mips64el-linux-gnuabin32
5267# elif _MIPS_SIM == _ABI64
5268 mips64el-linux-gnuabi64
5269# else
5270# error unknown platform triplet
5271# endif
5272# elif defined(__mips_hard_float)
5273# if _MIPS_SIM == _ABIO32
5274 mips-linux-gnu
5275# elif _MIPS_SIM == _ABIN32
5276 mips64-linux-gnuabin32
5277# elif _MIPS_SIM == _ABI64
5278 mips64-linux-gnuabi64
5279# else
5280# error unknown platform triplet
5281# endif
5282# elif defined(__or1k__)
5283 or1k-linux-gnu
5284# elif defined(__powerpc__) && defined(__SPE__)
5285 powerpc-linux-gnuspe
5286# elif defined(__powerpc64__)
5287# if defined(__LITTLE_ENDIAN__)
5288 powerpc64le-linux-gnu
5289# else
5290 powerpc64-linux-gnu
5291# endif
5292# elif defined(__powerpc__)
5293 powerpc-linux-gnu
5294# elif defined(__s390x__)
5295 s390x-linux-gnu
5296# elif defined(__s390__)
5297 s390-linux-gnu
5298# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5299 sh4-linux-gnu
5300# elif defined(__sparc__) && defined(__arch64__)
5301 sparc64-linux-gnu
5302# elif defined(__sparc__)
5303 sparc-linux-gnu
5304# else
5305# error unknown platform triplet
5306# endif
5307#elif defined(__FreeBSD_kernel__)
5308# if defined(__LP64__)
5309 x86_64-kfreebsd-gnu
5310# elif defined(__i386__)
5311 i386-kfreebsd-gnu
5312# else
5313# error unknown platform triplet
5314# endif
5315#elif defined(__gnu_hurd__)
5316 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005317#elif defined(__APPLE__)
5318 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005319#else
5320# error unknown platform triplet
5321#endif
5322
5323EOF
5324
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005325if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5328$as_echo "$PLATFORM_TRIPLET" >&6; }
5329else
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5331$as_echo "none" >&6; }
5332fi
5333rm -f conftest.c conftest.out
5334
5335if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5336 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5337 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5338 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005339elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5340 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005341fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005342
doko@ubuntu.com55532312016-06-14 08:55:19 +02005343if test x$MULTIARCH != x; then
5344 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5345fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005346
5347
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5349$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5350save_LDFLAGS="$LDFLAGS"
5351LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005352
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354/* end confdefs.h. */
5355
5356int
5357main ()
5358{
5359
5360 ;
5361 return 0;
5362}
5363_ACEOF
5364if ac_fn_c_try_link "$LINENO"; then :
5365 NO_AS_NEEDED="-Wl,--no-as-needed"
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5367$as_echo "yes" >&6; }
5368else
5369 NO_AS_NEEDED=""
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5371$as_echo "no" >&6; }
5372fi
5373rm -f core conftest.err conftest.$ac_objext \
5374 conftest$ac_exeext conftest.$ac_ext
5375LDFLAGS="$save_LDFLAGS"
5376
5377
5378
5379# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005380
Matthias Kloseb9621712010-04-24 17:59:49 +00005381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5382$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005383if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385else
5386 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5387 then ac_cv_path_EGREP="$GREP -E"
5388 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 # Loop through the user's path and test for each of PROGNAME-LIST
5392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5394do
5395 IFS=$as_save_IFS
5396 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 for ac_prog in egrep; do
5398 for ac_exec_ext in '' $ac_executable_extensions; do
5399 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005400 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005401# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 # Check for GNU $ac_path_EGREP
5403case `"$ac_path_EGREP" --version 2>&1` in
5404*GNU*)
5405 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5406*)
5407 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005408 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 while :
5410 do
5411 cat "conftest.in" "conftest.in" >"conftest.tmp"
5412 mv "conftest.tmp" "conftest.in"
5413 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5416 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5419 # Best one so far, save it but keep looking for a better one
5420 ac_cv_path_EGREP="$ac_path_EGREP"
5421 ac_path_EGREP_max=$ac_count
5422 fi
5423 # 10*(2^10) chars as input seems more than enough
5424 test $ac_count -gt 10 && break
5425 done
5426 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5427esac
5428
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 $ac_path_EGREP_found && break 3
5430 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005435 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 +00005436 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437else
5438 ac_cv_path_EGREP=$EGREP
5439fi
5440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005441 fi
5442fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5444$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005446
5447
Matthias Kloseb9621712010-04-24 17:59:49 +00005448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5449$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005450if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 $as_echo_n "(cached) " >&6
5452else
5453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005454/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005455#include <stdlib.h>
5456#include <stdarg.h>
5457#include <string.h>
5458#include <float.h>
5459
5460int
5461main ()
5462{
5463
5464 ;
5465 return 0;
5466}
5467_ACEOF
5468if ac_fn_c_try_compile "$LINENO"; then :
5469 ac_cv_header_stdc=yes
5470else
5471 ac_cv_header_stdc=no
5472fi
5473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5474
5475if test $ac_cv_header_stdc = yes; then
5476 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5478/* end confdefs.h. */
5479#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005480
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005481_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005485else
Matthias Kloseb9621712010-04-24 17:59:49 +00005486 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005487fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005488rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489
Matthias Kloseb9621712010-04-24 17:59:49 +00005490fi
5491
5492if test $ac_cv_header_stdc = yes; then
5493 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5495/* end confdefs.h. */
5496#include <stdlib.h>
5497
5498_ACEOF
5499if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5500 $EGREP "free" >/dev/null 2>&1; then :
5501
5502else
5503 ac_cv_header_stdc=no
5504fi
5505rm -f conftest*
5506
5507fi
5508
5509if test $ac_cv_header_stdc = yes; then
5510 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5511 if test "$cross_compiling" = yes; then :
5512 :
5513else
5514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5515/* end confdefs.h. */
5516#include <ctype.h>
5517#include <stdlib.h>
5518#if ((' ' & 0x0FF) == 0x020)
5519# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5520# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5521#else
5522# define ISLOWER(c) \
5523 (('a' <= (c) && (c) <= 'i') \
5524 || ('j' <= (c) && (c) <= 'r') \
5525 || ('s' <= (c) && (c) <= 'z'))
5526# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5527#endif
5528
5529#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5530int
5531main ()
5532{
5533 int i;
5534 for (i = 0; i < 256; i++)
5535 if (XOR (islower (i), ISLOWER (i))
5536 || toupper (i) != TOUPPER (i))
5537 return 2;
5538 return 0;
5539}
5540_ACEOF
5541if ac_fn_c_try_run "$LINENO"; then :
5542
5543else
5544 ac_cv_header_stdc=no
5545fi
5546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5547 conftest.$ac_objext conftest.beam conftest.$ac_ext
5548fi
5549
5550fi
5551fi
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5553$as_echo "$ac_cv_header_stdc" >&6; }
5554if test $ac_cv_header_stdc = yes; then
5555
5556$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5557
5558fi
5559
5560# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5561for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5562 inttypes.h stdint.h unistd.h
5563do :
5564 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5565ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5566"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005567if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005568 cat >>confdefs.h <<_ACEOF
5569#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5570_ACEOF
5571
5572fi
5573
5574done
5575
5576
5577
5578 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 +02005579if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005580 MINIX=yes
5581else
5582 MINIX=
5583fi
5584
5585
5586 if test "$MINIX" = yes; then
5587
5588$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5589
5590
5591$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5592
5593
5594$as_echo "#define _MINIX 1" >>confdefs.h
5595
5596 fi
5597
5598
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5600$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005601if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 $as_echo_n "(cached) " >&6
5603else
5604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5605/* end confdefs.h. */
5606
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005607# define __EXTENSIONS__ 1
5608 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005609int
5610main ()
5611{
5612
5613 ;
5614 return 0;
5615}
5616_ACEOF
5617if ac_fn_c_try_compile "$LINENO"; then :
5618 ac_cv_safe_to_define___extensions__=yes
5619else
5620 ac_cv_safe_to_define___extensions__=no
5621fi
5622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5623fi
5624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5625$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5626 test $ac_cv_safe_to_define___extensions__ = yes &&
5627 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5628
5629 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5630
5631 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5632
5633 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5634
5635 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5636
5637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5640$as_echo_n "checking for the Android API level... " >&6; }
5641cat >> conftest.c <<EOF
5642#ifdef __ANDROID__
5643#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005644android_api = __ANDROID_API__
5645arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005646#else
5647#error not Android
5648#endif
5649EOF
5650
5651if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005652 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5653 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5655$as_echo "$ANDROID_API_LEVEL" >&6; }
5656
5657cat >>confdefs.h <<_ACEOF
5658#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5659_ACEOF
5660
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005661
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5663$as_echo_n "checking for the Android arm ABI... " >&6; }
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5665$as_echo "$_arm_arch" >&6; }
5666 if test "$_arm_arch" = 7; then
5667 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5668 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5669 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005670else
5671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5672$as_echo "not Android" >&6; }
5673fi
5674rm -f conftest.c conftest.out
5675
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676# Check for unsupported systems
5677case $ac_sys_system/$ac_sys_release in
5678atheos*|Linux*/1*)
5679 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5680 echo See README for details.
5681 exit 1;;
5682esac
5683
5684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5686$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687
5688# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005689if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 withval=$with_suffix;
5691 case $withval in
5692 no) EXEEXT=;;
5693 yes) EXEEXT=.exe;;
5694 *) EXEEXT=$withval;;
5695 esac
5696fi
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5699$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# Test whether we're running on a non-case-sensitive system, in which
5702# case we give a warning if no ext is given
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5705$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706if test ! -d CaseSensitiveTestDir; then
5707mkdir CaseSensitiveTestDir
5708fi
5709
5710if test -d casesensitivetestdir
5711then
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5713$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 BUILDEXEEXT=.exe
5715else
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718 BUILDEXEEXT=$EXEEXT
5719fi
5720rmdir CaseSensitiveTestDir
5721
5722case $MACHDEP in
5723bsdos*)
5724 case $CC in
5725 gcc) CC="$CC -D_HAVE_BSDI";;
5726 esac;;
5727esac
5728
5729case $ac_sys_system in
5730hp*|HP*)
5731 case $CC in
5732 cc|*/cc) CC="$CC -Ae";;
5733 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734esac
5735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5738$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739if test -z "$LIBRARY"
5740then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005741 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5744$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
5746# LDLIBRARY is the name of the library to link against (as opposed to the
5747# name of the library into which to insert object files). BLDLIBRARY is also
5748# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5749# is blank as the main program is not linked directly against LDLIBRARY.
5750# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5751# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5752# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5753# DLLLIBRARY is the shared (i.e., DLL) library.
5754#
5755# RUNSHARED is used to run shared python without installed libraries
5756#
5757# INSTSONAME is the name of the shared library that will be use to install
5758# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005759#
5760# LDVERSION is the shared library version number, normally the Python version
5761# with the ABI build flags appended.
5762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
5764
5765
5766
5767
5768
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770LDLIBRARY="$LIBRARY"
5771BLDLIBRARY='$(LDLIBRARY)'
5772INSTSONAME='$(LDLIBRARY)'
5773DLLLIBRARY=''
5774LDLIBRARYDIR=''
5775RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005776LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
5778# LINKCC is the command that links the python executable -- default is $(CC).
5779# If CXX is set, and if it is needed to link a main function that was
5780# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5781# python might then depend on the C++ runtime
5782# This is altered for AIX in order to build the export list before
5783# linking.
5784
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5786$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787if test -z "$LINKCC"
5788then
5789 LINKCC='$(PURIFY) $(MAINCC)'
5790 case $ac_sys_system in
5791 AIX*)
5792 exp_extra="\"\""
5793 if test $ac_sys_release -ge 5 -o \
5794 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5795 exp_extra="."
5796 fi
5797 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798 QNX*)
5799 # qcc must be used because the other compilers do not
5800 # support -N.
5801 LINKCC=qcc;;
5802 esac
5803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5805$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806
5807# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5808# make sure we default having it set to "no": this is used by
5809# distutils.unixccompiler to know if it should add --enable-new-dtags
5810# to linker command lines, and failing to detect GNU ld simply results
5811# in the same bahaviour as before.
5812
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5814$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815ac_prog=ld
5816if test "$GCC" = yes; then
5817 ac_prog=`$CC -print-prog-name=ld`
5818fi
5819case `"$ac_prog" -V 2>&1 < /dev/null` in
5820 *GNU*)
5821 GNULD=yes;;
5822 *)
5823 GNULD=no;;
5824esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5826$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827
Matthias Kloseb9621712010-04-24 17:59:49 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5829$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005831if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832 enableval=$enable_shared;
5833fi
5834
5835
5836if test -z "$enable_shared"
5837then
5838 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005839 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840 enable_shared="yes";;
5841 *)
5842 enable_shared="no";;
5843 esac
5844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5846$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5849$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005851if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005852 enableval=$enable_profiling;
5853fi
5854
5855if test "x$enable_profiling" = xyes; then
5856 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005857 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859/* end confdefs.h. */
5860int main() { return 0; }
5861_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005862if ac_fn_c_try_link "$LINENO"; then :
5863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005867rm -f core conftest.err conftest.$ac_objext \
5868 conftest$ac_exeext conftest.$ac_ext
5869 CC="$ac_save_cc"
5870else
5871 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5874$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876if test "x$enable_profiling" = xyes; then
5877 BASECFLAGS="-pg $BASECFLAGS"
5878 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879fi
5880
Matthias Kloseb9621712010-04-24 17:59:49 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5882$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5885# library that we build, but we do not want to link against it (we
5886# will find it with a -framework option). For this reason there is an
5887# extra variable BLDLIBRARY against which Python and the extension
5888# modules are linked, BLDLIBRARY. This is normally the same as
5889# LDLIBRARY, but empty for MacOSX framework builds.
5890if test "$enable_framework"
5891then
5892 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005893 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 BLDLIBRARY=''
5895else
5896 BLDLIBRARY='$(LDLIBRARY)'
5897fi
5898
5899# Other platforms follow
5900if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005901 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902
Matthias Kloseb9621712010-04-24 17:59:49 +00005903$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904
5905 case $ac_sys_system in
5906 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 LDLIBRARY='libpython$(LDVERSION).dll.a'
5908 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
5910 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).so'
5912 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005915 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005916 then
5917 PY3LIBRARY=libpython3.so
5918 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005920 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).so'
5922 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005923 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005925 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005926 then
5927 PY3LIBRARY=libpython3.so
5928 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 ;;
5930 hp*|HP*)
5931 case `uname -m` in
5932 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005933 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 ;;
5935 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
5938 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005940 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005943 LDLIBRARY='libpython$(LDVERSION).dylib'
5944 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005945 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005947 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005948 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005949 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005950 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
5952 esac
5953else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005954 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 case $ac_sys_system in
5956 CYGWIN*)
5957 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005958 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 ;;
5960 esac
5961fi
5962
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005963if test "$cross_compiling" = yes; then
5964 RUNSHARED=
5965fi
5966
Matthias Kloseb9621712010-04-24 17:59:49 +00005967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5968$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969
5970if test -n "$ac_tool_prefix"; then
5971 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5972set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5974$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005975if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005976 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977else
5978 if test -n "$RANLIB"; then
5979 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5980else
5981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984 IFS=$as_save_IFS
5985 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 break 2
5991 fi
5992done
Matthias Kloseb9621712010-04-24 17:59:49 +00005993 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994IFS=$as_save_IFS
5995
5996fi
5997fi
5998RANLIB=$ac_cv_prog_RANLIB
5999if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6001$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002else
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6004$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005fi
6006
6007
6008fi
6009if test -z "$ac_cv_prog_RANLIB"; then
6010 ac_ct_RANLIB=$RANLIB
6011 # Extract the first word of "ranlib", so it can be a program name with args.
6012set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6014$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006015if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006016 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017else
6018 if test -n "$ac_ct_RANLIB"; then
6019 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6020else
6021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024 IFS=$as_save_IFS
6025 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030 break 2
6031 fi
6032done
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034IFS=$as_save_IFS
6035
6036fi
6037fi
6038ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6039if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6041$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042else
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045fi
6046
6047 if test "x$ac_ct_RANLIB" = x; then
6048 RANLIB=":"
6049 else
6050 case $cross_compiling:$ac_tool_warned in
6051yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054ac_tool_warned=yes ;;
6055esac
6056 RANLIB=$ac_ct_RANLIB
6057 fi
6058else
6059 RANLIB="$ac_cv_prog_RANLIB"
6060fi
6061
6062
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006063if test -n "$ac_tool_prefix"; then
6064 for ac_prog in ar aal
6065 do
6066 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6067set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6069$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006070if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072else
6073 if test -n "$AR"; then
6074 ac_cv_prog_AR="$AR" # Let the user override the test.
6075else
6076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077for as_dir in $PATH
6078do
6079 IFS=$as_save_IFS
6080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006083 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085 break 2
6086 fi
6087done
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089IFS=$as_save_IFS
6090
6091fi
6092fi
6093AR=$ac_cv_prog_AR
6094if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6096$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097else
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100fi
6101
6102
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006103 test -n "$AR" && break
6104 done
6105fi
6106if test -z "$AR"; then
6107 ac_ct_AR=$AR
6108 for ac_prog in ar aal
6109do
6110 # Extract the first word of "$ac_prog", so it can be a program name with args.
6111set dummy $ac_prog; ac_word=$2
6112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6113$as_echo_n "checking for $ac_word... " >&6; }
6114if ${ac_cv_prog_ac_ct_AR+:} false; then :
6115 $as_echo_n "(cached) " >&6
6116else
6117 if test -n "$ac_ct_AR"; then
6118 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6119else
6120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH
6122do
6123 IFS=$as_save_IFS
6124 test -z "$as_dir" && as_dir=.
6125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006127 ac_cv_prog_ac_ct_AR="$ac_prog"
6128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6129 break 2
6130 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006131done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006132 done
6133IFS=$as_save_IFS
6134
6135fi
6136fi
6137ac_ct_AR=$ac_cv_prog_ac_ct_AR
6138if test -n "$ac_ct_AR"; then
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6140$as_echo "$ac_ct_AR" >&6; }
6141else
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143$as_echo "no" >&6; }
6144fi
6145
6146
6147 test -n "$ac_ct_AR" && break
6148done
6149
6150 if test "x$ac_ct_AR" = x; then
6151 AR="ar"
6152 else
6153 case $cross_compiling:$ac_tool_warned in
6154yes:)
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6156$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6157ac_tool_warned=yes ;;
6158esac
6159 AR=$ac_ct_AR
6160 fi
6161fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162
6163
6164# tweak ARFLAGS only if the user didn't set it on the command line
6165
6166if test -z "$ARFLAGS"
6167then
6168 ARFLAGS="rc"
6169fi
6170
doko@ubuntu.com58844492012-06-30 18:25:32 +02006171if test -n "$ac_tool_prefix"; then
6172 for ac_prog in readelf
6173 do
6174 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6175set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6177$as_echo_n "checking for $ac_word... " >&6; }
6178if ${ac_cv_prog_READELF+:} false; then :
6179 $as_echo_n "(cached) " >&6
6180else
6181 if test -n "$READELF"; then
6182 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6183else
6184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6185for as_dir in $PATH
6186do
6187 IFS=$as_save_IFS
6188 test -z "$as_dir" && as_dir=.
6189 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006190 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006191 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6192 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6193 break 2
6194 fi
6195done
6196 done
6197IFS=$as_save_IFS
6198
6199fi
6200fi
6201READELF=$ac_cv_prog_READELF
6202if test -n "$READELF"; then
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6204$as_echo "$READELF" >&6; }
6205else
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6207$as_echo "no" >&6; }
6208fi
6209
6210
6211 test -n "$READELF" && break
6212 done
6213fi
6214if test -z "$READELF"; then
6215 ac_ct_READELF=$READELF
6216 for ac_prog in readelf
6217do
6218 # Extract the first word of "$ac_prog", so it can be a program name with args.
6219set dummy $ac_prog; ac_word=$2
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6221$as_echo_n "checking for $ac_word... " >&6; }
6222if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6223 $as_echo_n "(cached) " >&6
6224else
6225 if test -n "$ac_ct_READELF"; then
6226 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6227else
6228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6229for as_dir in $PATH
6230do
6231 IFS=$as_save_IFS
6232 test -z "$as_dir" && as_dir=.
6233 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006234 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006235 ac_cv_prog_ac_ct_READELF="$ac_prog"
6236 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6237 break 2
6238 fi
6239done
6240 done
6241IFS=$as_save_IFS
6242
6243fi
6244fi
6245ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6246if test -n "$ac_ct_READELF"; then
6247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6248$as_echo "$ac_ct_READELF" >&6; }
6249else
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6251$as_echo "no" >&6; }
6252fi
6253
6254
6255 test -n "$ac_ct_READELF" && break
6256done
6257
6258 if test "x$ac_ct_READELF" = x; then
6259 READELF=":"
6260 else
6261 case $cross_compiling:$ac_tool_warned in
6262yes:)
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6265ac_tool_warned=yes ;;
6266esac
6267 READELF=$ac_ct_READELF
6268 fi
6269fi
6270
6271if test "$cross_compiling" = yes; then
6272 case "$READELF" in
6273 readelf|:)
6274 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6275 ;;
6276 esac
6277fi
6278
6279
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281case $MACHDEP in
6282bsdos*|hp*|HP*)
6283 # install -d does not work on BSDI or HP-UX
6284 if test -z "$INSTALL"
6285 then
6286 INSTALL="${srcdir}/install-sh -c"
6287 fi
6288esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289# Find a good install program. We prefer a C program (faster),
6290# so one script is as good as another. But avoid the broken or
6291# incompatible versions:
6292# SysV /etc/install, /usr/sbin/install
6293# SunOS /usr/etc/install
6294# IRIX /sbin/install
6295# AIX /bin/install
6296# AmigaOS /C/install, which installs bootblocks on floppy discs
6297# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6298# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6299# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6300# OS/2's system install, which has a completely different semantic
6301# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006302# Reject install programs that cannot install multiple files.
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6304$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006306if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006307 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308else
6309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310for as_dir in $PATH
6311do
6312 IFS=$as_save_IFS
6313 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 # Account for people who put trailing slashes in PATH elements.
6315case $as_dir/ in #((
6316 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006318 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 /usr/ucb/* ) ;;
6320 *)
6321 # OSF1 and SCO ODT 3.0 have their own names for install.
6322 # Don't use installbsd from OSF since it installs stuff as root
6323 # by default.
6324 for ac_prog in ginstall scoinst install; do
6325 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006326 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 if test $ac_prog = install &&
6328 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6329 # AIX install. It has an incompatible calling convention.
6330 :
6331 elif test $ac_prog = install &&
6332 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6333 # program-specific install script used by HP pwplus--don't use.
6334 :
6335 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006336 rm -rf conftest.one conftest.two conftest.dir
6337 echo one > conftest.one
6338 echo two > conftest.two
6339 mkdir conftest.dir
6340 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6341 test -s conftest.one && test -s conftest.two &&
6342 test -s conftest.dir/conftest.one &&
6343 test -s conftest.dir/conftest.two
6344 then
6345 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6346 break 3
6347 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348 fi
6349 fi
6350 done
6351 done
6352 ;;
6353esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006354
6355 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006356IFS=$as_save_IFS
6357
Matthias Kloseb9621712010-04-24 17:59:49 +00006358rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359
6360fi
6361 if test "${ac_cv_path_install+set}" = set; then
6362 INSTALL=$ac_cv_path_install
6363 else
6364 # As a last resort, use the slow shell script. Don't cache a
6365 # value for INSTALL within a source directory, because that will
6366 # break other packages using the cache if that directory is
6367 # removed, or if the value is a relative name.
6368 INSTALL=$ac_install_sh
6369 fi
6370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6372$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373
6374# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6375# It thinks the first close brace ends the variable substitution.
6376test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6377
6378test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6379
6380test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6381
Matthias Klose93a0ef12012-03-15 18:08:34 +01006382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6383$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6384if test -z "$MKDIR_P"; then
6385 if ${ac_cv_path_mkdir+:} false; then :
6386 $as_echo_n "(cached) " >&6
6387else
6388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6390do
6391 IFS=$as_save_IFS
6392 test -z "$as_dir" && as_dir=.
6393 for ac_prog in mkdir gmkdir; do
6394 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006395 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006396 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6397 'mkdir (GNU coreutils) '* | \
6398 'mkdir (coreutils) '* | \
6399 'mkdir (fileutils) '4.1*)
6400 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6401 break 3;;
6402 esac
6403 done
6404 done
6405 done
6406IFS=$as_save_IFS
6407
6408fi
6409
6410 test -d ./--version && rmdir ./--version
6411 if test "${ac_cv_path_mkdir+set}" = set; then
6412 MKDIR_P="$ac_cv_path_mkdir -p"
6413 else
6414 # As a last resort, use the slow shell script. Don't cache a
6415 # value for MKDIR_P within a source directory, because that will
6416 # break other packages using the cache if that directory is
6417 # removed, or if the value is a relative name.
6418 MKDIR_P="$ac_install_sh -d"
6419 fi
6420fi
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6422$as_echo "$MKDIR_P" >&6; }
6423
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424
6425# Not every filesystem supports hard links
6426
6427if test -z "$LN" ; then
6428 case $ac_sys_system in
6429 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430 *) LN=ln;;
6431 esac
6432fi
6433
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006434# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006435
6436ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6440$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441
6442# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006443if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444 withval=$with_pydebug;
6445if test "$withval" != no
6446then
6447
Matthias Kloseb9621712010-04-24 17:59:49 +00006448$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006449
Matthias Kloseb9621712010-04-24 17:59:49 +00006450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6451$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006453 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006454else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006456fi
6457else
Matthias Kloseb9621712010-04-24 17:59:49 +00006458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006460fi
6461
6462
T. Woutersddbfa2c2017-05-23 01:30:49 +02006463# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6464# the ABI. This allows enabling assertions without changing the ABI.
6465assertions='false'
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6467$as_echo_n "checking for --with-assertions... " >&6; }
6468
6469# Check whether --with-assertions was given.
6470if test "${with_assertions+set}" = set; then :
6471 withval=$with_assertions;
6472if test "$withval" != no
6473then
6474 assertions='true'
6475fi
6476fi
6477
6478if test "$assertions" = 'true'; then
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; }
6481elif test "$Py_DEBUG" = 'true'; then
6482 assertions='true'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6484$as_echo "implied by --with-pydebug" >&6; }
6485else
6486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6487$as_echo "no" >&6; }
6488fi
6489
Brett Cannon63d98bc2016-09-06 17:12:40 -07006490# Enable optimization flags
6491
6492
6493Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6495$as_echo_n "checking for --enable-optimizations... " >&6; }
6496# Check whether --enable-optimizations was given.
6497if test "${enable_optimizations+set}" = set; then :
6498 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006499if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006500then
6501 Py_OPT='true'
6502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6503$as_echo "yes" >&6; };
6504else
6505 Py_OPT='false'
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; };
6508fi
6509else
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006515 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6516 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006517 # 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 +00006518 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006519 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006520 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006521 DEF_MAKE_RULE="build_all"
6522else
6523 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006524 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006525 DEF_MAKE_RULE="all"
6526fi
6527
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006528# Enable LTO flags
6529
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6531$as_echo_n "checking for --with-lto... " >&6; }
6532
6533# Check whether --with-lto was given.
6534if test "${with_lto+set}" = set; then :
6535 withval=$with_lto;
6536if test "$withval" != no
6537then
6538 Py_LTO='true'
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6540$as_echo "yes" >&6; };
6541else
6542 Py_LTO='false'
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6544$as_echo "no" >&6; };
6545fi
6546else
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551if test "$Py_LTO" = 'true' ; then
6552 case $CC in
6553 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006554 case $ac_sys_system in
6555 Darwin*)
6556 # Any changes made here should be reflected in the GCC+Darwin case below
6557 LTOFLAGS="-flto -Wl,-export_dynamic"
6558 ;;
6559 *)
6560 LTOFLAGS="-flto"
6561 ;;
6562 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006563 ;;
6564 *gcc*)
6565 case $ac_sys_system in
6566 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006567 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006568 ;;
6569 *)
6570 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6571 ;;
6572 esac
6573 ;;
6574 esac
6575fi
6576
Brett Cannon7188a3e2015-09-18 15:13:44 -07006577# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006578
6579
6580
6581
6582
Gregory P. Smith799520c2016-09-07 16:10:00 -07006583# Make this work on systems where llvm tools are not installed with their
6584# normal names in the default $PATH (ie: Ubuntu). They exist under the
6585# non-suffixed name in their versioned llvm directory.
6586llvm_bin_dir=''
6587llvm_path="${PATH}"
6588if test "${CC}" = "clang"
6589then
6590 clang_bin=`which clang`
6591 # Some systems install clang elsewhere as a symlink to the real path
6592 # which is where the related llvm tools are located.
6593 if test -L "${clang_bin}"
6594 then
6595 clang_dir=`dirname "${clang_bin}"`
6596 clang_bin=`readlink "${clang_bin}"`
6597 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6598 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6599 fi
6600fi
Zachary Ware5af85642015-12-21 12:09:17 -06006601
Gregory P. Smith799520c2016-09-07 16:10:00 -07006602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6603$as_echo_n "checking target system type... " >&6; }
6604if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006605 $as_echo_n "(cached) " >&6
6606else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006607 if test "x$target_alias" = x; then
6608 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006609else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006610 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6611 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6612fi
6613
6614fi
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6616$as_echo "$ac_cv_target" >&6; }
6617case $ac_cv_target in
6618*-*-*) ;;
6619*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6620esac
6621target=$ac_cv_target
6622ac_save_IFS=$IFS; IFS='-'
6623set x $ac_cv_target
6624shift
6625target_cpu=$1
6626target_vendor=$2
6627shift; shift
6628# Remember, the first character of IFS is used to create $*,
6629# except with old shells:
6630target_os=$*
6631IFS=$ac_save_IFS
6632case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6633
6634
6635# The aliases save the names the user supplied, while $host etc.
6636# will get canonicalized.
6637test -n "$target_alias" &&
6638 test "$program_prefix$program_suffix$program_transform_name" = \
6639 NONENONEs,x,x, &&
6640 program_prefix=${target_alias}-
6641# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6642set dummy $target_alias-llvm-profdata; ac_word=$2
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644$as_echo_n "checking for $ac_word... " >&6; }
6645if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6646 $as_echo_n "(cached) " >&6
6647else
6648 case $LLVM_PROFDATA in
6649 [\\/]* | ?:[\\/]*)
6650 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6651 ;;
6652 *)
6653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6654for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655do
6656 IFS=$as_save_IFS
6657 test -z "$as_dir" && as_dir=.
6658 for ac_exec_ext in '' $ac_executable_extensions; do
6659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006660 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6662 break 2
6663 fi
6664done
6665 done
6666IFS=$as_save_IFS
6667
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668 ;;
6669esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006670fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006671LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6672if test -n "$LLVM_PROFDATA"; then
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6674$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675else
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677$as_echo "no" >&6; }
6678fi
6679
6680
Gregory P. Smith799520c2016-09-07 16:10:00 -07006681if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6682 if test "$build" = "$target"; then
6683 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6684 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6685set dummy llvm-profdata; ac_word=$2
6686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6687$as_echo_n "checking for $ac_word... " >&6; }
6688if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6689 $as_echo_n "(cached) " >&6
6690else
6691 case $ac_pt_LLVM_PROFDATA in
6692 [\\/]* | ?:[\\/]*)
6693 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6694 ;;
6695 *)
6696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6697for as_dir in ${llvm_path}
6698do
6699 IFS=$as_save_IFS
6700 test -z "$as_dir" && as_dir=.
6701 for ac_exec_ext in '' $ac_executable_extensions; do
6702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6703 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6705 break 2
6706 fi
6707done
6708 done
6709IFS=$as_save_IFS
6710
6711 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6712 ;;
6713esac
6714fi
6715ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6716if test -n "$ac_pt_LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6718$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6725 else
6726 LLVM_PROFDATA="''"
6727 fi
6728else
6729 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6730fi
6731
6732
6733if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6734then
6735 LLVM_PROF_FOUND="found"
6736else
6737 LLVM_PROF_FOUND="not-found"
6738fi
6739if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6740then
6741 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6742 if test -n "${found_llvm_profdata}"
6743 then
6744 # llvm-profdata isn't directly in $PATH in some cases.
6745 # https://apple.stackexchange.com/questions/197053/
6746 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6747 LLVM_PROF_FOUND=found
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6749$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6750 fi
6751fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752LLVM_PROF_ERR=no
6753case $CC in
6754 *clang*)
6755 # Any changes made here should be reflected in the GCC+Darwin case below
6756 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6757 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006758 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006759 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6760 if test $LLVM_PROF_FOUND = not-found
6761 then
6762 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 if test "${REQUIRE_PGO}" = "yes"
6764 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006765 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 -07006766 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006767 fi
6768 ;;
6769 *gcc*)
6770 case $ac_sys_system in
6771 Darwin*)
6772 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6773 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006774 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006775 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 then
6778 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006779 if test "${REQUIRE_PGO}" = "yes"
6780 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006781 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 -07006782 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006783 fi
6784 ;;
6785 *)
6786 PGO_PROF_GEN_FLAG="-fprofile-generate"
6787 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6788 LLVM_PROF_MERGER="true"
6789 LLVM_PROF_FILE=""
6790 ;;
6791 esac
6792 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006793 *icc*)
6794 PGO_PROF_GEN_FLAG="-prof-gen"
6795 PGO_PROF_USE_FLAG="-prof-use"
6796 LLVM_PROF_MERGER="true"
6797 LLVM_PROF_FILE=""
6798 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006799esac
6800
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006801# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6802# merged with this chunk of code?
6803
6804# Optimizer/debugger flags
6805# ------------------------
6806# (The following bit of code is complicated enough - please keep things
6807# indented properly. Just pretend you're editing Python code. ;-)
6808
6809# There are two parallel sets of case statements below, one that checks to
6810# see if OPT was set and one that does BASECFLAGS setting based upon
6811# compiler and platform. BASECFLAGS tweaks need to be made even if the
6812# user set OPT.
6813
6814# tweak OPT based on compiler and platform, only if the user didn't set
6815# it on the command line
6816
Victor Stinner9ed34a82017-05-02 22:35:58 +02006817
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006818if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819then
6820 case $GCC in
6821 yes)
6822 if test "$CC" != 'g++' ; then
6823 STRICT_PROTO="-Wstrict-prototypes"
6824 fi
6825 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6826 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6827 WRAP="-fwrapv"
6828 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006829
Stefan Krahaf04ff22011-12-08 22:20:31 +01006830 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006831 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006832 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006833 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006834 *)
6835 if $CC --version 2>&1 | grep -q clang
6836 then
6837 cc_is_clang=1
6838 else
6839 cc_is_clang=
6840 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006841 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006842
Victor Stinner35f3d242017-04-21 12:35:24 +02006843 if test -n "${cc_is_clang}"
6844 then
6845 # Clang also needs -fwrapv
6846 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006847 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6848 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006849 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006850 fi
6851
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852 case $ac_cv_prog_cc_g in
6853 yes)
6854 if test "$Py_DEBUG" = 'true' ; then
6855 # Optimization messes up debuggers, so turn it off for
6856 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006857 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006858 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006859 else
Victor Stinner28205b22017-04-21 11:24:34 +02006860 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006861 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 else
Victor Stinner28205b22017-04-21 11:24:34 +02006863 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864 fi
6865 ;;
6866 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006867 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 ;;
6869 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006870
Victor Stinner826f83f2017-04-28 15:07:10 +02006871 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873 case $ac_sys_system in
6874 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6875 ;;
6876 esac
6877 ;;
6878
6879 *)
6880 OPT="-O"
6881 ;;
6882 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883fi
6884
6885
6886
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006887
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888# The -arch flags for universal builds on OSX
6889UNIVERSAL_ARCH_FLAGS=
6890
6891
6892# tweak BASECFLAGS based on compiler and platform
6893case $GCC in
6894yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006895 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006896
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6898$as_echo_n "checking for -Wextra... " >&6; }
6899 ac_save_cc="$CC"
6900 CC="$CC -Wextra -Werror"
6901 if ${ac_cv_extra_warnings+:} false; then :
6902 $as_echo_n "(cached) " >&6
6903else
6904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6905/* end confdefs.h. */
6906
6907
6908int
6909main ()
6910{
6911
6912 ;
6913 return 0;
6914}
6915
6916_ACEOF
6917if ac_fn_c_try_compile "$LINENO"; then :
6918
6919 ac_cv_extra_warnings=yes
6920
6921else
6922
6923 ac_cv_extra_warnings=no
6924
6925fi
6926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6927fi
6928
6929 CC="$ac_save_cc"
6930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6931$as_echo "$ac_cv_extra_warnings" >&6; }
6932
6933 if test $ac_cv_extra_warnings = yes
6934 then
6935 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6936 fi
6937
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006938 # Python doesn't violate C99 aliasing rules, but older versions of
6939 # GCC produce warnings for legal Python code. Enable
6940 # -fno-strict-aliasing on versions of GCC that support but produce
6941 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6943$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006944 ac_save_cc="$CC"
6945 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006946 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006947 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006949else
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006952
Matthias Kloseb159a552010-04-25 21:00:44 +00006953
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006954int
6955main ()
6956{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006957
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006958 ;
6959 return 0;
6960}
Matthias Kloseb159a552010-04-25 21:00:44 +00006961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006963if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006964
6965 CC="$ac_save_cc -fstrict-aliasing"
6966 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968/* end confdefs.h. */
6969
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006970 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006971int
6972main ()
6973{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006974double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006975 ;
6976 return 0;
6977}
Matthias Kloseb159a552010-04-25 21:00:44 +00006978
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006980if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
6982 ac_cv_no_strict_aliasing=no
6983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984else
Matthias Kloseb159a552010-04-25 21:00:44 +00006985
6986 ac_cv_no_strict_aliasing=yes
6987
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006990
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006991else
Matthias Kloseb159a552010-04-25 21:00:44 +00006992
6993 ac_cv_no_strict_aliasing=no
6994
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006997fi
6998
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7002$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007003 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004 then
7005 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7006 fi
7007
Zachary Ware5af85642015-12-21 12:09:17 -06007008 # ICC doesn't recognize the option, but only emits a warning
7009 ## XXX does it emit an unused result warning and can it be disabled?
7010 case "$CC" in
7011 *icc*)
7012 ac_cv_disable_unused_result_warning=no
7013 ;;
7014 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7016$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7017 ac_save_cc="$CC"
7018 CC="$CC -Wunused-result -Werror"
7019 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007020 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007021 $as_echo_n "(cached) " >&6
7022else
7023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7024/* end confdefs.h. */
7025
7026
7027int
7028main ()
7029{
7030
7031 ;
7032 return 0;
7033}
7034
7035_ACEOF
7036if ac_fn_c_try_compile "$LINENO"; then :
7037
7038 ac_cv_disable_unused_result_warning=yes
7039
7040else
7041
7042 ac_cv_disable_unused_result_warning=no
7043
7044fi
7045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7046fi
7047
7048 CFLAGS="$save_CFLAGS"
7049 CC="$ac_save_cc"
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7051$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007052 ;;
7053 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007054
7055 if test $ac_cv_disable_unused_result_warning = yes
7056 then
7057 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007058 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7059 fi
7060
7061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7062$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7063 ac_save_cc="$CC"
7064 CC="$CC -Wunused-parameter -Werror"
7065 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7066 $as_echo_n "(cached) " >&6
7067else
7068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7069/* end confdefs.h. */
7070
7071
7072int
7073main ()
7074{
7075
7076 ;
7077 return 0;
7078}
7079
7080_ACEOF
7081if ac_fn_c_try_compile "$LINENO"; then :
7082
7083 ac_cv_disable_unused_parameter_warning=yes
7084
7085else
7086
7087 ac_cv_disable_unused_parameter_warning=no
7088
7089fi
7090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7091fi
7092
7093 CC="$ac_save_cc"
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7095$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7096
7097 if test $ac_cv_disable_unused_parameter_warning = yes
7098 then
7099 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7100 fi
7101
7102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7103$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7104 ac_save_cc="$CC"
7105 CC="$CC -Wmissing-field-initializers -Werror"
7106 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7107 $as_echo_n "(cached) " >&6
7108else
7109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7110/* end confdefs.h. */
7111
7112
7113int
7114main ()
7115{
7116
7117 ;
7118 return 0;
7119}
7120
7121_ACEOF
7122if ac_fn_c_try_compile "$LINENO"; then :
7123
7124 ac_cv_disable_missing_field_initializers=yes
7125
7126else
7127
7128 ac_cv_disable_missing_field_initializers=no
7129
7130fi
7131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7132fi
7133
7134 CC="$ac_save_cc"
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7136$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7137
7138 if test $ac_cv_disable_missing_field_initializers = yes
7139 then
7140 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007141 fi
7142
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7144$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7145 ac_save_cc="$CC"
7146 CC="$CC -Wsign-compare"
7147 save_CFLAGS="$CFLAGS"
7148 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7149 $as_echo_n "(cached) " >&6
7150else
7151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152/* end confdefs.h. */
7153
7154
7155int
7156main ()
7157{
7158
7159 ;
7160 return 0;
7161}
7162
7163_ACEOF
7164if ac_fn_c_try_compile "$LINENO"; then :
7165
7166 ac_cv_enable_sign_compare_warning=yes
7167
7168else
7169
7170 ac_cv_enable_sign_compare_warning=no
7171
7172fi
7173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7174fi
7175
7176 CFLAGS="$save_CFLAGS"
7177 CC="$ac_save_cc"
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7179$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7180
7181 if test $ac_cv_enable_sign_compare_warning = yes
7182 then
7183 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7184 fi
7185
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7187$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7188 ac_save_cc="$CC"
7189 CC="$CC -Wunreachable-code"
7190 save_CFLAGS="$CFLAGS"
7191 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7192 $as_echo_n "(cached) " >&6
7193else
7194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7195/* end confdefs.h. */
7196
7197
7198int
7199main ()
7200{
7201
7202 ;
7203 return 0;
7204}
7205
7206_ACEOF
7207if ac_fn_c_try_compile "$LINENO"; then :
7208
7209 ac_cv_enable_unreachable_code_warning=yes
7210
7211else
7212
7213 ac_cv_enable_unreachable_code_warning=no
7214
7215fi
7216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7217fi
7218
7219 CFLAGS="$save_CFLAGS"
7220 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007221
7222 # Don't enable unreachable code warning in debug mode, since it usually
7223 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007224 # Issue #24324: Unfortunately, the unreachable code warning does not work
7225 # correctly on gcc and has been silently removed from the compiler.
7226 # It is supported on clang but on OS X systems gcc may be an alias
7227 # for clang. Try to determine if the compiler is not really gcc and,
7228 # if so, only then enable the warning.
7229 if test $ac_cv_enable_unreachable_code_warning = yes && \
7230 test "$Py_DEBUG" != "true" && \
7231 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007232 then
7233 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007234 else
7235 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007236 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7238$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007239
Victor Stinner193ee0a2017-02-06 14:24:00 +01007240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7241$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7242 ac_save_cc="$CC"
7243 CC="$CC -Werror=implicit-function-declaration"
7244 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7245 $as_echo_n "(cached) " >&6
7246else
7247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7248/* end confdefs.h. */
7249
7250
7251int
7252main ()
7253{
7254
7255 ;
7256 return 0;
7257}
7258
7259_ACEOF
7260if ac_fn_c_try_compile "$LINENO"; then :
7261
7262 ac_cv_enable_implicit_function_declaration_error=yes
7263
7264else
7265
7266 ac_cv_enable_implicit_function_declaration_error=no
7267
7268fi
7269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7270fi
7271
7272 CC="$ac_save_cc"
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7274$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7275
7276 if test $ac_cv_enable_implicit_function_declaration_error = yes
7277 then
7278 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7279 fi
7280
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007281 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7282 # support. Without this, treatment of subnormals doesn't follow
7283 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007284 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285 alpha*)
7286 BASECFLAGS="$BASECFLAGS -mieee"
7287 ;;
7288 esac
7289
7290 case $ac_sys_system in
7291 SCO_SV*)
7292 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7293 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007294
7295 # is there any other compiler on Darwin besides gcc?
7296 Darwin*)
7297 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7298 # used to be here, but non-Apple gcc doesn't accept them.
7299 if test "${CC}" = gcc
7300 then
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007302$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007303 case "${UNIVERSALSDK}" in
7304 */MacOSX10.4u.sdk)
7305 # Build using 10.4 SDK, force usage of gcc when the
7306 # compiler is gcc, otherwise the user will get very
7307 # confusing error messages when building on OSX 10.6
7308 CC=gcc-4.0
7309 CPP=cpp-4.0
7310 ;;
7311 esac
7312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007313$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007314 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315
Ned Deily87adb6e2013-10-18 21:09:56 -07007316 if test "${enable_universalsdk}"
7317 then
7318 case "$UNIVERSAL_ARCHS" in
7319 32-bit)
7320 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7321 LIPO_32BIT_FLAGS=""
7322 ARCH_RUN_32BIT=""
7323 ;;
7324 64-bit)
7325 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7326 LIPO_32BIT_FLAGS=""
7327 ARCH_RUN_32BIT="true"
7328 ;;
7329 all)
7330 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7331 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7332 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7333 ;;
7334 intel)
7335 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7336 LIPO_32BIT_FLAGS="-extract i386"
7337 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7338 ;;
7339 intel-32)
7340 UNIVERSAL_ARCH_FLAGS="-arch i386"
7341 LIPO_32BIT_FLAGS=""
7342 ARCH_RUN_32BIT=""
7343 ;;
7344 3-way)
7345 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7346 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7347 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7348 ;;
7349 *)
7350 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7351 ;;
7352 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353
Ned Deily87adb6e2013-10-18 21:09:56 -07007354 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7355 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7356 if test "${UNIVERSALSDK}" != "/"
7357 then
7358 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7359 fi
7360 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361
Ned Deily87adb6e2013-10-18 21:09:56 -07007362 # Calculate an appropriate deployment target for this build:
7363 # The deployment target value is used explicitly to enable certain
7364 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007365 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007366 # component of the string returned by distutils.get_platform().
7367 #
7368 # Use the value from:
7369 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7370 # 2. the operating system version of the build machine if >= 10.6
7371 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7372 # below to pick either 10.3, 10.4, or 10.5 as the target.
7373 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374
Ned Deily87adb6e2013-10-18 21:09:56 -07007375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7376$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007377 cur_target_major=`sw_vers -productVersion | \
7378 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7379 cur_target_minor=`sw_vers -productVersion | \
7380 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7381 cur_target="${cur_target_major}.${cur_target_minor}"
7382 if test ${cur_target_major} -eq 10 && \
7383 test ${cur_target_minor} -ge 3 && \
7384 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007385 then
Ned Deily36820b62014-06-25 13:44:22 -07007386 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007387 cur_target=10.3
7388 if test ${enable_universalsdk}
7389 then
7390 case "$UNIVERSAL_ARCHS" in
7391 all|3-way|intel|64-bit)
7392 # These configurations were first supported in 10.5
7393 cur_target='10.5'
7394 ;;
7395 esac
7396 else
7397 if test `/usr/bin/arch` = "i386"
7398 then
7399 # 10.4 was the first release to support Intel archs
7400 cur_target="10.4"
7401 fi
7402 fi
7403 fi
7404 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007405
Ned Deily87adb6e2013-10-18 21:09:56 -07007406 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7407 # environment with a value that is the same as what we'll use
7408 # in the Makefile to ensure that we'll get the same compiler
7409 # environment during configure and build time.
7410 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7411 export MACOSX_DEPLOYMENT_TARGET
7412 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7414$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007415
Ned Deily87adb6e2013-10-18 21:09:56 -07007416 # end of Darwin* tests
7417 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418 esac
7419 ;;
7420
7421*)
7422 case $ac_sys_system in
7423 OpenUNIX*|UnixWare*)
7424 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7425 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 SCO_SV*)
7427 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7428 ;;
7429 esac
7430 ;;
7431esac
7432
Zachary Ware5af85642015-12-21 12:09:17 -06007433# ICC needs -fp-model strict or floats behave badly
7434case "$CC" in
7435*icc*)
7436 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7437 ;;
7438esac
7439
T. Woutersddbfa2c2017-05-23 01:30:49 +02007440if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441 :
7442else
7443 OPT="-DNDEBUG $OPT"
7444fi
7445
7446if test "$ac_arch_flags"
7447then
7448 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7449fi
7450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451# On some compilers, pthreads are available without further options
7452# (e.g. MacOS X). On some of these systems, the compiler will not
7453# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7454# So we have to see first whether pthreads are available without
7455# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7457$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007458if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462 ac_cv_pthread_is_default=no
7463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465/* end confdefs.h. */
7466
Stefan Krah7dba5942012-11-22 22:49:11 +01007467#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468#include <pthread.h>
7469
7470void* routine(void* p){return NULL;}
7471
7472int main(){
7473 pthread_t p;
7474 if(pthread_create(&p,NULL,routine,NULL)!=0)
7475 return 1;
7476 (void)pthread_detach(p);
7477 return 0;
7478}
7479
7480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007481if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482
7483 ac_cv_pthread_is_default=yes
7484 ac_cv_kthread=no
7485 ac_cv_pthread=no
7486
7487else
Matthias Kloseb9621712010-04-24 17:59:49 +00007488 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492fi
7493
7494
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495fi
7496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7498$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499
7500
7501if test $ac_cv_pthread_is_default = yes
7502then
7503 ac_cv_kpthread=no
7504else
7505# -Kpthread, if available, provides the right #defines
7506# and linker options to make pthread_create available
7507# Some compilers won't report that they do not support -Kpthread,
7508# so we need to run a program to see whether it really made the
7509# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7511$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007512if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007513 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007514else
7515 ac_save_cc="$CC"
7516CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007517if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518 ac_cv_kpthread=no
7519else
Matthias Kloseb9621712010-04-24 17:59:49 +00007520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521/* end confdefs.h. */
7522
Stefan Krah7dba5942012-11-22 22:49:11 +01007523#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524#include <pthread.h>
7525
7526void* routine(void* p){return NULL;}
7527
7528int main(){
7529 pthread_t p;
7530 if(pthread_create(&p,NULL,routine,NULL)!=0)
7531 return 1;
7532 (void)pthread_detach(p);
7533 return 0;
7534}
7535
7536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007537if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538 ac_cv_kpthread=yes
7539else
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7543 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544fi
7545
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546CC="$ac_save_cc"
7547fi
7548
Matthias Kloseb9621712010-04-24 17:59:49 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7550$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551fi
7552
7553if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7554then
7555# -Kthread, if available, provides the right #defines
7556# and linker options to make pthread_create available
7557# Some compilers won't report that they do not support -Kthread,
7558# so we need to run a program to see whether it really made the
7559# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7561$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007562if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564else
7565 ac_save_cc="$CC"
7566CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007567if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568 ac_cv_kthread=no
7569else
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571/* end confdefs.h. */
7572
Stefan Krah7dba5942012-11-22 22:49:11 +01007573#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574#include <pthread.h>
7575
7576void* routine(void* p){return NULL;}
7577
7578int main(){
7579 pthread_t p;
7580 if(pthread_create(&p,NULL,routine,NULL)!=0)
7581 return 1;
7582 (void)pthread_detach(p);
7583 return 0;
7584}
7585
7586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007587if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588 ac_cv_kthread=yes
7589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7593 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594fi
7595
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596CC="$ac_save_cc"
7597fi
7598
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7600$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601fi
7602
7603if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7604then
7605# -pthread, if available, provides the right #defines
7606# and linker options to make pthread_create available
7607# Some compilers won't report that they do not support -pthread,
7608# so we need to run a program to see whether it really made the
7609# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7611$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007612if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614else
7615 ac_save_cc="$CC"
7616CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007617if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618 ac_cv_pthread=no
7619else
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621/* end confdefs.h. */
7622
Stefan Krah7dba5942012-11-22 22:49:11 +01007623#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624#include <pthread.h>
7625
7626void* routine(void* p){return NULL;}
7627
7628int main(){
7629 pthread_t p;
7630 if(pthread_create(&p,NULL,routine,NULL)!=0)
7631 return 1;
7632 (void)pthread_detach(p);
7633 return 0;
7634}
7635
7636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007637if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638 ac_cv_pthread=yes
7639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644fi
7645
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646CC="$ac_save_cc"
7647fi
7648
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7650$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651fi
7652
7653# If we have set a CC compiler flag for thread support then
7654# check if it works for CXX, too.
7655ac_cv_cxx_thread=no
7656if test ! -z "$CXX"
7657then
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7659$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660ac_save_cxx="$CXX"
7661
7662if test "$ac_cv_kpthread" = "yes"
7663then
7664 CXX="$CXX -Kpthread"
7665 ac_cv_cxx_thread=yes
7666elif test "$ac_cv_kthread" = "yes"
7667then
7668 CXX="$CXX -Kthread"
7669 ac_cv_cxx_thread=yes
7670elif test "$ac_cv_pthread" = "yes"
7671then
7672 CXX="$CXX -pthread"
7673 ac_cv_cxx_thread=yes
7674fi
7675
7676if test $ac_cv_cxx_thread = yes
7677then
7678 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7679 $CXX -c conftest.$ac_ext 2>&5
7680 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7681 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7682 then
7683 ac_cv_cxx_thread=yes
7684 else
7685 ac_cv_cxx_thread=no
7686 fi
7687 rm -fr conftest*
7688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7690$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691fi
7692CXX="$ac_save_cxx"
7693
7694
7695# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7697$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007698if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702/* end confdefs.h. */
7703#include <stdlib.h>
7704#include <stdarg.h>
7705#include <string.h>
7706#include <float.h>
7707
7708int
7709main ()
7710{
7711
7712 ;
7713 return 0;
7714}
7715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007716if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717 ac_cv_header_stdc=yes
7718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7722
7723if test $ac_cv_header_stdc = yes; then
7724 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726/* end confdefs.h. */
7727#include <string.h>
7728
7729_ACEOF
7730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 $EGREP "memchr" >/dev/null 2>&1; then :
7732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007733else
7734 ac_cv_header_stdc=no
7735fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007736rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737
7738fi
7739
7740if test $ac_cv_header_stdc = yes; then
7741 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007743/* end confdefs.h. */
7744#include <stdlib.h>
7745
7746_ACEOF
7747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 $EGREP "free" >/dev/null 2>&1; then :
7749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750else
7751 ac_cv_header_stdc=no
7752fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007753rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754
7755fi
7756
7757if test $ac_cv_header_stdc = yes; then
7758 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007760 :
7761else
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763/* end confdefs.h. */
7764#include <ctype.h>
7765#include <stdlib.h>
7766#if ((' ' & 0x0FF) == 0x020)
7767# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7768# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7769#else
7770# define ISLOWER(c) \
7771 (('a' <= (c) && (c) <= 'i') \
7772 || ('j' <= (c) && (c) <= 'r') \
7773 || ('s' <= (c) && (c) <= 'z'))
7774# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7775#endif
7776
7777#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7778int
7779main ()
7780{
7781 int i;
7782 for (i = 0; i < 256; i++)
7783 if (XOR (islower (i), ISLOWER (i))
7784 || toupper (i) != TOUPPER (i))
7785 return 2;
7786 return 0;
7787}
7788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007789if ac_fn_c_try_run "$LINENO"; then :
7790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796fi
7797
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798fi
7799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7801$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802if test $ac_cv_header_stdc = yes; then
7803
Matthias Kloseb9621712010-04-24 17:59:49 +00007804$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805
7806fi
7807
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007808for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007809fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007810ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007811sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007812unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007813poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007814sys/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 +01007815sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007816sys/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 +01007817sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007818sys/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 -07007819libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007820linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007821sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007822do :
7823 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7824ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007825if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007827#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007828_ACEOF
7829
7830fi
7831
Guido van Rossum627b2d71993-12-24 10:39:16 +00007832done
7833
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007834ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007835for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7838$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007839if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007841else
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007844#include <sys/types.h>
7845#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007846
Martin v. Löwis11437992002-04-12 09:54:03 +00007847int
7848main ()
7849{
7850if ((DIR *) 0)
7851return 0;
7852 ;
7853 return 0;
7854}
7855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007856if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007858else
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863eval ac_res=\$$as_ac_Header
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7865$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007866if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007868#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007869_ACEOF
7870
7871ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007872fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007874done
7875# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7876if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7878$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007879if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007881else
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886/* Override any GCC internal prototype to avoid an error.
7887 Use char because int might match the return type of a GCC
7888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007889#ifdef __cplusplus
7890extern "C"
7891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007892char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007893int
7894main ()
7895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ;
7898 return 0;
7899}
7900_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901for ac_lib in '' dir; do
7902 if test -z "$ac_lib"; then
7903 ac_res="none required"
7904 else
7905 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911rm -f core conftest.err conftest.$ac_objext \
7912 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007913 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916done
Victor Stinnere0be4232011-10-25 13:06:09 +02007917if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919else
7920 ac_cv_search_opendir=no
7921fi
7922rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007923LIBS=$ac_func_search_save_LIBS
7924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7926$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007928if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007930
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007931fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007932
Michael W. Hudson54241132001-12-07 15:38:26 +00007933else
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7935$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007936if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007938else
7939 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943/* Override any GCC internal prototype to avoid an error.
7944 Use char because int might match the return type of a GCC
7945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007946#ifdef __cplusplus
7947extern "C"
7948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007949char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007950int
7951main ()
7952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ;
7955 return 0;
7956}
7957_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958for ac_lib in '' x; do
7959 if test -z "$ac_lib"; then
7960 ac_res="none required"
7961 else
7962 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968rm -f core conftest.err conftest.$ac_objext \
7969 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007970 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973done
Victor Stinnere0be4232011-10-25 13:06:09 +02007974if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976else
7977 ac_cv_search_opendir=no
7978fi
7979rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007980LIBS=$ac_func_search_save_LIBS
7981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7983$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007985if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007988fi
7989
7990fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007991
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7993$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007994if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007996else
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007999#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008000int
8001main ()
8002{
8003return makedev(0, 0);
8004 ;
8005 return 0;
8006}
8007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008009 ac_cv_header_sys_types_h_makedev=yes
8010else
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013rm -f core conftest.err conftest.$ac_objext \
8014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008015
8016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8018$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008019
8020if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008021ac_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 +02008022if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008023
Matthias Kloseb9621712010-04-24 17:59:49 +00008024$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008025
8026fi
8027
8028
8029
8030 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 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 +02008032if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008033
Matthias Kloseb9621712010-04-24 17:59:49 +00008034$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008035
8036fi
8037
8038
8039 fi
8040fi
8041
Michael W. Hudson54241132001-12-07 15:38:26 +00008042
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008043# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8044# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8045SAVE_CFLAGS=$CFLAGS
8046CFLAGS="-std=c99 $CFLAGS"
8047for ac_header in bluetooth/bluetooth.h
8048do :
8049 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8050if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8051 cat >>confdefs.h <<_ACEOF
8052#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8053_ACEOF
8054
8055fi
8056
8057done
8058
8059CFLAGS=$SAVE_CFLAGS
8060
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008061# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8062for ac_header in net/if.h
8063do :
8064 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8065#ifdef STDC_HEADERS
8066# include <stdlib.h>
8067# include <stddef.h>
8068#else
8069# ifdef HAVE_STDLIB_H
8070# include <stdlib.h>
8071# endif
8072#endif
8073#ifdef HAVE_SYS_SOCKET_H
8074# include <sys/socket.h>
8075#endif
8076
8077"
Victor Stinnere0be4232011-10-25 13:06:09 +02008078if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008079 cat >>confdefs.h <<_ACEOF
8080#define HAVE_NET_IF_H 1
8081_ACEOF
8082
8083fi
8084
8085done
8086
8087
Martin v. Löwis11017b12006-01-14 18:12:57 +00008088# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008089for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008090do :
8091 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 +00008092#ifdef HAVE_ASM_TYPES_H
8093#include <asm/types.h>
8094#endif
8095#ifdef HAVE_SYS_SOCKET_H
8096#include <sys/socket.h>
8097#endif
8098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099"
Victor Stinnere0be4232011-10-25 13:06:09 +02008100if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008101 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008102#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008103_ACEOF
8104
8105fi
8106
8107done
8108
8109
Charles-François Natali47413c12011-10-06 19:47:44 +02008110# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008111for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008112do :
8113 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8114ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8115#ifdef HAVE_SYS_SOCKET_H
8116#include <sys/socket.h>
8117#endif
8118
8119"
8120if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8121 cat >>confdefs.h <<_ACEOF
8122#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8123_ACEOF
8124
8125fi
8126
8127done
8128
8129
Guido van Rossum627b2d71993-12-24 10:39:16 +00008130# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008131was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8133$as_echo_n "checking for clock_t in time.h... " >&6; }
8134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008135/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008136#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
8138_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008141 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008142else
Martin v. Löwis11437992002-04-12 09:54:03 +00008143
8144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008146
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008147
Guido van Rossum627b2d71993-12-24 10:39:16 +00008148fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008149rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008150
Matthias Kloseb9621712010-04-24 17:59:49 +00008151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8152$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8155$as_echo_n "checking for makedev... " >&6; }
8156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008157/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008158
Jesus Cea740f53a2010-04-28 11:35:30 +00008159#if defined(MAJOR_IN_MKDEV)
8160#include <sys/mkdev.h>
8161#elif defined(MAJOR_IN_SYSMACROS)
8162#include <sys/sysmacros.h>
8163#else
8164#include <sys/types.h>
8165#endif
8166
Neal Norwitz11690112002-07-30 01:08:28 +00008167int
8168main ()
8169{
Jesus Cea740f53a2010-04-28 11:35:30 +00008170
8171 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008172 ;
8173 return 0;
8174}
Matthias Kloseb159a552010-04-25 21:00:44 +00008175
Neal Norwitz11690112002-07-30 01:08:28 +00008176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008177if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008178 ac_cv_has_makedev=yes
8179else
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182rm -f core conftest.err conftest.$ac_objext \
8183 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8185$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008186if test "$ac_cv_has_makedev" = "yes"; then
8187
Matthias Kloseb9621712010-04-24 17:59:49 +00008188$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008189
8190fi
8191
Christian Heimes985ecdc2013-11-20 11:46:18 +01008192# byte swapping
8193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8194$as_echo_n "checking for le64toh... " >&6; }
8195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8196/* end confdefs.h. */
8197
8198#ifdef HAVE_ENDIAN_H
8199#include <endian.h>
8200#elif defined(HAVE_SYS_ENDIAN_H)
8201#include <sys/endian.h>
8202#endif
8203
8204int
8205main ()
8206{
8207
8208 le64toh(1)
8209 ;
8210 return 0;
8211}
8212
8213_ACEOF
8214if ac_fn_c_try_link "$LINENO"; then :
8215 ac_cv_has_le64toh=yes
8216else
8217 ac_cv_has_le64toh=no
8218fi
8219rm -f core conftest.err conftest.$ac_objext \
8220 conftest$ac_exeext conftest.$ac_ext
8221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8222$as_echo "$ac_cv_has_le64toh" >&6; }
8223if test "$ac_cv_has_le64toh" = "yes"; then
8224
8225$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8226
8227fi
8228
Martin v. Löwis399a6892002-10-04 10:22:02 +00008229use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008230# Don't use largefile support for GNU/Hurd
8231case $ac_sys_system in GNU*)
8232 use_lfs=no
8233esac
8234
Martin v. Löwis399a6892002-10-04 10:22:02 +00008235if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008236# Two defines needed to enable largefile support on various platforms
8237# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008238case $ac_sys_system/$ac_sys_release in
8239AIX*)
8240
8241$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8242
8243 ;;
8244esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
8248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008250
Martin v. Löwis399a6892002-10-04 10:22:02 +00008251fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008252
Guido van Rossum84e7b241996-08-19 21:59:00 +00008253# Add some code to confdefs.h so that the test for off_t works on SCO
8254cat >> confdefs.h <<\EOF
8255#if defined(SCO_DS)
8256#undef _OFF_T
8257#endif
8258EOF
8259
Guido van Rossumef2255b2000-03-10 22:30:29 +00008260# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008261ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008262if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008263
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008264else
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
8266cat >>confdefs.h <<_ACEOF
8267#define mode_t int
8268_ACEOF
8269
8270fi
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008273if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008274
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008275else
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008279_ACEOF
8280
8281fi
8282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008284if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008286else
Martin v. Löwis11437992002-04-12 09:54:03 +00008287
8288cat >>confdefs.h <<_ACEOF
8289#define pid_t int
8290_ACEOF
8291
8292fi
8293
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008296#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008297_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008300if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008301
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008302else
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
8304cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
8307
8308fi
8309
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8311$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008312if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008316/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008317#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
8319_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008322 ac_cv_type_uid_t=yes
8323else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008324 ac_cv_type_uid_t=no
8325fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008326rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8330$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008331if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337
8338fi
8339
Mark Dickinson983bc162012-12-02 12:11:38 +00008340
Matthias Kloseb9621712010-04-24 17:59:49 +00008341ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008345
8346fi
8347
Stefan Krah1919b7e2012-03-21 18:25:23 +01008348ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8349if test "x$ac_cv_type___uint128_t" = xyes; then :
8350
8351$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8352
8353fi
8354
Jack Jansendd19cf82001-12-06 22:36:17 +00008355
Michael W. Hudson54241132001-12-07 15:38:26 +00008356# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008357# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358# The cast to long int works around a bug in the HP C Compiler
8359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8361# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8363$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008364if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 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 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 if test "$ac_cv_type_int" = yes; then
8371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008373as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008374See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375 else
8376 ac_cv_sizeof_int=0
8377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8382$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383
8384
8385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008387#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008388_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008389
8390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8396$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 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 +00008401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 if test "$ac_cv_type_long" = yes; then
8404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008406as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008407See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 else
8409 ac_cv_sizeof_long=0
8410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8415$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416
8417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008420#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008422
8423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424# The cast to long int works around a bug in the HP C Compiler
8425# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8426# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8427# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8429$as_echo_n "checking size of long long... " >&6; }
8430if ${ac_cv_sizeof_long_long+:} false; then :
8431 $as_echo_n "(cached) " >&6
8432else
8433 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8434
8435else
8436 if test "$ac_cv_type_long_long" = yes; then
8437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8439as_fn_error 77 "cannot compute sizeof (long long)
8440See \`config.log' for more details" "$LINENO" 5; }
8441 else
8442 ac_cv_sizeof_long_long=0
8443 fi
8444fi
8445
8446fi
8447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8448$as_echo "$ac_cv_sizeof_long_long" >&6; }
8449
8450
8451
8452cat >>confdefs.h <<_ACEOF
8453#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8454_ACEOF
8455
8456
8457# The cast to long int works around a bug in the HP C Compiler
8458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8460# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8462$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 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 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 if test "$ac_cv_type_void_p" = yes; then
8470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008472as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008473See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 else
8475 ac_cv_sizeof_void_p=0
8476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8481$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482
8483
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008486#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008488
8489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8495$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 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 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_short" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_short=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8514$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008519#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008521
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8528$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_float" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_float=0
8542 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8547$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008552#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008553_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008554
8555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8561$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 +00008566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if test "$ac_cv_type_double" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008571as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008572See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 else
8574 ac_cv_sizeof_double=0
8575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8580$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581
8582
8583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008585#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008586_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008587
8588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8594$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 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 +00008599
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 if test "$ac_cv_type_fpos_t" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008604as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008605See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 else
8607 ac_cv_sizeof_fpos_t=0
8608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8613$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008618#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008620
Michael W. Hudson54241132001-12-07 15:38:26 +00008621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8627$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008628if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 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 +00008632
Martin v. Löwis18e16552006-02-15 17:27:45 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 if test "$ac_cv_type_size_t" = yes; then
8635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008637as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008638See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008639 else
8640 ac_cv_sizeof_size_t=0
8641 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643
Martin v. Löwis18e16552006-02-15 17:27:45 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8646$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647
8648
8649
Martin v. Löwis18e16552006-02-15 17:27:45 +00008650cat >>confdefs.h <<_ACEOF
8651#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8652_ACEOF
8653
8654
Christian Heimes400adb02008-02-01 08:12:03 +00008655# The cast to long int works around a bug in the HP C Compiler
8656# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8657# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8658# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8660$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008663else
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 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 +00008665
Christian Heimes400adb02008-02-01 08:12:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 if test "$ac_cv_type_pid_t" = yes; then
8668 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008670as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008671See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008672 else
8673 ac_cv_sizeof_pid_t=0
8674 fi
8675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676
Christian Heimes400adb02008-02-01 08:12:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8679$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008680
8681
8682
8683cat >>confdefs.h <<_ACEOF
8684#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8685_ACEOF
8686
8687
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008688# The cast to long int works around a bug in the HP C Compiler
8689# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8690# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8691# This bug is HP SR number 8606223364.
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8693$as_echo_n "checking size of uintptr_t... " >&6; }
8694if ${ac_cv_sizeof_uintptr_t+:} false; then :
8695 $as_echo_n "(cached) " >&6
8696else
8697 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8698
8699else
8700 if test "$ac_cv_type_uintptr_t" = yes; then
8701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8703as_fn_error 77 "cannot compute sizeof (uintptr_t)
8704See \`config.log' for more details" "$LINENO" 5; }
8705 else
8706 ac_cv_sizeof_uintptr_t=0
8707 fi
8708fi
8709
8710fi
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8712$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8713
8714
8715
8716cat >>confdefs.h <<_ACEOF
8717#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8718_ACEOF
8719
8720
Michael W. Hudson54241132001-12-07 15:38:26 +00008721
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8723$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008724have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008726/* end confdefs.h. */
8727
8728int
8729main ()
8730{
8731long double x; x = (long double)0;
8732 ;
8733 return 0;
8734}
8735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008736if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008737
8738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008740
8741 have_long_double=yes
8742
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8746$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008748# The cast to long int works around a bug in the HP C Compiler
8749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8751# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8753$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008754if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008756else
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 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 +00008758
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 if test "$ac_cv_type_long_double" = yes; then
8761 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008763as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008764See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008765 else
8766 ac_cv_sizeof_long_double=0
8767 fi
8768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8772$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008773
8774
8775
8776cat >>confdefs.h <<_ACEOF
8777#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8778_ACEOF
8779
8780
8781fi
8782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783# The cast to long int works around a bug in the HP C Compiler
8784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8786# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8788$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008789if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 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 +00008793
Thomas Woutersb2137042007-02-01 18:02:27 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 if test "$ac_cv_type__Bool" = yes; then
8796 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008798as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008799See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 else
8801 ac_cv_sizeof__Bool=0
8802 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804
Thomas Woutersb2137042007-02-01 18:02:27 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8807$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808
8809
8810
Thomas Woutersb2137042007-02-01 18:02:27 +00008811cat >>confdefs.h <<_ACEOF
8812#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8813_ACEOF
8814
8815
Thomas Woutersb2137042007-02-01 18:02:27 +00008816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008817# The cast to long int works around a bug in the HP C Compiler
8818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8822$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008823if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825else
Matthias Kloseb9621712010-04-24 17:59:49 +00008826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008827#ifdef HAVE_SYS_TYPES_H
8828#include <sys/types.h>
8829#endif
8830
Matthias Kloseb9621712010-04-24 17:59:49 +00008831"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008833else
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 if test "$ac_cv_type_off_t" = yes; then
8835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008837as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008838See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839 else
8840 ac_cv_sizeof_off_t=0
8841 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8846$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848
8849
Martin v. Löwis11437992002-04-12 09:54:03 +00008850cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008851#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008852_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008853
Michael W. Hudson54241132001-12-07 15:38:26 +00008854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855
Matthias Kloseb9621712010-04-24 17:59:49 +00008856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8857$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008858if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008859 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008862
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8864$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865else
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008868fi
8869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870# The cast to long int works around a bug in the HP C Compiler
8871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8875$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008876if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878else
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008880#ifdef HAVE_SYS_TYPES_H
8881#include <sys/types.h>
8882#endif
8883#ifdef HAVE_TIME_H
8884#include <time.h>
8885#endif
8886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 if test "$ac_cv_type_time_t" = yes; then
8891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008893as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008894See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008895 else
8896 ac_cv_sizeof_time_t=0
8897 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8902$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
8905
Martin v. Löwis11437992002-04-12 09:54:03 +00008906cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008907#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008908_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008909
Michael W. Hudson54241132001-12-07 15:38:26 +00008910
8911
Trent Mick635f6fb2000-08-23 21:33:05 +00008912# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008913ac_save_cc="$CC"
8914if test "$ac_cv_kpthread" = "yes"
8915then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008916elif test "$ac_cv_kthread" = "yes"
8917then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008918elif test "$ac_cv_pthread" = "yes"
8919then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008920fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008921
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8923$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008924have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008926/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
8928 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008929int
8930main ()
8931{
Guido van Rossum12580492000-09-24 16:47:19 +00008932pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ;
8934 return 0;
8935}
Matthias Kloseb159a552010-04-25 21:00:44 +00008936
Martin v. Löwis11437992002-04-12 09:54:03 +00008937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008938if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008939 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8943$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008944if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008945 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8947# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8948# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8950$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008951if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008953else
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955#ifdef HAVE_PTHREAD_H
8956#include <pthread.h>
8957#endif
8958
Matthias Kloseb9621712010-04-24 17:59:49 +00008959"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008961else
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 if test "$ac_cv_type_pthread_t" = yes; then
8963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008965as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008966See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967 else
8968 ac_cv_sizeof_pthread_t=0
8969 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008971
Trent Mick635f6fb2000-08-23 21:33:05 +00008972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8974$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976
8977
Martin v. Löwis11437992002-04-12 09:54:03 +00008978cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008979#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008980_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982
Trent Mick635f6fb2000-08-23 21:33:05 +00008983fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008984CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008985
Michael W. Hudson54241132001-12-07 15:38:26 +00008986
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008987case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008988 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008989 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8990 ;;
8991 Darwin/*)
8992 OTHER_LIBTOOL_OPT=""
8993 ;;
8994esac
8995
8996
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008997
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008998case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008999 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009000 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9001 if test "${enable_universalsdk}"; then
9002 :
9003 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009004 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009005 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009006 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009007 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009008 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009009 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009010 if test ${gcc_version} '<' 4.0
9011 then
9012 LIBTOOL_CRUFT="-lcc_dynamic"
9013 else
9014 LIBTOOL_CRUFT=""
9015 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009017 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009018else
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009020/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009021
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009022 #include <unistd.h>
9023 int main(int argc, char*argv[])
9024 {
9025 if (sizeof(long) == 4) {
9026 return 0;
9027 } else {
9028 return 1;
9029 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009030 }
9031
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009033if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009034 ac_osx_32bit=yes
9035else
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9039 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040fi
9041
9042
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009044 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009045 i386)
9046 MACOSX_DEFAULT_ARCH="i386"
9047 ;;
9048 ppc)
9049 MACOSX_DEFAULT_ARCH="ppc"
9050 ;;
9051 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009052 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009053 ;;
9054 esac
9055 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009056 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057 i386)
9058 MACOSX_DEFAULT_ARCH="x86_64"
9059 ;;
9060 ppc)
9061 MACOSX_DEFAULT_ARCH="ppc64"
9062 ;;
9063 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009064 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009065 ;;
9066 esac
9067
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009068 fi
9069
9070 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009071 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009072 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9075$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009076if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009077then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009078 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009080 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009081
Matthias Kloseb9621712010-04-24 17:59:49 +00009082$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9085$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009086 if test $enable_shared = "yes"
9087 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009088 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 +00009089 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009090else
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093fi
9094
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9096$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009097case $ac_sys_system/$ac_sys_release in
9098 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009099
Matthias Kloseb9621712010-04-24 17:59:49 +00009100$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9103$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009104 ;;
9105 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9107$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009108 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009109esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110
Guido van Rossum0a516c91994-09-12 10:58:40 +00009111# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009112
Michael W. Hudson54241132001-12-07 15:38:26 +00009113
9114
9115
9116
Benjamin Peterson99f03762010-04-11 22:15:28 +00009117
Thomas Wouters477c8d52006-05-27 19:21:47 +00009118
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009119# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9120# -- usually .so, .sl on HP-UX, .dll on Cygwin
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9122$as_echo_n "checking the extension of shared libraries... " >&6; }
9123if test -z "$SHLIB_SUFFIX"; then
9124 case $ac_sys_system in
9125 hp*|HP*)
9126 case `uname -m` in
9127 ia64) SHLIB_SUFFIX=.so;;
9128 *) SHLIB_SUFFIX=.sl;;
9129 esac
9130 ;;
9131 CYGWIN*) SHLIB_SUFFIX=.dll;;
9132 *) SHLIB_SUFFIX=.so;;
9133 esac
9134fi
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9136$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009137
Guido van Rossum0a516c91994-09-12 10:58:40 +00009138# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009139# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009140# (Shared libraries in this instance are shared modules to be loaded into
9141# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9143$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009144if test -z "$LDSHARED"
9145then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009146 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009147 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009148 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009149 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009150 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009151 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009152 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009154 if test "$GCC" = "yes" ; then
9155 LDSHARED='$(CC) -shared'
9156 LDCXXSHARED='$(CXX) -shared'
9157 else
9158 LDSHARED='$(CC) -G'
9159 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009160 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009161 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 if test "$GCC" = "yes" ; then
9163 LDSHARED='$(CC) -shared'
9164 LDCXXSHARED='$(CXX) -shared'
9165 else
9166 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009167 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009168 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009169 LDSHARED='$(CC) -bundle'
9170 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009171 if test "$enable_framework" ; then
9172 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009173 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9174 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009175 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009176 else
9177 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009178 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009180 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009181 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009182 LDSHARED='$(CC) -bundle'
9183 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009184 if test "$enable_framework" ; then
9185 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009186 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9187 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009188 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009189 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009190 # No framework, use the Python app as bundle-loader
9191 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009192 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009193 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009194 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009195 Darwin/*)
9196 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9197 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009198
Ned Deily36820b62014-06-25 13:44:22 -07009199 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9200 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9201 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9202 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9203 if test ${dep_target_major} -eq 10 && \
9204 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009205 then
Ned Deily36820b62014-06-25 13:44:22 -07009206 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -bundle'
9208 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009209 if test "$enable_framework" ; then
9210 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009211 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9212 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009214 else
9215 # No framework, use the Python app as bundle-loader
9216 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9217 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009219 fi
Ned Deily36820b62014-06-25 13:44:22 -07009220 else
9221 # building for OS X 10.3 and later
9222 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9223 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9224 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009225 fi
9226 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 Linux*|GNU*|QNX*)
9228 LDSHARED='$(CC) -shared'
9229 LDCXXSHARED='$(CXX) -shared';;
9230 BSD/OS*/4*)
9231 LDSHARED="gcc -shared"
9232 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009233 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009234 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009235 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009236 LDSHARED='$(CC) -shared'
9237 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009238 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009239 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009240 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009241 OpenBSD*)
9242 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9243 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009244 LDSHARED='$(CC) -shared $(CCSHARED)'
9245 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009246 else
9247 case `uname -r` in
9248 [01].* | 2.[0-7] | 2.[0-7].*)
9249 LDSHARED="ld -Bshareable ${LDFLAGS}"
9250 ;;
9251 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009252 LDSHARED='$(CC) -shared $(CCSHARED)'
9253 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009254 ;;
9255 esac
9256 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009257 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009258 LDSHARED='$(CC) -shared'
9259 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009260 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009261 if test "$GCC" = "yes" ; then
9262 LDSHARED='$(CC) -shared'
9263 LDCXXSHARED='$(CXX) -shared'
9264 else
9265 LDSHARED='$(CC) -G'
9266 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009267 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009268 SCO_SV*)
9269 LDSHARED='$(CC) -Wl,-G,-Bexport'
9270 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9271 CYGWIN*)
9272 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9273 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009274 *) LDSHARED="ld";;
9275 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9278$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009279LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009280BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009281# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009282# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9284$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009285if test -z "$CCSHARED"
9286then
Guido van Rossum07397971997-04-29 21:49:50 +00009287 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009288 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009289 then CCSHARED="-fPIC";
9290 elif test `uname -p` = sparc;
9291 then CCSHARED="-xcode=pic32";
9292 else CCSHARED="-Kpic";
9293 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009294 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009295 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009296 else CCSHARED="+z";
9297 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009298 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009299 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009300 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009301 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009302 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009303 if test "$GCC" = "yes"
9304 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009305 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009306 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009307 SCO_SV*)
9308 if test "$GCC" = "yes"
9309 then CCSHARED="-fPIC"
9310 else CCSHARED="-Kpic -belf"
9311 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009312 IRIX*/6*) case $CC in
9313 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009314 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009315 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9319$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009321# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9323$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009324if test -z "$LINKFORSHARED"
9325then
Guido van Rossum07397971997-04-29 21:49:50 +00009326 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009327 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009328 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009329 LINKFORSHARED="-Wl,-E -Wl,+s";;
9330# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009331 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009332 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009333 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009334 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009336 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009337
9338 # Issue #18075: the default maximum stack size (8MBytes) is too
9339 # small for the default recursion limit. Increase the stack size
9340 # to ensure that tests don't crash
9341 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9342
Jack Jansene578a632001-08-15 01:27:14 +00009343 if test "$enable_framework"
9344 then
Jack Jansenda49e192005-01-07 13:08:22 +00009345 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009346 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009347 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009348 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009349 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009350 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009351 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009352 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9353 then
9354 LINKFORSHARED="-Wl,--export-dynamic"
9355 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009356 SunOS/5*) case $CC in
9357 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009358 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009359 then
9360 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009361 fi;;
9362 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009363 CYGWIN*)
9364 if test $enable_shared = "no"
9365 then
9366 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9367 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009368 QNX*)
9369 # -Wl,-E causes the symbols to be added to the dynamic
9370 # symbol table so that they can be found when a module
9371 # is loaded. -N 2048K causes the stack size to be set
9372 # to 2048 kilobytes so that the stack doesn't overflow
9373 # when running test_compile.py.
9374 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009375 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9378$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009379
Michael W. Hudson54241132001-12-07 15:38:26 +00009380
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009381
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9383$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009384if test ! "$LIBRARY" = "$LDLIBRARY"
9385then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009386 case $ac_sys_system in
9387 CYGWIN*)
9388 # Cygwin needs CCSHARED when building extension DLLs
9389 # but not when building the interpreter DLL.
9390 CFLAGSFORSHARED='';;
9391 *)
9392 CFLAGSFORSHARED='$(CCSHARED)'
9393 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9396$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009397
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009398# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9399# library (with --enable-shared).
9400# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009401# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9402# if it is not required, since it creates a dependency of the shared library
9403# to LIBS. This, in turn, means that applications linking the shared libpython
9404# don't need to link LIBS explicitly. The default should be only changed
9405# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9408$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009409case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009410 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009411 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9414$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009415
9416
Guido van Rossum627b2d71993-12-24 10:39:16 +00009417# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9419$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009421 $as_echo_n "(cached) " >&6
9422else
9423 ac_check_lib_save_LIBS=$LIBS
9424LIBS="-lsendfile $LIBS"
9425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426/* end confdefs.h. */
9427
9428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
9431#ifdef __cplusplus
9432extern "C"
9433#endif
9434char sendfile ();
9435int
9436main ()
9437{
9438return sendfile ();
9439 ;
9440 return 0;
9441}
9442_ACEOF
9443if ac_fn_c_try_link "$LINENO"; then :
9444 ac_cv_lib_sendfile_sendfile=yes
9445else
9446 ac_cv_lib_sendfile_sendfile=no
9447fi
9448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
9450LIBS=$ac_check_lib_save_LIBS
9451fi
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9453$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009455 cat >>confdefs.h <<_ACEOF
9456#define HAVE_LIBSENDFILE 1
9457_ACEOF
9458
9459 LIBS="-lsendfile $LIBS"
9460
9461fi
9462
Matthias Kloseb9621712010-04-24 17:59:49 +00009463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9464$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009465if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009467else
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473/* Override any GCC internal prototype to avoid an error.
9474 Use char because int might match the return type of a GCC
9475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476#ifdef __cplusplus
9477extern "C"
9478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009479char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009480int
9481main ()
9482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ;
9485 return 0;
9486}
9487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009490else
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009493rm -f core conftest.err conftest.$ac_objext \
9494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9498$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 cat >>confdefs.h <<_ACEOF
9501#define HAVE_LIBDL 1
9502_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009504 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506fi
9507 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9509$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009510if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009512else
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009514LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518/* Override any GCC internal prototype to avoid an error.
9519 Use char because int might match the return type of a GCC
9520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009521#ifdef __cplusplus
9522extern "C"
9523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009524char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009525int
9526main ()
9527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ;
9530 return 0;
9531}
9532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009534 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535else
Matthias Kloseb9621712010-04-24 17:59:49 +00009536 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538rm -f core conftest.err conftest.$ac_objext \
9539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009540LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9543$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 cat >>confdefs.h <<_ACEOF
9546#define HAVE_LIBDLD 1
9547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009548
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009549 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009550
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551fi
9552 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009553
Georg Brandlb1441c72009-01-03 22:33:39 +00009554# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009555if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9557$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009558if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009560else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009561 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565/* Override any GCC internal prototype to avoid an error.
9566 Use char because int might match the return type of a GCC
9567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009568#ifdef __cplusplus
9569extern "C"
9570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009571char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009572int
9573main ()
9574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ;
9577 return 0;
9578}
9579_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580for ac_lib in '' pthread rt posix4; do
9581 if test -z "$ac_lib"; then
9582 ac_res="none required"
9583 else
9584 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009585 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009590rm -f core conftest.err conftest.$ac_objext \
9591 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009592 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595done
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598else
9599 ac_cv_search_sem_init=no
9600fi
9601rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009602LIBS=$ac_func_search_save_LIBS
9603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9605$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009607if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009609
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009610fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009611 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009612 # posix4 on Solaris 2.6
9613 # pthread (first!) on Linux
9614fi
9615
Martin v. Löwis19d17342003-06-14 21:03:05 +00009616# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9618$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009619if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009621else
9622 ac_check_lib_save_LIBS=$LIBS
9623LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627/* Override any GCC internal prototype to avoid an error.
9628 Use char because int might match the return type of a GCC
9629 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630#ifdef __cplusplus
9631extern "C"
9632#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009633char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009634int
9635main ()
9636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009638 ;
9639 return 0;
9640}
9641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009642if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643 ac_cv_lib_intl_textdomain=yes
9644else
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009647rm -f core conftest.err conftest.$ac_objext \
9648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009649LIBS=$ac_check_lib_save_LIBS
9650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9652$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009653if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654
Matthias Kloseb9621712010-04-24 17:59:49 +00009655$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656
Brett Cannonc6d936e2009-06-07 20:09:53 +00009657 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658fi
9659
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009660
9661# checks for system dependent C++ extensions support
9662case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9664$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009666/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009667
Georg Brandl59e87bd2011-02-15 19:48:59 +00009668 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009669int
9670main ()
9671{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009672loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ;
9674 return 0;
9675}
Matthias Kloseb159a552010-04-25 21:00:44 +00009676
Martin v. Löwis11437992002-04-12 09:54:03 +00009677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009678if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
Matthias Kloseb159a552010-04-25 21:00:44 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009684$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009685
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009686else
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009689$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009690
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009692rm -f core conftest.err conftest.$ac_objext \
9693 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009694 *) ;;
9695esac
9696
Christian Heimes985ecdc2013-11-20 11:46:18 +01009697# check for systems that require aligned memory access
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9699$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009700if ${ac_cv_aligned_required+:} false; then :
9701 $as_echo_n "(cached) " >&6
9702else
9703 if test "$cross_compiling" = yes; then :
9704 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009705else
9706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9707/* end confdefs.h. */
9708
9709int main()
9710{
9711 char s[16];
9712 int i, *p1, *p2;
9713 for (i=0; i < 16; i++)
9714 s[i] = i;
9715 p1 = (int*)(s+1);
9716 p2 = (int*)(s+2);
9717 if (*p1 == *p2)
9718 return 1;
9719 return 0;
9720}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009721_ACEOF
9722if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009723 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009724else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009725 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009726fi
9727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9728 conftest.$ac_objext conftest.beam conftest.$ac_ext
9729fi
9730
9731
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009732fi
9733
9734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9735$as_echo "$ac_cv_aligned_required" >&6; }
9736if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009737
9738$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9739
9740fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009741
9742# str, bytes and memoryview hash algorithm
9743
9744
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9746$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9747
9748# Check whether --with-hash_algorithm was given.
9749if test "${with_hash_algorithm+set}" = set; then :
9750 withval=$with_hash_algorithm;
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9752$as_echo "$withval" >&6; }
9753case "$withval" in
9754 siphash24)
9755 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9756
9757 ;;
9758 fnv)
9759 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9760
9761 ;;
9762 *)
9763 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9764 ;;
9765esac
9766
9767else
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9769$as_echo "default" >&6; }
9770fi
9771
9772
Charles-François Natalid30b0222014-05-08 23:08:51 +01009773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9774$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9775
9776# Check whether --with-address_sanitizer was given.
9777if test "${with_address_sanitizer+set}" = set; then :
9778 withval=$with_address_sanitizer;
9779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9780$as_echo "$withval" >&6; }
9781BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9782LDFLAGS="-fsanitize=address $LDFLAGS"
9783
9784else
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
9787fi
9788
9789
Guido van Rossum70c7f481998-03-26 18:44:10 +00009790# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9792$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009793if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009795else
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009797LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801/* Override any GCC internal prototype to avoid an error.
9802 Use char because int might match the return type of a GCC
9803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009804#ifdef __cplusplus
9805extern "C"
9806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009807char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009808int
9809main ()
9810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ;
9813 return 0;
9814}
9815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009817 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009818else
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009821rm -f core conftest.err conftest.$ac_objext \
9822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009823LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9826$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009827if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009828 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009829fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009830 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9832$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009833if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009835else
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009837LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841/* Override any GCC internal prototype to avoid an error.
9842 Use char because int might match the return type of a GCC
9843 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009844#ifdef __cplusplus
9845extern "C"
9846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009847char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009848int
9849main ()
9850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009851return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 ;
9853 return 0;
9854}
9855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009856if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009858else
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009861rm -f core conftest.err conftest.$ac_objext \
9862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009863LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9866$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009867if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009868 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009869fi
9870 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009871
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9873$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009876if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9879$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009880LIBS="$withval $LIBS"
9881
9882else
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9884$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885fi
9886
Guido van Rossum7f43da71994-08-01 12:15:30 +00009887
Victor Stinner8291b5e2015-03-20 16:03:14 +01009888
9889
9890
9891
9892
9893
9894
9895if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9896 if test -n "$ac_tool_prefix"; then
9897 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9898set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9900$as_echo_n "checking for $ac_word... " >&6; }
9901if ${ac_cv_path_PKG_CONFIG+:} false; then :
9902 $as_echo_n "(cached) " >&6
9903else
9904 case $PKG_CONFIG in
9905 [\\/]* | ?:[\\/]*)
9906 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9907 ;;
9908 *)
9909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9910for as_dir in $PATH
9911do
9912 IFS=$as_save_IFS
9913 test -z "$as_dir" && as_dir=.
9914 for ac_exec_ext in '' $ac_executable_extensions; do
9915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9916 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9918 break 2
9919 fi
9920done
9921 done
9922IFS=$as_save_IFS
9923
9924 ;;
9925esac
9926fi
9927PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9928if test -n "$PKG_CONFIG"; then
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9930$as_echo "$PKG_CONFIG" >&6; }
9931else
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933$as_echo "no" >&6; }
9934fi
9935
9936
9937fi
9938if test -z "$ac_cv_path_PKG_CONFIG"; then
9939 ac_pt_PKG_CONFIG=$PKG_CONFIG
9940 # Extract the first word of "pkg-config", so it can be a program name with args.
9941set dummy pkg-config; ac_word=$2
9942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9943$as_echo_n "checking for $ac_word... " >&6; }
9944if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9945 $as_echo_n "(cached) " >&6
9946else
9947 case $ac_pt_PKG_CONFIG in
9948 [\\/]* | ?:[\\/]*)
9949 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9950 ;;
9951 *)
9952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9953for as_dir in $PATH
9954do
9955 IFS=$as_save_IFS
9956 test -z "$as_dir" && as_dir=.
9957 for ac_exec_ext in '' $ac_executable_extensions; do
9958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9959 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9961 break 2
9962 fi
9963done
9964 done
9965IFS=$as_save_IFS
9966
9967 ;;
9968esac
9969fi
9970ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9971if test -n "$ac_pt_PKG_CONFIG"; then
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9973$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9974else
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9976$as_echo "no" >&6; }
9977fi
9978
9979 if test "x$ac_pt_PKG_CONFIG" = x; then
9980 PKG_CONFIG=""
9981 else
9982 case $cross_compiling:$ac_tool_warned in
9983yes:)
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9986ac_tool_warned=yes ;;
9987esac
9988 PKG_CONFIG=$ac_pt_PKG_CONFIG
9989 fi
9990else
9991 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9992fi
9993
9994fi
9995if test -n "$PKG_CONFIG"; then
9996 _pkg_min_version=0.9.0
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9998$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9999 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10001$as_echo "yes" >&6; }
10002 else
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10004$as_echo "no" >&6; }
10005 PKG_CONFIG=""
10006 fi
10007fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010008
10009# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10011$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010012
10013# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010014if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010015 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010016else
10017 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010018fi
10019
10020
Matthias Kloseb9621712010-04-24 17:59:49 +000010021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10022$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010023
10024# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10026$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010027
10028# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010029if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010030 withval=$with_system_ffi;
10031fi
10032
10033
Zachary Waref40d4dd2016-09-17 01:25:24 -050010034if test "$ac_sys_system" = "Darwin"
10035then
10036 case "$with_system_ffi" in
10037 "")
10038 with_system_ffi="no"
10039 ;;
10040 yes|no)
10041 ;;
10042 *)
10043 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10044 ;;
10045 esac
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10047$as_echo "$with_system_ffi" >&6; }
10048else
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10050$as_echo "yes" >&6; }
10051 if test "$with_system_ffi" != ""
10052 then
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10054$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10055 fi
10056 with_system_ffi="yes"
10057fi
Zachary Ware935043d2016-09-09 17:01:21 -070010058
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010059if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010060 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10061else
10062 LIBFFI_INCLUDEDIR=""
10063fi
10064
10065
Stefan Krah60187b52012-03-23 19:06:27 +010010066# Check for use of the system libmpdec library
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10068$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10069
10070# Check whether --with-system_libmpdec was given.
10071if test "${with_system_libmpdec+set}" = set; then :
10072 withval=$with_system_libmpdec;
10073else
10074 with_system_libmpdec="no"
10075fi
10076
10077
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10079$as_echo "$with_system_libmpdec" >&6; }
10080
Benjamin Peterson076ed002010-10-31 17:11:02 +000010081# Check for support for loadable sqlite extensions
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10083$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10084# Check whether --enable-loadable-sqlite-extensions was given.
10085if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10086 enableval=$enable_loadable_sqlite_extensions;
10087else
10088 enable_loadable_sqlite_extensions="no"
10089fi
10090
10091
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10093$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10094
Ned Deilyd819b932013-09-06 01:07:05 -070010095# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10096
10097
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10099$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10100
10101# Check whether --with-tcltk-includes was given.
10102if test "${with_tcltk_includes+set}" = set; then :
10103 withval=$with_tcltk_includes;
10104else
10105 with_tcltk_includes="default"
10106fi
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10109$as_echo "$with_tcltk_includes" >&6; }
10110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10111$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10112
10113# Check whether --with-tcltk-libs was given.
10114if test "${with_tcltk_libs+set}" = set; then :
10115 withval=$with_tcltk_libs;
10116else
10117 with_tcltk_libs="default"
10118fi
10119
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10121$as_echo "$with_tcltk_libs" >&6; }
10122if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10123then
10124 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10125 then
10126 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10127 fi
10128 TCLTK_INCLUDES=""
10129 TCLTK_LIBS=""
10130else
10131 TCLTK_INCLUDES="$with_tcltk_includes"
10132 TCLTK_LIBS="$with_tcltk_libs"
10133fi
10134
Matthias Klose55708cc2009-04-30 08:06:49 +000010135# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10137$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010138
10139# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010141 withval=$with_dbmliborder;
10142if test x$with_dbmliborder = xyes
10143then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010144as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010145else
10146 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10147 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10148 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010149 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010150 fi
10151 done
10152fi
10153fi
10154
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10156$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010157
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010158# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010159
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010160USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
10164# Templates for things AC_DEFINEd more than once.
10165# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010166
10167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Matthias Kloseb9621712010-04-24 17:59:49 +000010169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10170$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010173if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174 withval=$with_threads;
10175fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010176
10177
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010178# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010181if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 withval=$with_thread; with_threads=$with_thread
10183fi
10184
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010185
10186if test -z "$with_threads"
10187then with_threads="yes"
10188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10190$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010191
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010192
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010193if test "$with_threads" = "no"
10194then
10195 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010196elif test "$ac_cv_pthread_is_default" = yes
10197then
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010200 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202
10203 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010205elif test "$ac_cv_kpthread" = "yes"
10206then
10207 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010208 if test "$ac_cv_cxx_thread" = "yes"; then
10209 CXX="$CXX -Kpthread"
10210 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010212
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010213 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010214 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010215elif test "$ac_cv_kthread" = "yes"
10216then
10217 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010218 if test "$ac_cv_cxx_thread" = "yes"; then
10219 CXX="$CXX -Kthread"
10220 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010222
10223 posix_threads=yes
10224 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010225elif test "$ac_cv_pthread" = "yes"
10226then
10227 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010228 if test "$ac_cv_cxx_thread" = "yes"; then
10229 CXX="$CXX -pthread"
10230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010232
10233 posix_threads=yes
10234 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235else
10236 if test ! -z "$with_threads" -a -d "$with_threads"
10237 then LDFLAGS="$LDFLAGS -L$with_threads"
10238 fi
10239 if test ! -z "$withval" -a -d "$withval"
10240 then LDFLAGS="$LDFLAGS -L$withval"
10241 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010242
10243 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010244 # define _POSIX_THREADS in unistd.h. Some apparently don't
10245 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10247$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010249/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010250
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010251#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010252#ifdef _POSIX_THREADS
10253yes
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255
10256_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010259 unistd_defines_pthreads=yes
10260else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010261 unistd_defines_pthreads=no
10262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010263rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010264
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10266$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010267
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010269
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010270 # Just looking for pthread_create in libpthread is not enough:
10271 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10272 # So we really have to include pthread.h, and then link.
10273 _libs=$LIBS
10274 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10276$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010279
10280#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010281#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010282
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010283void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010284int
10285main ()
10286{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010287
10288pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ;
10290 return 0;
10291}
10292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10296$as_echo "yes" >&6; }
10297 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010298
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010299 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010300 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010301else
Martin v. Löwis11437992002-04-12 09:54:03 +000010302
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010303 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010305if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010306 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010307
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010308 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010309 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010310else
Guido van Rossumad678af1998-10-02 14:42:15 +000010311
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10313$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010314if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010316else
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010318LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010322/* Override any GCC internal prototype to avoid an error.
10323 Use char because int might match the return type of a GCC
10324 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010325#ifdef __cplusplus
10326extern "C"
10327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010328char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010329int
10330main ()
10331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ;
10334 return 0;
10335}
10336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010339else
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010342rm -f core conftest.err conftest.$ac_objext \
10343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010344LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10347$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010348if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010350
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010351 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010352 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010353 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010354else
Greg Steinadf63d62000-07-05 10:38:09 +000010355
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10357$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010358if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010360else
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010362LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366/* Override any GCC internal prototype to avoid an error.
10367 Use char because int might match the return type of a GCC
10368 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010369#ifdef __cplusplus
10370extern "C"
10371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010372char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010373int
10374main ()
10375{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010377 ;
10378 return 0;
10379}
10380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010383else
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010385fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010386rm -f core conftest.err conftest.$ac_objext \
10387 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010388LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10391$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010392if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010394
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010395 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010396 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010397 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010398else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10401$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010402if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010404else
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010406LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410/* Override any GCC internal prototype to avoid an error.
10411 Use char because int might match the return type of a GCC
10412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010413#ifdef __cplusplus
10414extern "C"
10415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010416char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010417int
10418main ()
10419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 ;
10422 return 0;
10423}
10424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010430rm -f core conftest.err conftest.$ac_objext \
10431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010432LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10435$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010436if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010439 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010440 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010441 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010442else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10445$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010446if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010448else
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454/* Override any GCC internal prototype to avoid an error.
10455 Use char because int might match the return type of a GCC
10456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010457#ifdef __cplusplus
10458extern "C"
10459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010460char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010461int
10462main ()
10463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010470 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010471else
Matthias Kloseb9621712010-04-24 17:59:49 +000010472 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010476LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10479$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010480if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010482
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010483 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010484 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010485 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010486else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010487
Martin v. Löwis130fb172001-07-19 11:00:41 +000010488 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010489fi
10490
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010492fi
10493
Guido van Rossum0be3e491997-05-22 20:33:33 +000010494fi
10495
Guido van Rossum49545951997-12-02 19:28:29 +000010496fi
10497
Guido van Rossumb93a8621998-05-07 13:27:32 +000010498fi
10499
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010501rm -f core conftest.err conftest.$ac_objext \
10502 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10505$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010506if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010508else
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010510LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514/* Override any GCC internal prototype to avoid an error.
10515 Use char because int might match the return type of a GCC
10516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010517#ifdef __cplusplus
10518extern "C"
10519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010520char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010521int
10522main ()
10523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 ;
10526 return 0;
10527}
10528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010531else
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534rm -f core conftest.err conftest.$ac_objext \
10535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010536LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10539$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010540if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010542
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010544 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010545 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010546fi
10547
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010548
Neal Norwitza978ab02002-11-02 16:58:05 +000010549 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10551$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010552if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554else
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010556LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560/* Override any GCC internal prototype to avoid an error.
10561 Use char because int might match the return type of a GCC
10562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010563#ifdef __cplusplus
10564extern "C"
10565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010566char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010567int
10568main ()
10569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 ;
10572 return 0;
10573}
10574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577else
Matthias Kloseb9621712010-04-24 17:59:49 +000010578 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010580rm -f core conftest.err conftest.$ac_objext \
10581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010582LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10585$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010586if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010588
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010589 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010590 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010591 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010592fi
10593
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010594 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010596
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597if test "$posix_threads" = "yes"; then
10598 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601
10602 fi
10603
10604 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10605 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010606 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010608
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010609 ;;
10610 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612
10613 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010614 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010615$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010616
10617 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618 esac
10619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10621$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010622 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626 ac_cv_pthread_system_supported=no
10627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010630
10631 #include <stdio.h>
10632 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633 void *foo(void *parm) {
10634 return NULL;
10635 }
10636 main() {
10637 pthread_attr_t attr;
10638 pthread_t id;
10639 if (pthread_attr_init(&attr)) exit(-1);
10640 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10641 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10642 exit(0);
10643 }
10644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646 ac_cv_pthread_system_supported=yes
10647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010652fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654
Guido van Rossum627b2d71993-12-24 10:39:16 +000010655fi
10656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10658$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659 if test "$ac_cv_pthread_system_supported" = "yes"; then
10660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662
10663 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 for ac_func in pthread_sigmask
10665do :
10666 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010667if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010670_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010671 case $ac_sys_system in
10672 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010675
10676 ;;
10677 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678fi
10679done
10680
Christian Heimesf77b4b22013-08-21 13:26:05 +020010681 for ac_func in pthread_atfork
10682do :
10683 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10684if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10685 cat >>confdefs.h <<_ACEOF
10686#define HAVE_PTHREAD_ATFORK 1
10687_ACEOF
10688
10689fi
10690done
10691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692fi
10693
10694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10698$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010701 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010702 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10704$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010705 ipv6=no
10706 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10708$as_echo "yes" >&6; }
10709 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710
10711 ipv6=yes
10712 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714else
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 /* AF_INET6 available check */
10719#include <sys/types.h>
10720#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010721int
10722main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010724int domain = AF_INET6;
10725 ;
10726 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727}
Martin v. Löwis11437992002-04-12 09:54:03 +000010728_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010729if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10732$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735else
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010744if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10746$as_echo_n "checking if RFC2553 API is available... " >&6; }
10747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010749
10750 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010751#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010752int
10753main ()
10754{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010755struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010756 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 ;
10758 return 0;
10759}
Matthias Kloseb159a552010-04-25 21:00:44 +000010760
Martin v. Löwis11437992002-04-12 09:54:03 +000010761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010765$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010766 ipv6=yes
10767
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010768else
Matthias Kloseb159a552010-04-25 21:00:44 +000010769
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010771$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010772 ipv6=no
10773
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010776fi
10777
10778if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010780
10781fi
10782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783fi
10784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785
10786ipv6type=unknown
10787ipv6lib=none
10788ipv6trylibc=no
10789
10790if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10792$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010793 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10794 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 case $i in
10796 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include <netinet/in.h>
10801#ifdef IPV6_INRIA_VERSION
10802yes
10803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010807 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010809rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810
10811 ;;
10812 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816#include <netinet/in.h>
10817#ifdef __KAME__
10818yes
10819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823 ipv6type=$i;
10824 ipv6lib=inet6
10825 ipv6libdir=/usr/local/v6/lib
10826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010828rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829
10830 ;;
10831 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010833/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010834
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835#include <features.h>
10836#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10837yes
10838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010839_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010842 ipv6type=$i;
10843 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010845rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846
10847 ;;
10848 linux-inet6)
10849 if test -d /usr/inet6; then
10850 ipv6type=$i
10851 ipv6lib=inet6
10852 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010853 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854 fi
10855 ;;
10856 solaris)
10857 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010858 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859 ipv6type=$i
10860 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010861 fi
10862 fi
10863 ;;
10864 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868#include <sys/param.h>
10869#ifdef _TOSHIBA_INET6
10870yes
10871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010872_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875 ipv6type=$i;
10876 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010877 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010879rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880
10881 ;;
10882 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010886#include </usr/local/v6/include/sys/v6config.h>
10887#ifdef __V6D__
10888yes
10889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010890_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893 ipv6type=$i;
10894 ipv6lib=v6;
10895 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010896 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010898rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899
10900 ;;
10901 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905#include <sys/param.h>
10906#ifdef _ZETA_MINAMI_INET6
10907yes
10908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010909_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912 ipv6type=$i;
10913 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010914 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010916rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917
10918 ;;
10919 esac
10920 if test "$ipv6type" != "unknown"; then
10921 break
10922 fi
10923 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10925$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926fi
10927
10928if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10929 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10930 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10931 echo "using lib$ipv6lib"
10932 else
10933 if test $ipv6trylibc = "yes"; then
10934 echo "using libc"
10935 else
10936 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10937 echo "You need to fetch lib$ipv6lib.a from appropriate"
10938 echo 'ipv6 kit and compile beforehand.'
10939 exit 1
10940 fi
10941 fi
10942fi
10943
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10945$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947/* end confdefs.h. */
10948 /* CAN_RAW_FD_FRAMES available check */
10949#include <linux/can/raw.h>
10950int
10951main ()
10952{
10953int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10954 ;
10955 return 0;
10956}
10957_ACEOF
10958if ac_fn_c_try_compile "$LINENO"; then :
10959
10960
10961$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10962
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10964$as_echo "yes" >&6; }
10965
10966else
10967
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
10970
10971fi
10972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10973
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010974# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10976$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010979if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980 withval=$with_doc_strings;
10981fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010982
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010983
10984if test -z "$with_doc_strings"
10985then with_doc_strings="yes"
10986fi
10987if test "$with_doc_strings" != "no"
10988then
10989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010991
10992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10994$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010995
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010996# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10998$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011001if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002 withval=$with_pymalloc;
11003fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011004
Neil Schemenauera35c6882001-02-27 04:45:05 +000011005
Neil Schemenauer16c22972002-03-22 15:34:49 +000011006if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011007then
11008 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011009fi
11010if test "$with_pymalloc" != "no"
11011then
Martin v. Löwis11437992002-04-12 09:54:03 +000011012
Matthias Kloseb9621712010-04-24 17:59:49 +000011013$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011014
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011015 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11018$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011019
Nick Coghlan6ea41862017-06-11 13:16:15 +100011020# Check for --with-c-locale-coercion
11021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11022$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11023
11024# Check whether --with-c-locale-coercion was given.
11025if test "${with_c_locale_coercion+set}" = set; then :
11026 withval=$with_c_locale_coercion;
11027fi
11028
11029
11030if test -z "$with_c_locale_coercion"
11031then
11032 with_c_locale_coercion="yes"
11033fi
11034if test "$with_c_locale_coercion" != "no"
11035then
11036
11037$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11038
11039fi
11040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11041$as_echo "$with_c_locale_coercion" >&6; }
11042
11043# Check for --with-c-locale-warning
11044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11045$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11046
11047# Check whether --with-c-locale-warning was given.
11048if test "${with_c_locale_warning+set}" = set; then :
11049 withval=$with_c_locale_warning;
11050fi
11051
11052
11053if test -z "$with_c_locale_warning"
11054then
11055 with_c_locale_warning="yes"
11056fi
11057if test "$with_c_locale_warning" != "no"
11058then
11059
11060$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11061
11062fi
11063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11064$as_echo "$with_c_locale_warning" >&6; }
11065
Benjamin Peterson05159c42009-12-03 03:01:27 +000011066# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11068$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011069
11070# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011072 withval=$with_valgrind;
11073else
11074 with_valgrind=no
11075fi
11076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11078$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011079if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 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 +020011081if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011084
11085else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011086 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011087
11088fi
11089
11090
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011091 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011092fi
11093
Łukasz Langaa785c872016-09-09 17:37:37 -070011094# Check for DTrace support
11095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11096$as_echo_n "checking for --with-dtrace... " >&6; }
11097
11098# Check whether --with-dtrace was given.
11099if test "${with_dtrace+set}" = set; then :
11100 withval=$with_dtrace;
11101else
11102 with_dtrace=no
11103fi
11104
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11106$as_echo "$with_dtrace" >&6; }
11107
11108
11109
11110
11111
11112DTRACE=
11113DFLAGS=
11114DTRACE_HEADERS=
11115DTRACE_OBJS=
11116
11117if test "$with_dtrace" = "yes"
11118then
11119 # Extract the first word of "dtrace", so it can be a program name with args.
11120set dummy dtrace; ac_word=$2
11121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11122$as_echo_n "checking for $ac_word... " >&6; }
11123if ${ac_cv_path_DTRACE+:} false; then :
11124 $as_echo_n "(cached) " >&6
11125else
11126 case $DTRACE in
11127 [\\/]* | ?:[\\/]*)
11128 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11129 ;;
11130 *)
11131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11132for as_dir in $PATH
11133do
11134 IFS=$as_save_IFS
11135 test -z "$as_dir" && as_dir=.
11136 for ac_exec_ext in '' $ac_executable_extensions; do
11137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11138 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11140 break 2
11141 fi
11142done
11143 done
11144IFS=$as_save_IFS
11145
11146 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11147 ;;
11148esac
11149fi
11150DTRACE=$ac_cv_path_DTRACE
11151if test -n "$DTRACE"; then
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11153$as_echo "$DTRACE" >&6; }
11154else
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11156$as_echo "no" >&6; }
11157fi
11158
11159
11160 if test "$DTRACE" = "not found"; then
11161 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11162 fi
11163
11164$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11165
11166 DTRACE_HEADERS="Include/pydtrace_probes.h"
11167
11168 # On OS X, DTrace providers do not need to be explicitly compiled and
11169 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11170 # generation flag '-G'. We check for presence of this flag, rather than
11171 # hardcoding support by OS, in the interest of robustness.
11172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11173$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11174if ${ac_cv_dtrace_link+:} false; then :
11175 $as_echo_n "(cached) " >&6
11176else
11177 ac_cv_dtrace_link=no
11178 echo 'BEGIN' > conftest.d
11179 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11180 ac_cv_dtrace_link=yes
11181
11182fi
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11184$as_echo "$ac_cv_dtrace_link" >&6; }
11185 if test "$ac_cv_dtrace_link" = "yes"; then
11186 DTRACE_OBJS="Python/pydtrace.o"
11187 fi
11188fi
11189
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011190# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011191
Guido van Rossum98935bf2001-09-05 19:13:16 +000011192DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011193
Guido van Rossume97ee181999-12-20 21:27:22 +000011194# the dlopen() function means we might want to use dynload_shlib.o. some
11195# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011196for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011197do :
11198 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011199if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011201#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011202_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011203
Guido van Rossume97ee181999-12-20 21:27:22 +000011204fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011205done
Guido van Rossume97ee181999-12-20 21:27:22 +000011206
Michael W. Hudson54241132001-12-07 15:38:26 +000011207
Guido van Rossume97ee181999-12-20 21:27:22 +000011208# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11209# loading of modules.
11210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11212$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011213if test -z "$DYNLOADFILE"
11214then
11215 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011216 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11217 if test "$ac_cv_func_dlopen" = yes
11218 then DYNLOADFILE="dynload_shlib.o"
11219 else DYNLOADFILE="dynload_aix.o"
11220 fi
11221 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011222 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011223 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11224 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011225 *)
11226 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11227 # out any dynamic loading
11228 if test "$ac_cv_func_dlopen" = yes
11229 then DYNLOADFILE="dynload_shlib.o"
11230 else DYNLOADFILE="dynload_stub.o"
11231 fi
11232 ;;
11233 esac
11234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11236$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011237if test "$DYNLOADFILE" != "dynload_stub.o"
11238then
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011241
11242fi
11243
Neil Schemenauer4e425612001-06-19 15:44:15 +000011244# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11245
Michael W. Hudson54241132001-12-07 15:38:26 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11248$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011249if test -z "$MACHDEP_OBJS"
11250then
Jack Jansene578a632001-08-15 01:27:14 +000011251 MACHDEP_OBJS=$extra_machdep_objs
11252else
11253 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011254fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011255if test -z "$MACHDEP_OBJS"; then
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11257$as_echo "none" >&6; }
11258else
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11260$as_echo "$MACHDEP_OBJS" >&6; }
11261fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011262
Guido van Rossum627b2d71993-12-24 10:39:16 +000011263# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011264for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011265 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011266 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011267 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011268 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011269 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011270 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011271 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011272 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011273 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011274 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011275 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011276 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011277 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011278 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11279 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011280 sigaction sigaltstack siginterrupt sigpending sigrelse \
11281 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011282 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011283 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011284 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011285do :
11286 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11287ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011288if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011290#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011291_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011293fi
11294done
11295
Michael W. Hudson54241132001-12-07 15:38:26 +000011296
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011297ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11298 #include <dirent.h>
11299"
11300if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11301
11302$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11303
11304fi
11305
11306
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011307# For some functions, having a definition is not sufficient, since
11308# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11310$as_echo_n "checking for chroot... " >&6; }
11311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314int
11315main ()
11316{
11317void *x=chroot
11318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011325
Matthias Kloseb159a552010-04-25 21:00:44 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011328else
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011331
11332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11335$as_echo_n "checking for link... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011337/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011338#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011339int
11340main ()
11341{
11342void *x=link
11343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011350
Matthias Kloseb159a552010-04-25 21:00:44 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011356
11357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11360$as_echo_n "checking for symlink... " >&6; }
11361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011362/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011363#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011364int
11365main ()
11366{
11367void *x=symlink
11368 ;
11369 return 0;
11370}
11371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011375
Matthias Kloseb159a552010-04-25 21:00:44 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011378else
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011381
11382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11385$as_echo_n "checking for fchdir... " >&6; }
11386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011387/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011388#include <unistd.h>
11389int
11390main ()
11391{
11392void *x=fchdir
11393 ;
11394 return 0;
11395}
11396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011400
Matthias Kloseb159a552010-04-25 21:00:44 +000011401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011402$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011403else
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011406
11407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11410$as_echo_n "checking for fsync... " >&6; }
11411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011412/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011413#include <unistd.h>
11414int
11415main ()
11416{
11417void *x=fsync
11418 ;
11419 return 0;
11420}
11421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011423
Matthias Kloseb9621712010-04-24 17:59:49 +000011424$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011425
Matthias Kloseb159a552010-04-25 21:00:44 +000011426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011427$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011428else
Matthias Kloseb9621712010-04-24 17:59:49 +000011429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011431
11432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11435$as_echo_n "checking for fdatasync... " >&6; }
11436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011437/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011438#include <unistd.h>
11439int
11440main ()
11441{
11442void *x=fdatasync
11443 ;
11444 return 0;
11445}
11446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011450
Matthias Kloseb159a552010-04-25 21:00:44 +000011451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011452$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011453else
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011456
11457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11460$as_echo_n "checking for epoll... " >&6; }
11461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011462/* end confdefs.h. */
11463#include <sys/epoll.h>
11464int
11465main ()
11466{
11467void *x=epoll_create
11468 ;
11469 return 0;
11470}
11471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011472if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011473
Matthias Kloseb9621712010-04-24 17:59:49 +000011474$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011475
Matthias Kloseb159a552010-04-25 21:00:44 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011477$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011478else
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11480$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011481
11482fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11485$as_echo_n "checking for epoll_create1... " >&6; }
11486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487/* end confdefs.h. */
11488#include <sys/epoll.h>
11489int
11490main ()
11491{
11492void *x=epoll_create1
11493 ;
11494 return 0;
11495}
11496_ACEOF
11497if ac_fn_c_try_compile "$LINENO"; then :
11498
11499$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11500
11501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11502$as_echo "yes" >&6; }
11503else
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11505$as_echo "no" >&6; }
11506
11507fi
11508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11510$as_echo_n "checking for kqueue... " >&6; }
11511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011512/* end confdefs.h. */
11513
11514#include <sys/types.h>
11515#include <sys/event.h>
11516
11517int
11518main ()
11519{
11520int x=kqueue()
11521 ;
11522 return 0;
11523}
11524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011525if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011528
Matthias Kloseb159a552010-04-25 21:00:44 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011530$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011531else
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11533$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011534
11535fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11538$as_echo_n "checking for prlimit... " >&6; }
11539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540/* end confdefs.h. */
11541
11542#include <sys/time.h>
11543#include <sys/resource.h>
11544
11545int
11546main ()
11547{
11548void *x=prlimit
11549 ;
11550 return 0;
11551}
11552_ACEOF
11553if ac_fn_c_try_compile "$LINENO"; then :
11554
11555$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11556
11557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11558$as_echo "yes" >&6; }
11559else
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
11562
11563fi
11564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11565
Martin v. Löwisd5843682002-11-21 20:41:28 +000011566# On some systems (eg. FreeBSD 5), we would find a definition of the
11567# functions ctermid_r, setgroups in the library, but no prototype
11568# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11569# address to avoid compiler warnings and potential miscompilations
11570# because of the missing prototypes.
11571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11573$as_echo_n "checking for ctermid_r... " >&6; }
11574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011575/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011576
Martin v. Löwisd5843682002-11-21 20:41:28 +000011577#include <stdio.h>
11578
Martin v. Löwisd5843682002-11-21 20:41:28 +000011579int
11580main ()
11581{
11582void* p = ctermid_r
11583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011590
Matthias Kloseb159a552010-04-25 21:00:44 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011593else
Matthias Kloseb9621712010-04-24 17:59:49 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11595$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011596
11597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11599
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11601$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011602if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011603 $as_echo_n "(cached) " >&6
11604else
11605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011606/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011607#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011608int
11609main ()
11610{
11611void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011612
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011618 ac_cv_flock_decl=yes
11619else
11620 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011621
11622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011624
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011625fi
11626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11627$as_echo "$ac_cv_flock_decl" >&6; }
11628if test "x${ac_cv_flock_decl}" = xyes; then
11629 for ac_func in flock
11630do :
11631 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011633 cat >>confdefs.h <<_ACEOF
11634#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011635_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011636
Antoine Pitroua3000072010-09-07 14:52:42 +000011637else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011639$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011641 $as_echo_n "(cached) " >&6
11642else
11643 ac_check_lib_save_LIBS=$LIBS
11644LIBS="-lbsd $LIBS"
11645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11646/* end confdefs.h. */
11647
11648/* Override any GCC internal prototype to avoid an error.
11649 Use char because int might match the return type of a GCC
11650 builtin and then its argument prototype would still apply. */
11651#ifdef __cplusplus
11652extern "C"
11653#endif
11654char flock ();
11655int
11656main ()
11657{
11658return flock ();
11659 ;
11660 return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_link "$LINENO"; then :
11664 ac_cv_lib_bsd_flock=yes
11665else
11666 ac_cv_lib_bsd_flock=no
11667fi
11668rm -f core conftest.err conftest.$ac_objext \
11669 conftest$ac_exeext conftest.$ac_ext
11670LIBS=$ac_check_lib_save_LIBS
11671fi
11672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11673$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011674if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011675 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011676
11677
11678$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11679
11680
11681fi
11682
11683
11684fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011685done
11686
Antoine Pitroua3000072010-09-07 14:52:42 +000011687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11690$as_echo_n "checking for getpagesize... " >&6; }
11691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011692/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011693
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011694#include <unistd.h>
11695
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011696int
11697main ()
11698{
11699void* p = getpagesize
11700 ;
11701 return 0;
11702}
11703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011705
Matthias Kloseb9621712010-04-24 17:59:49 +000011706$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011707
Matthias Kloseb159a552010-04-25 21:00:44 +000011708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011710else
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11712$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011713
11714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011716
Victor Stinner984890f2011-11-24 13:53:38 +010011717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11718$as_echo_n "checking for broken unsetenv... " >&6; }
11719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11720/* end confdefs.h. */
11721
11722#include <stdlib.h>
11723
11724int
11725main ()
11726{
11727int res = unsetenv("DUMMY")
11728 ;
11729 return 0;
11730}
11731_ACEOF
11732if ac_fn_c_try_compile "$LINENO"; then :
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11734$as_echo "no" >&6; }
11735else
11736
11737$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11738
11739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11740$as_echo "yes" >&6; }
11741
11742fi
11743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11744
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011745for ac_prog in true
11746do
11747 # Extract the first word of "$ac_prog", so it can be a program name with args.
11748set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011751if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011753else
11754 if test -n "$TRUE"; then
11755 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11756else
11757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11758for as_dir in $PATH
11759do
11760 IFS=$as_save_IFS
11761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011764 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011765 $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 +000011766 break 2
11767 fi
11768done
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011771
11772fi
11773fi
11774TRUE=$ac_cv_prog_TRUE
11775if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11777$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011778else
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11780$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011781fi
11782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011783
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011784 test -n "$TRUE" && break
11785done
11786test -n "$TRUE" || TRUE="/bin/true"
11787
11788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11790$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011791if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793else
11794 ac_check_lib_save_LIBS=$LIBS
11795LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011797/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799/* Override any GCC internal prototype to avoid an error.
11800 Use char because int might match the return type of a GCC
11801 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011802#ifdef __cplusplus
11803extern "C"
11804#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011805char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011806int
11807main ()
11808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011809return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011810 ;
11811 return 0;
11812}
11813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011815 ac_cv_lib_c_inet_aton=yes
11816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011819rm -f core conftest.err conftest.$ac_objext \
11820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011821LIBS=$ac_check_lib_save_LIBS
11822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11824$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011825if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011826 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11829$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011830if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832else
11833 ac_check_lib_save_LIBS=$LIBS
11834LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011836/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838/* Override any GCC internal prototype to avoid an error.
11839 Use char because int might match the return type of a GCC
11840 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011841#ifdef __cplusplus
11842extern "C"
11843#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011844char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011845int
11846main ()
11847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011848return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011849 ;
11850 return 0;
11851}
11852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011854 ac_cv_lib_resolv_inet_aton=yes
11855else
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011858rm -f core conftest.err conftest.$ac_objext \
11859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011860LIBS=$ac_check_lib_save_LIBS
11861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11863$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011864if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011865 cat >>confdefs.h <<_ACEOF
11866#define HAVE_LIBRESOLV 1
11867_ACEOF
11868
11869 LIBS="-lresolv $LIBS"
11870
11871fi
11872
11873
11874fi
11875
11876
Christian Heimesd0764e22007-12-04 15:00:33 +000011877# On Tru64, chflags seems to be present, but calling it will
11878# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11880$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011881if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011885 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011888/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011889
Christian Heimesd0764e22007-12-04 15:00:33 +000011890#include <sys/stat.h>
11891#include <unistd.h>
11892int main(int argc, char*argv[])
11893{
11894 if(chflags(argv[0], 0) != 0)
11895 return 1;
11896 return 0;
11897}
Ned Deily3eb67d52011-06-28 00:00:28 -070011898
Christian Heimesd0764e22007-12-04 15:00:33 +000011899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011900if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011901 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011902else
Matthias Kloseb9621712010-04-24 17:59:49 +000011903 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011907fi
11908
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11912$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011913if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011915if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011916 ac_cv_have_chflags="yes"
11917else
11918 ac_cv_have_chflags="no"
11919fi
11920
11921fi
11922if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011923
Matthias Kloseb9621712010-04-24 17:59:49 +000011924$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011925
11926fi
11927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11929$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011932else
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011934 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011935else
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011937/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011938
Christian Heimesd0764e22007-12-04 15:00:33 +000011939#include <sys/stat.h>
11940#include <unistd.h>
11941int main(int argc, char*argv[])
11942{
11943 if(lchflags(argv[0], 0) != 0)
11944 return 1;
11945 return 0;
11946}
Ned Deily3eb67d52011-06-28 00:00:28 -070011947
Christian Heimesd0764e22007-12-04 15:00:33 +000011948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011949if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011950 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011956fi
11957
11958
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11961$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011962if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011964if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011965 ac_cv_have_lchflags="yes"
11966else
11967 ac_cv_have_lchflags="no"
11968fi
11969
11970fi
11971if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011974
11975fi
11976
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011977case $ac_sys_system/$ac_sys_release in
11978Darwin/*)
11979 _CUR_CFLAGS="${CFLAGS}"
11980 _CUR_LDFLAGS="${LDFLAGS}"
11981 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11982 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11983 ;;
11984esac
11985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11987$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011988if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011990else
11991 ac_check_lib_save_LIBS=$LIBS
11992LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011994/* end confdefs.h. */
11995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996/* Override any GCC internal prototype to avoid an error.
11997 Use char because int might match the return type of a GCC
11998 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011999#ifdef __cplusplus
12000extern "C"
12001#endif
12002char inflateCopy ();
12003int
12004main ()
12005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012007 ;
12008 return 0;
12009}
12010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012011if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012012 ac_cv_lib_z_inflateCopy=yes
12013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016rm -f core conftest.err conftest.$ac_objext \
12017 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012018LIBS=$ac_check_lib_save_LIBS
12019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12021$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012022if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012025
12026fi
12027
12028
12029case $ac_sys_system/$ac_sys_release in
12030Darwin/*)
12031 CFLAGS="${_CUR_CFLAGS}"
12032 LDFLAGS="${_CUR_LDFLAGS}"
12033 ;;
12034esac
12035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12037$as_echo_n "checking for hstrerror... " >&6; }
12038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012039/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012040
Martin v. Löwise9416172003-05-03 10:12:45 +000012041#include <netdb.h>
12042
Martin v. Löwise9416172003-05-03 10:12:45 +000012043int
12044main ()
12045{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012046void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012047 ;
12048 return 0;
12049}
12050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012054
Matthias Kloseb159a552010-04-25 21:00:44 +000012055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012060
12061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012062rm -f core conftest.err conftest.$ac_objext \
12063 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12066$as_echo_n "checking for inet_aton... " >&6; }
12067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012068/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012069
Martin v. Löwis86d66262006-02-17 08:40:11 +000012070#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012071#include <sys/socket.h>
12072#include <netinet/in.h>
12073#include <arpa/inet.h>
12074
Martin v. Löwise9416172003-05-03 10:12:45 +000012075int
12076main ()
12077{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012078void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012084
Matthias Kloseb9621712010-04-24 17:59:49 +000012085$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012086
Matthias Kloseb159a552010-04-25 21:00:44 +000012087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12091$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012092
12093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012094rm -f core conftest.err conftest.$ac_objext \
12095 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012096
Matthias Kloseb9621712010-04-24 17:59:49 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12098$as_echo_n "checking for inet_pton... " >&6; }
12099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012100/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012101
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012102#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012103#include <sys/socket.h>
12104#include <netinet/in.h>
12105#include <arpa/inet.h>
12106
Martin v. Löwise9416172003-05-03 10:12:45 +000012107int
12108main ()
12109{
12110void* p = inet_pton
12111 ;
12112 return 0;
12113}
12114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012118
Matthias Kloseb159a552010-04-25 21:00:44 +000012119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012120$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12123$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012124
12125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012127
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012128# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12130$as_echo_n "checking for setgroups... " >&6; }
12131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012132/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012133
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012134#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012135#ifdef HAVE_GRP_H
12136#include <grp.h>
12137#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012138
Martin v. Löwisd5843682002-11-21 20:41:28 +000012139int
12140main ()
12141{
12142void* p = setgroups
12143 ;
12144 return 0;
12145}
12146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012148
Matthias Kloseb9621712010-04-24 17:59:49 +000012149$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012150
Matthias Kloseb159a552010-04-25 21:00:44 +000012151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012152$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12155$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012156
12157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012159
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012160# check for openpty and forkpty
12161
12162for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012163do :
12164 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012165if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012168_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012170else
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12172$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012173if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012175else
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012177LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181/* Override any GCC internal prototype to avoid an error.
12182 Use char because int might match the return type of a GCC
12183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012184#ifdef __cplusplus
12185extern "C"
12186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012187char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012188int
12189main ()
12190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012191return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 ;
12193 return 0;
12194}
12195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201rm -f core conftest.err conftest.$ac_objext \
12202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012203LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12206$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012207if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012209 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012210else
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12212$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012213if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215else
12216 ac_check_lib_save_LIBS=$LIBS
12217LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012219/* end confdefs.h. */
12220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221/* Override any GCC internal prototype to avoid an error.
12222 Use char because int might match the return type of a GCC
12223 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012224#ifdef __cplusplus
12225extern "C"
12226#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012227char openpty ();
12228int
12229main ()
12230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012232 ;
12233 return 0;
12234}
12235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012237 ac_cv_lib_bsd_openpty=yes
12238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241rm -f core conftest.err conftest.$ac_objext \
12242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012243LIBS=$ac_check_lib_save_LIBS
12244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12246$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012247if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012249 LIBS="$LIBS -lbsd"
12250fi
12251
12252
12253fi
12254
Fred Drake8cef4cf2000-06-28 16:40:38 +000012255
12256fi
12257done
12258
12259for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012260do :
12261 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012262if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012265_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012266
Fred Drake8cef4cf2000-06-28 16:40:38 +000012267else
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12269$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012270if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012272else
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012274LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278/* Override any GCC internal prototype to avoid an error.
12279 Use char because int might match the return type of a GCC
12280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012281#ifdef __cplusplus
12282extern "C"
12283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012284char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012295else
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012298rm -f core conftest.err conftest.$ac_objext \
12299 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012300LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12303$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012304if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012305 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012306 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012307else
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12309$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012310if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012312else
12313 ac_check_lib_save_LIBS=$LIBS
12314LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012316/* end confdefs.h. */
12317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318/* Override any GCC internal prototype to avoid an error.
12319 Use char because int might match the return type of a GCC
12320 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012321#ifdef __cplusplus
12322extern "C"
12323#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012324char forkpty ();
12325int
12326main ()
12327{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012329 ;
12330 return 0;
12331}
12332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012334 ac_cv_lib_bsd_forkpty=yes
12335else
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012338rm -f core conftest.err conftest.$ac_objext \
12339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012340LIBS=$ac_check_lib_save_LIBS
12341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12343$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012344if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012346 LIBS="$LIBS -lbsd"
12347fi
12348
12349
12350fi
12351
Fred Drake8cef4cf2000-06-28 16:40:38 +000012352
12353fi
12354done
12355
Jack Jansendd19cf82001-12-06 22:36:17 +000012356
Christian Heimesb186d002008-03-18 15:15:01 +000012357# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012358for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012359do :
12360 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012361if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012362 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012363#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012364_ACEOF
12365
12366fi
12367done
12368
12369
Michael W. Hudson54241132001-12-07 15:38:26 +000012370# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012371for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012372do :
12373 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12374ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012375if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012377#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012378_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012379
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012380fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012381done
12382
Michael W. Hudson54241132001-12-07 15:38:26 +000012383
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012384ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012385if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012386 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012387
Martin v. Löwis1142de32002-03-29 16:28:31 +000012388else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012390 *" dup2.$ac_objext "* ) ;;
12391 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012393esac
12394
Martin v. Löwis1142de32002-03-29 16:28:31 +000012395fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012396
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012397ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012398if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012399 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12400
12401else
12402 case " $LIBOBJS " in
12403 *" strdup.$ac_objext "* ) ;;
12404 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12405 ;;
12406esac
12407
12408fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012409
12410
12411for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012412do :
12413 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012414if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012416#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012419/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012421int
12422main ()
12423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012424getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 ;
12426 return 0;
12427}
12428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
Matthias Kloseb9621712010-04-24 17:59:49 +000012431$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012432
Guido van Rossum627b2d71993-12-24 10:39:16 +000012433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012435
Guido van Rossum627b2d71993-12-24 10:39:16 +000012436fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012437done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012438
Jack Jansen150753c2003-03-29 22:07:47 +000012439for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012440do :
12441 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012442if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012443 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012444#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012447/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012448#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012449int
12450main ()
12451{
12452setpgrp(0,0);
12453 ;
12454 return 0;
12455}
12456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012460
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012463
12464fi
12465done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012466
Thomas Wouters3a584202000-08-05 23:28:51 +000012467for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012468do :
12469 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012475/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012476#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012477int
12478main ()
12479{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 ;
12482 return 0;
12483}
12484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012485if ac_fn_c_try_compile "$LINENO"; then :
12486
Guido van Rossum627b2d71993-12-24 10:39:16 +000012487else
Skip Montanaro6dead952003-09-25 14:50:04 +000012488
Matthias Kloseb9621712010-04-24 17:59:49 +000012489$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491
Guido van Rossum627b2d71993-12-24 10:39:16 +000012492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012494
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012495fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012496done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497
Michael W. Hudson54241132001-12-07 15:38:26 +000012498
Victor Stinnere0be4232011-10-25 13:06:09 +020012499for ac_func in clock_gettime
12500do :
12501 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12502if test "x$ac_cv_func_clock_gettime" = xyes; then :
12503 cat >>confdefs.h <<_ACEOF
12504#define HAVE_CLOCK_GETTIME 1
12505_ACEOF
12506
12507else
12508
12509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12510$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12511if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12512 $as_echo_n "(cached) " >&6
12513else
12514 ac_check_lib_save_LIBS=$LIBS
12515LIBS="-lrt $LIBS"
12516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517/* end confdefs.h. */
12518
12519/* Override any GCC internal prototype to avoid an error.
12520 Use char because int might match the return type of a GCC
12521 builtin and then its argument prototype would still apply. */
12522#ifdef __cplusplus
12523extern "C"
12524#endif
12525char clock_gettime ();
12526int
12527main ()
12528{
12529return clock_gettime ();
12530 ;
12531 return 0;
12532}
12533_ACEOF
12534if ac_fn_c_try_link "$LINENO"; then :
12535 ac_cv_lib_rt_clock_gettime=yes
12536else
12537 ac_cv_lib_rt_clock_gettime=no
12538fi
12539rm -f core conftest.err conftest.$ac_objext \
12540 conftest$ac_exeext conftest.$ac_ext
12541LIBS=$ac_check_lib_save_LIBS
12542fi
12543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12544$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12545if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12546
Victor Stinner7efb8332014-08-29 15:41:08 +020012547 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012548 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12549
12550
12551$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12552
12553
12554fi
12555
12556
12557fi
12558done
12559
12560
12561for ac_func in clock_getres
12562do :
12563 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12564if test "x$ac_cv_func_clock_getres" = xyes; then :
12565 cat >>confdefs.h <<_ACEOF
12566#define HAVE_CLOCK_GETRES 1
12567_ACEOF
12568
12569else
12570
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12572$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12573if ${ac_cv_lib_rt_clock_getres+:} false; then :
12574 $as_echo_n "(cached) " >&6
12575else
12576 ac_check_lib_save_LIBS=$LIBS
12577LIBS="-lrt $LIBS"
12578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12579/* end confdefs.h. */
12580
12581/* Override any GCC internal prototype to avoid an error.
12582 Use char because int might match the return type of a GCC
12583 builtin and then its argument prototype would still apply. */
12584#ifdef __cplusplus
12585extern "C"
12586#endif
12587char clock_getres ();
12588int
12589main ()
12590{
12591return clock_getres ();
12592 ;
12593 return 0;
12594}
12595_ACEOF
12596if ac_fn_c_try_link "$LINENO"; then :
12597 ac_cv_lib_rt_clock_getres=yes
12598else
12599 ac_cv_lib_rt_clock_getres=no
12600fi
12601rm -f core conftest.err conftest.$ac_objext \
12602 conftest$ac_exeext conftest.$ac_ext
12603LIBS=$ac_check_lib_save_LIBS
12604fi
12605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12606$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12607if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12608
12609 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12610
12611
12612fi
12613
12614
12615fi
12616done
12617
12618
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012619for ac_func in clock_settime
12620do :
12621 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12622if test "x$ac_cv_func_clock_settime" = xyes; then :
12623 cat >>confdefs.h <<_ACEOF
12624#define HAVE_CLOCK_SETTIME 1
12625_ACEOF
12626
12627else
12628
12629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12630$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12631if ${ac_cv_lib_rt_clock_settime+:} false; then :
12632 $as_echo_n "(cached) " >&6
12633else
12634 ac_check_lib_save_LIBS=$LIBS
12635LIBS="-lrt $LIBS"
12636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12637/* end confdefs.h. */
12638
12639/* Override any GCC internal prototype to avoid an error.
12640 Use char because int might match the return type of a GCC
12641 builtin and then its argument prototype would still apply. */
12642#ifdef __cplusplus
12643extern "C"
12644#endif
12645char clock_settime ();
12646int
12647main ()
12648{
12649return clock_settime ();
12650 ;
12651 return 0;
12652}
12653_ACEOF
12654if ac_fn_c_try_link "$LINENO"; then :
12655 ac_cv_lib_rt_clock_settime=yes
12656else
12657 ac_cv_lib_rt_clock_settime=no
12658fi
12659rm -f core conftest.err conftest.$ac_objext \
12660 conftest$ac_exeext conftest.$ac_ext
12661LIBS=$ac_check_lib_save_LIBS
12662fi
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12664$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12665if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12666
12667 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12668
12669
12670fi
12671
12672
12673fi
12674done
12675
12676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12678$as_echo_n "checking for major... " >&6; }
12679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012680/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012681
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012682#if defined(MAJOR_IN_MKDEV)
12683#include <sys/mkdev.h>
12684#elif defined(MAJOR_IN_SYSMACROS)
12685#include <sys/sysmacros.h>
12686#else
12687#include <sys/types.h>
12688#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012689
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012690int
12691main ()
12692{
12693
12694 makedev(major(0),minor(0));
12695
12696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012701
12702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012704
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12706$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012707
12708else
Skip Montanaro6dead952003-09-25 14:50:04 +000012709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12711$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012712
12713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012714rm -f core conftest.err conftest.$ac_objext \
12715 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012716
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012717# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12718# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12720$as_echo_n "checking for if_nameindex... " >&6; }
12721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12722/* end confdefs.h. */
12723
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012724#include <stdio.h>
12725#ifdef STDC_HEADERS
12726# include <stdlib.h>
12727# include <stddef.h>
12728#else
12729# ifdef HAVE_STDLIB_H
12730# include <stdlib.h>
12731# endif
12732#endif
12733#ifdef HAVE_SYS_SOCKET_H
12734# include <sys/socket.h>
12735#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012736#ifdef HAVE_NET_IF_H
12737# include <net/if.h>
12738#endif
12739
12740int
12741main ()
12742{
12743struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12744 ;
12745 return 0;
12746}
12747_ACEOF
12748if ac_fn_c_try_link "$LINENO"; then :
12749
12750$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12751
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12753$as_echo "yes" >&6; }
12754else
12755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12756$as_echo "no" >&6; }
12757
12758fi
12759rm -f core conftest.err conftest.$ac_objext \
12760 conftest$ac_exeext conftest.$ac_ext
12761
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012762# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12763# macro is not defined in android-ndk-r13.
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12765$as_echo_n "checking for lockf... " >&6; }
12766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12767/* end confdefs.h. */
12768#include <unistd.h>
12769int
12770main ()
12771{
12772lockf(0, F_LOCK, 0);
12773 ;
12774 return 0;
12775}
12776_ACEOF
12777if ac_fn_c_try_link "$LINENO"; then :
12778
12779$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12780
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12782$as_echo "yes" >&6; }
12783else
12784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
12786
12787fi
12788rm -f core conftest.err conftest.$ac_objext \
12789 conftest$ac_exeext conftest.$ac_ext
12790
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012791# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012792# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12794$as_echo_n "checking for getaddrinfo... " >&6; }
12795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012796/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012797
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012798#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012799#include <sys/socket.h>
12800#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012801#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802
Martin v. Löwis11437992002-04-12 09:54:03 +000012803int
12804main ()
12805{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012806getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012812 have_getaddrinfo=yes
12813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012816rm -f core conftest.err conftest.$ac_objext \
12817 conftest$ac_exeext conftest.$ac_ext
12818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12819$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012820if test $have_getaddrinfo = yes
12821then
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12823$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012824 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012826else
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012828
12829if test "${enable_ipv6+set}" = set; then
12830 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12831else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012832 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012833fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012834else
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012836/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012837
Stefan Krah19c21392012-11-22 23:47:32 +010012838#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012839#include <sys/types.h>
12840#include <netdb.h>
12841#include <string.h>
12842#include <sys/socket.h>
12843#include <netinet/in.h>
12844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012845int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012846{
12847 int passive, gaierr, inet4 = 0, inet6 = 0;
12848 struct addrinfo hints, *ai, *aitop;
12849 char straddr[INET6_ADDRSTRLEN], strport[16];
12850
12851 for (passive = 0; passive <= 1; passive++) {
12852 memset(&hints, 0, sizeof(hints));
12853 hints.ai_family = AF_UNSPEC;
12854 hints.ai_flags = passive ? AI_PASSIVE : 0;
12855 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012856 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012857 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12858 (void)gai_strerror(gaierr);
12859 goto bad;
12860 }
12861 for (ai = aitop; ai; ai = ai->ai_next) {
12862 if (ai->ai_addr == NULL ||
12863 ai->ai_addrlen == 0 ||
12864 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12865 straddr, sizeof(straddr), strport, sizeof(strport),
12866 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12867 goto bad;
12868 }
12869 switch (ai->ai_family) {
12870 case AF_INET:
12871 if (strcmp(strport, "54321") != 0) {
12872 goto bad;
12873 }
12874 if (passive) {
12875 if (strcmp(straddr, "0.0.0.0") != 0) {
12876 goto bad;
12877 }
12878 } else {
12879 if (strcmp(straddr, "127.0.0.1") != 0) {
12880 goto bad;
12881 }
12882 }
12883 inet4++;
12884 break;
12885 case AF_INET6:
12886 if (strcmp(strport, "54321") != 0) {
12887 goto bad;
12888 }
12889 if (passive) {
12890 if (strcmp(straddr, "::") != 0) {
12891 goto bad;
12892 }
12893 } else {
12894 if (strcmp(straddr, "::1") != 0) {
12895 goto bad;
12896 }
12897 }
12898 inet6++;
12899 break;
12900 case AF_UNSPEC:
12901 goto bad;
12902 break;
12903 default:
12904 /* another family support? */
12905 break;
12906 }
12907 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012908 freeaddrinfo(aitop);
12909 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012910 }
12911
12912 if (!(inet4 == 0 || inet4 == 2))
12913 goto bad;
12914 if (!(inet6 == 0 || inet6 == 2))
12915 goto bad;
12916
12917 if (aitop)
12918 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012919 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012920
12921 bad:
12922 if (aitop)
12923 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012924 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012925}
12926
Martin v. Löwis11437992002-04-12 09:54:03 +000012927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012929 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012937fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012938
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12942$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12943
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012944if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012945then
12946 if test $ipv6 = yes
12947 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012948 echo 'Fatal: You must get working getaddrinfo() function.'
12949 echo ' or you can specify "--disable-ipv6"'.
12950 exit 1
12951 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012952else
Martin v. Löwis11437992002-04-12 09:54:03 +000012953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012955
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012956fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012957
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012958for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012959do :
12960 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012961if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012963#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012964_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012965
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966fi
12967done
12968
Michael W. Hudson54241132001-12-07 15:38:26 +000012969
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12972$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012973if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978#include <sys/types.h>
12979#include <sys/time.h>
12980#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
12985if ((struct tm *) 0)
12986return 0;
12987 ;
12988 return 0;
12989}
12990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012991if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12999$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013000if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003
13004fi
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13007$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013008if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013012/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013013#include <sys/types.h>
13014#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016int
13017main ()
13018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019struct tm tm;
13020 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 ;
13023 return 0;
13024}
13025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013027 ac_cv_struct_tm=time.h
13028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13034$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013035if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013038
13039fi
13040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041ac_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 +000013042#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044"
Victor Stinnere0be4232011-10-25 13:06:09 +020013045if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013046
13047cat >>confdefs.h <<_ACEOF
13048#define HAVE_STRUCT_TM_TM_ZONE 1
13049_ACEOF
13050
13051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013052fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013057
13058else
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13060"
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065fi
13066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069_ACEOF
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13072$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013073if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013077/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013078#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079#if !HAVE_DECL_TZNAME
13080extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013082
Martin v. Löwis11437992002-04-12 09:54:03 +000013083int
13084main ()
13085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 ;
13088 return 0;
13089}
13090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092 ac_cv_var_tzname=yes
13093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013096rm -f core conftest.err conftest.$ac_objext \
13097 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13100$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013101 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013104
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013105 fi
13106fi
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108ac_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 +020013109if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013110
13111cat >>confdefs.h <<_ACEOF
13112#define HAVE_STRUCT_STAT_ST_RDEV 1
13113_ACEOF
13114
13115
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013116fi
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118ac_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 +020013119if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121cat >>confdefs.h <<_ACEOF
13122#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13123_ACEOF
13124
13125
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013126fi
13127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128ac_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 +020013129if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013130
13131cat >>confdefs.h <<_ACEOF
13132#define HAVE_STRUCT_STAT_ST_FLAGS 1
13133_ACEOF
13134
13135
13136fi
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138ac_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 +020013139if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013140
13141cat >>confdefs.h <<_ACEOF
13142#define HAVE_STRUCT_STAT_ST_GEN 1
13143_ACEOF
13144
13145
13146fi
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148ac_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 +020013149if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013150
13151cat >>confdefs.h <<_ACEOF
13152#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13153_ACEOF
13154
13155
13156fi
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158ac_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 +020013159if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013160
Martin v. Löwis11437992002-04-12 09:54:03 +000013161cat >>confdefs.h <<_ACEOF
13162#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13163_ACEOF
13164
13165
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013166fi
13167
Stefan Krah267b6392016-04-26 01:09:18 +020013168ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13169 #include <sys/types.h>
13170 #include <pwd.h>
13171
13172"
13173if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13174
13175cat >>confdefs.h <<_ACEOF
13176#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13177_ACEOF
13178
13179
13180fi
13181ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13182 #include <sys/types.h>
13183 #include <pwd.h>
13184
13185"
13186if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13187
13188cat >>confdefs.h <<_ACEOF
13189#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13190_ACEOF
13191
13192
13193fi
13194
Zachary Ware6a6967e2016-10-01 00:47:27 -050013195# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13196ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13197"
13198if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13199
13200cat >>confdefs.h <<_ACEOF
13201#define HAVE_SIGINFO_T_SI_BAND 1
13202_ACEOF
13203
13204
13205fi
13206
Michael W. Hudson54241132001-12-07 15:38:26 +000013207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13209$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013210if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212else
Matthias Kloseb159a552010-04-25 21:00:44 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013215/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013216#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013217int
13218main ()
13219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ;
13222 return 0;
13223}
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013226 ac_cv_header_time_altzone=yes
13227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013232fi
13233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13235$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013236if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013239
13240fi
13241
Guido van Rossumda88dad1995-01-26 00:46:29 +000013242was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13244$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013246/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013247
13248#include <sys/types.h>
13249#include <sys/select.h>
13250#include <sys/time.h>
13251
Martin v. Löwis11437992002-04-12 09:54:03 +000013252int
13253main ()
13254{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255;
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 ;
13257 return 0;
13258}
13259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013261
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013264
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013265 was_it_defined=yes
13266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13270$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13273$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013274if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013278/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013279#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013280int
13281main ()
13282{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 ;
13285 return 0;
13286}
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013289 ac_cv_struct_addrinfo=yes
13290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13294fi
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13297$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301
13302fi
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13305$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013306if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013311
13312# include <sys/types.h>
13313# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013314int
13315main ()
13316{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013317struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ;
13319 return 0;
13320}
13321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013323 ac_cv_struct_sockaddr_storage=yes
13324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13328fi
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13331$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013335
13336fi
13337
Christian Heimesdffa3942016-09-05 23:54:41 +020013338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13339$as_echo_n "checking for sockaddr_alg... " >&6; }
13340if ${ac_cv_struct_sockaddr_alg+:} false; then :
13341 $as_echo_n "(cached) " >&6
13342else
13343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13344/* end confdefs.h. */
13345
13346# include <sys/types.h>
13347# include <sys/socket.h>
13348# include <linux/if_alg.h>
13349int
13350main ()
13351{
13352struct sockaddr_alg s
13353 ;
13354 return 0;
13355}
13356_ACEOF
13357if ac_fn_c_try_compile "$LINENO"; then :
13358 ac_cv_struct_sockaddr_alg=yes
13359else
13360 ac_cv_struct_sockaddr_alg=no
13361fi
13362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13363fi
13364
13365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13366$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13367if test $ac_cv_struct_sockaddr_alg = yes; then
13368
13369$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13370
13371fi
13372
Guido van Rossum627b2d71993-12-24 10:39:16 +000013373# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13376$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013377if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013383int
13384main ()
13385{
13386static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013387test_array [0] = 0;
13388return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
13390 ;
13391 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013392}
Martin v. Löwis11437992002-04-12 09:54:03 +000013393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013394if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013395 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13402$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013403if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405
13406fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13409$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013410if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416int
13417main ()
13418{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013421 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013423 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425 char const *const *pcpcc;
13426 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 /* NEC SVR4.0.2 mips cc rejects this. */
13428 struct point {int x, y;};
13429 static struct point const zero = {0,0};
13430 /* AIX XL C 1.02.0.0 rejects this.
13431 It does not let you subtract one const X* pointer from another in
13432 an arm of an if-expression whose if-part is not a constant
13433 expression */
13434 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013435 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013437 ++pcpcc;
13438 ppc = (char**) pcpcc;
13439 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013440 { /* SCO 3.2v4 cc rejects this sort of thing. */
13441 char tx;
13442 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 }
13448 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13449 int x[] = {25, 17};
13450 const int *foo = &x[0];
13451 ++foo;
13452 }
13453 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13454 typedef const int *iptr;
13455 iptr p = 0;
13456 ++p;
13457 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013458 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013460 struct s { int j; const int *ap[3]; } bx;
13461 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 }
13463 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13464 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013465 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013467 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013468#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ;
13471 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472}
Martin v. Löwis11437992002-04-12 09:54:03 +000013473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475 ac_cv_c_const=yes
13476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13482$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486
13487fi
13488
Michael W. Hudson54241132001-12-07 15:38:26 +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
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015149# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015151/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015152#include <readline/readline.h>
15153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015154if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015155 have_readline=yes
15156else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015157 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015158
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015159fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015160rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015161if test $have_readline = yes
15162then
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015164/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015165#include <readline/readline.h>
15166
15167_ACEOF
15168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015170
Matthias Kloseb9621712010-04-24 17:59:49 +000015171$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015172
15173fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015174rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015177/* end confdefs.h. */
15178#include <readline/readline.h>
15179
15180_ACEOF
15181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015182 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015185
15186fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015187rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015188
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015189fi
15190
Martin v. Löwis0daad592001-09-30 21:09:59 +000015191# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15193$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015194if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015196else
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015198LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202/* Override any GCC internal prototype to avoid an error.
15203 Use char because int might match the return type of a GCC
15204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015205#ifdef __cplusplus
15206extern "C"
15207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015208char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015209int
15210main ()
15211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ;
15214 return 0;
15215}
15216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015217if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015219else
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015222rm -f core conftest.err conftest.$ac_objext \
15223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015224LIBS=$ac_check_lib_save_LIBS
15225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15227$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015228if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015231
Martin v. Löwis0daad592001-09-30 21:09:59 +000015232fi
15233
Michael W. Hudson54241132001-12-07 15:38:26 +000015234
Thomas Wouters89d996e2007-09-08 17:39:28 +000015235# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15237$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015238if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015240else
15241 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
Thomas Wouters89d996e2007-09-08 17:39:28 +000015244/* end confdefs.h. */
15245
15246/* 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. */
15249#ifdef __cplusplus
15250extern "C"
15251#endif
15252char rl_completion_display_matches_hook ();
15253int
15254main ()
15255{
15256return rl_completion_display_matches_hook ();
15257 ;
15258 return 0;
15259}
15260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015261if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015262 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15263else
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015266rm -f core conftest.err conftest.$ac_objext \
15267 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +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_completion_display_matches_hook" >&5
15271$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015272if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015275
15276fi
15277
15278
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015279# also in 4.0, but not in editline
15280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15281$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15282if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15283 $as_echo_n "(cached) " >&6
15284else
15285 ac_check_lib_save_LIBS=$LIBS
15286LIBS="-lreadline $READLINE_LIBS $LIBS"
15287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15288/* 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_resize_terminal ();
15297int
15298main ()
15299{
15300return rl_resize_terminal ();
15301 ;
15302 return 0;
15303}
15304_ACEOF
15305if ac_fn_c_try_link "$LINENO"; then :
15306 ac_cv_lib_readline_rl_resize_terminal=yes
15307else
15308 ac_cv_lib_readline_rl_resize_terminal=no
15309fi
15310rm -f core conftest.err conftest.$ac_objext \
15311 conftest$ac_exeext conftest.$ac_ext
15312LIBS=$ac_check_lib_save_LIBS
15313fi
15314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15315$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15316if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15317
15318$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15319
15320fi
15321
15322
Martin v. Löwis0daad592001-09-30 21:09:59 +000015323# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15325$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015326if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015328else
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015330LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334/* 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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015337#ifdef __cplusplus
15338extern "C"
15339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015340char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015341int
15342main ()
15343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 ;
15346 return 0;
15347}
15348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015354rm -f core conftest.err conftest.$ac_objext \
15355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015356LIBS=$ac_check_lib_save_LIBS
15357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15359$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015360if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015363
Guido van Rossum353ae582001-07-10 16:45:32 +000015364fi
15365
Jack Jansendd19cf82001-12-06 22:36:17 +000015366
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015367# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015369/* end confdefs.h. */
15370#include <readline/readline.h>
15371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015372if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015373 have_readline=yes
15374else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015375 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015376
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015377fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015378rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015379if test $have_readline = yes
15380then
Matthias Kloseb9621712010-04-24 17:59:49 +000015381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015382/* end confdefs.h. */
15383#include <readline/readline.h>
15384
15385_ACEOF
15386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015387 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015390
15391fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015392rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015393
15394fi
15395
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15397$as_echo_n "checking for append_history in -lreadline... " >&6; }
15398if ${ac_cv_lib_readline_append_history+:} false; then :
15399 $as_echo_n "(cached) " >&6
15400else
15401 ac_check_lib_save_LIBS=$LIBS
15402LIBS="-lreadline $READLINE_LIBS $LIBS"
15403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15404/* end confdefs.h. */
15405
15406/* Override any GCC internal prototype to avoid an error.
15407 Use char because int might match the return type of a GCC
15408 builtin and then its argument prototype would still apply. */
15409#ifdef __cplusplus
15410extern "C"
15411#endif
15412char append_history ();
15413int
15414main ()
15415{
15416return append_history ();
15417 ;
15418 return 0;
15419}
15420_ACEOF
15421if ac_fn_c_try_link "$LINENO"; then :
15422 ac_cv_lib_readline_append_history=yes
15423else
15424 ac_cv_lib_readline_append_history=no
15425fi
15426rm -f core conftest.err conftest.$ac_objext \
15427 conftest$ac_exeext conftest.$ac_ext
15428LIBS=$ac_check_lib_save_LIBS
15429fi
15430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15431$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15432if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15433
15434$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15435
15436fi
15437
15438
Martin v. Löwis82bca632006-02-10 20:49:30 +000015439# End of readline checks: restore LIBS
15440LIBS=$LIBS_no_readline
15441
Matthias Kloseb9621712010-04-24 17:59:49 +000015442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15443$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015444if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015446else
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
Matthias Kloseb9621712010-04-24 17:59:49 +000015448if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015449 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015450else
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015452/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015453
15454int main()
15455{
15456 int val1 = nice(1);
15457 if (val1 != -1 && val1 == nice(2))
15458 exit(0);
15459 exit(1);
15460}
15461
Martin v. Löwis11437992002-04-12 09:54:03 +000015462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015463if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015464 ac_cv_broken_nice=yes
15465else
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15469 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015470fi
15471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015472fi
15473
Matthias Kloseb9621712010-04-24 17:59:49 +000015474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15475$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015476if test "$ac_cv_broken_nice" = yes
15477then
Martin v. Löwis11437992002-04-12 09:54:03 +000015478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015480
15481fi
15482
Matthias Kloseb9621712010-04-24 17:59:49 +000015483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15484$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015485if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015486 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015487else
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015489 ac_cv_broken_poll=no
15490else
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015492/* end confdefs.h. */
15493
15494#include <poll.h>
15495
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015496int main()
15497{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015498 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015499 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015500
15501 close (42);
15502
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015503 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015504 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015505 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015506 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015507 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015508 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015509 return 1;
15510}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015511
15512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015513if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015514 ac_cv_broken_poll=yes
15515else
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015522fi
15523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15525$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015526if test "$ac_cv_broken_poll" = yes
15527then
15528
Matthias Kloseb9621712010-04-24 17:59:49 +000015529$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015530
15531fi
15532
Brett Cannon43802422005-02-10 20:48:03 +000015533# 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 +000015534# (which is not required by ISO C or UNIX spec) and/or if we support
15535# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015536ac_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 +000015537#include <$ac_cv_struct_tm>
15538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539"
Victor Stinnere0be4232011-10-25 13:06:09 +020015540if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015541
15542cat >>confdefs.h <<_ACEOF
15543#define HAVE_STRUCT_TM_TM_ZONE 1
15544_ACEOF
15545
15546
15547fi
15548
15549if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15550
Matthias Kloseb9621712010-04-24 17:59:49 +000015551$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015552
15553else
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15555"
Victor Stinnere0be4232011-10-25 13:06:09 +020015556if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558else
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560fi
15561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015563#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564_ACEOF
15565
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15567$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015568if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015569 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570else
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015572/* end confdefs.h. */
15573#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574#if !HAVE_DECL_TZNAME
15575extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015576#endif
15577
15578int
15579main ()
15580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015582 ;
15583 return 0;
15584}
15585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015586if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015587 ac_cv_var_tzname=yes
15588else
Matthias Kloseb9621712010-04-24 17:59:49 +000015589 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015591rm -f core conftest.err conftest.$ac_objext \
15592 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15595$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015596 if test $ac_cv_var_tzname = yes; then
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015599
15600 fi
15601fi
15602
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015603
Martin v. Löwis1d459062005-03-14 21:23:33 +000015604# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15606$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015607if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015609else
15610
Matthias Kloseb9621712010-04-24 17:59:49 +000015611if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015612 ac_cv_working_tzset=no
15613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015616
15617#include <stdlib.h>
15618#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015619#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015620
15621#if HAVE_TZNAME
15622extern char *tzname[];
15623#endif
15624
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015625int main()
15626{
Brett Cannon18367812003-09-19 00:59:16 +000015627 /* Note that we need to ensure that not only does tzset(3)
15628 do 'something' with localtime, but it works as documented
15629 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015630 This includes making sure that tzname is set properly if
15631 tm->tm_zone does not exist since it is the alternative way
15632 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015633
15634 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015635 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015636 */
15637
Martin v. Löwis1d459062005-03-14 21:23:33 +000015638 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015639 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15640
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015641 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015642 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015643 if (localtime(&groundhogday)->tm_hour != 0)
15644 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015645#if HAVE_TZNAME
15646 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15647 if (strcmp(tzname[0], "UTC") ||
15648 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15649 exit(1);
15650#endif
Brett Cannon18367812003-09-19 00:59:16 +000015651
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015652 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015653 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015654 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015655 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015656#if HAVE_TZNAME
15657 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15658 exit(1);
15659#endif
Brett Cannon18367812003-09-19 00:59:16 +000015660
15661 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15662 tzset();
15663 if (localtime(&groundhogday)->tm_hour != 11)
15664 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015665#if HAVE_TZNAME
15666 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15667 exit(1);
15668#endif
15669
15670#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015671 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15672 exit(1);
15673 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15674 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015675#endif
Brett Cannon18367812003-09-19 00:59:16 +000015676
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015677 exit(0);
15678}
15679
15680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015681if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015682 ac_cv_working_tzset=yes
15683else
Matthias Kloseb9621712010-04-24 17:59:49 +000015684 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015688fi
15689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015690fi
15691
Matthias Kloseb9621712010-04-24 17:59:49 +000015692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15693$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015694if test "$ac_cv_working_tzset" = yes
15695then
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015698
15699fi
15700
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015701# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15703$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015704if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015706else
Matthias Kloseb9621712010-04-24 17:59:49 +000015707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015708/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015709#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015710int
15711main ()
15712{
15713
15714struct stat st;
15715st.st_mtim.tv_nsec = 1;
15716
15717 ;
15718 return 0;
15719}
15720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015721if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015722 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015723else
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15727fi
15728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15730$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015731if test "$ac_cv_stat_tv_nsec" = yes
15732then
15733
Matthias Kloseb9621712010-04-24 17:59:49 +000015734$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015735
15736fi
15737
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015738# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15740$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015741if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015743else
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015745/* end confdefs.h. */
15746#include <sys/stat.h>
15747int
15748main ()
15749{
15750
15751struct stat st;
15752st.st_mtimespec.tv_nsec = 1;
15753
15754 ;
15755 return 0;
15756}
15757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015758if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015759 ac_cv_stat_tv_nsec2=yes
15760else
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15764fi
15765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15767$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015768if test "$ac_cv_stat_tv_nsec2" = yes
15769then
15770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015772
15773fi
15774
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015775# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015776ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015777if test "$cross_compiling" = no; then
15778 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15779fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015780
15781for ac_header in curses.h ncurses.h
15782do :
15783 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15784ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15785if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15786 cat >>confdefs.h <<_ACEOF
15787#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15788_ACEOF
15789
15790fi
15791
15792done
15793
15794
15795# On Solaris, term.h requires curses.h
15796for ac_header in term.h
15797do :
15798 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15799#ifdef HAVE_CURSES_H
15800#include <curses.h>
15801#endif
15802
15803"
15804if test "x$ac_cv_header_term_h" = xyes; then :
15805 cat >>confdefs.h <<_ACEOF
15806#define HAVE_TERM_H 1
15807_ACEOF
15808
15809fi
15810
15811done
15812
15813
Jack Jansen666b1e72001-10-31 12:11:48 +000015814# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15816$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015817if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015819else
Matthias Kloseb9621712010-04-24 17:59:49 +000015820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015821/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015822#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015823int
15824main ()
15825{
Jack Jansen666b1e72001-10-31 12:11:48 +000015826
15827 int rtn;
15828 rtn = mvwdelch(0,0,0);
15829
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 ;
15831 return 0;
15832}
15833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015834if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015835 ac_cv_mvwdelch_is_expression=yes
15836else
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15840fi
15841
Matthias Kloseb9621712010-04-24 17:59:49 +000015842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15843$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015844
15845if test "$ac_cv_mvwdelch_is_expression" = yes
15846then
Martin v. Löwis11437992002-04-12 09:54:03 +000015847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015849
15850fi
15851
Matthias Kloseb9621712010-04-24 17:59:49 +000015852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15853$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015854if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015856else
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015858/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015859#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015860int
15861main ()
15862{
Jack Jansen666b1e72001-10-31 12:11:48 +000015863
15864 WINDOW *w;
15865 w->_flags = 0;
15866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 ;
15868 return 0;
15869}
15870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015871if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015872 ac_cv_window_has_flags=yes
15873else
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15877fi
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15880$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015881
Jack Jansen666b1e72001-10-31 12:11:48 +000015882
15883if test "$ac_cv_window_has_flags" = yes
15884then
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
Matthias Kloseb9621712010-04-24 17:59:49 +000015886$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015887
15888fi
15889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15891$as_echo_n "checking for is_term_resized... " >&6; }
15892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015893/* end confdefs.h. */
15894#include <curses.h>
15895int
15896main ()
15897{
15898void *x=is_term_resized
15899 ;
15900 return 0;
15901}
15902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015904
Matthias Kloseb9621712010-04-24 17:59:49 +000015905$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015906
Matthias Kloseb159a552010-04-25 21:00:44 +000015907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015908$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015909else
Matthias Kloseb9621712010-04-24 17:59:49 +000015910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15911$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015912
15913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15917$as_echo_n "checking for resize_term... " >&6; }
15918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015919/* end confdefs.h. */
15920#include <curses.h>
15921int
15922main ()
15923{
15924void *x=resize_term
15925 ;
15926 return 0;
15927}
15928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015929if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015932
Matthias Kloseb159a552010-04-25 21:00:44 +000015933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015934$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015935else
Matthias Kloseb9621712010-04-24 17:59:49 +000015936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15937$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015938
15939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15943$as_echo_n "checking for resizeterm... " >&6; }
15944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015945/* end confdefs.h. */
15946#include <curses.h>
15947int
15948main ()
15949{
15950void *x=resizeterm
15951 ;
15952 return 0;
15953}
15954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015955if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015956
Matthias Kloseb9621712010-04-24 17:59:49 +000015957$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015958
Matthias Kloseb159a552010-04-25 21:00:44 +000015959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015960$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015961else
Matthias Kloseb9621712010-04-24 17:59:49 +000015962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15963$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015964
15965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015967# last curses configure check
15968CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15971$as_echo "$as_me: checking for device files" >&6;}
15972
15973if test "x$cross_compiling" = xyes; then
15974 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15976$as_echo_n "checking for /dev/ptmx... " >&6; }
15977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15978$as_echo "not set" >&6; }
15979 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15980 fi
15981 if test "${ac_cv_file__dev_ptc+set}" != set; then
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15983$as_echo_n "checking for /dev/ptc... " >&6; }
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15985$as_echo "not set" >&6; }
15986 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15987 fi
15988fi
15989
Matthias Kloseb9621712010-04-24 17:59:49 +000015990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15991$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015992if ${ac_cv_file__dev_ptmx+:} false; then :
15993 $as_echo_n "(cached) " >&6
15994else
15995 test "$cross_compiling" = yes &&
15996 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15997if test -r "/dev/ptmx"; then
15998 ac_cv_file__dev_ptmx=yes
15999else
16000 ac_cv_file__dev_ptmx=no
16001fi
16002fi
16003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16004$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16005if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016006
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016007fi
16008
16009if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016012
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16015$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016016if ${ac_cv_file__dev_ptc+:} false; then :
16017 $as_echo_n "(cached) " >&6
16018else
16019 test "$cross_compiling" = yes &&
16020 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16021if test -r "/dev/ptc"; then
16022 ac_cv_file__dev_ptc=yes
16023else
16024 ac_cv_file__dev_ptc=no
16025fi
16026fi
16027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16028$as_echo "$ac_cv_file__dev_ptc" >&6; }
16029if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016030
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016031fi
16032
16033if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016034
Matthias Kloseb9621712010-04-24 17:59:49 +000016035$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016036
Neal Norwitz865400f2003-03-21 01:42:58 +000016037fi
16038
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016039if test $ac_sys_system = Darwin
16040then
16041 LIBS="$LIBS -framework CoreFoundation"
16042fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016043
Matthias Kloseb9621712010-04-24 17:59:49 +000016044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16045$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016046if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016047 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016048else
Matthias Kloseb9621712010-04-24 17:59:49 +000016049 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016050 ac_cv_have_size_t_format="cross -- assuming yes"
16051
Thomas Wouters477c8d52006-05-27 19:21:47 +000016052else
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016054/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016055
Thomas Wouters477c8d52006-05-27 19:21:47 +000016056#include <stdio.h>
16057#include <stddef.h>
16058#include <string.h>
16059
Christian Heimes2c181612007-12-17 20:04:13 +000016060#ifdef HAVE_SYS_TYPES_H
16061#include <sys/types.h>
16062#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016063
16064#ifdef HAVE_SSIZE_T
16065typedef ssize_t Py_ssize_t;
16066#elif SIZEOF_VOID_P == SIZEOF_LONG
16067typedef long Py_ssize_t;
16068#else
16069typedef int Py_ssize_t;
16070#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016071
Christian Heimes2c181612007-12-17 20:04:13 +000016072int main()
16073{
16074 char buffer[256];
16075
Thomas Wouters477c8d52006-05-27 19:21:47 +000016076 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16077 return 1;
16078
Thomas Wouters89f507f2006-12-13 04:49:30 +000016079 if (strcmp(buffer, "123"))
16080 return 1;
16081
16082 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16083 return 1;
16084
16085 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016086 return 1;
16087
16088 return 0;
16089}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016090
Thomas Wouters477c8d52006-05-27 19:21:47 +000016091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016092if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016093 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016094else
Matthias Kloseb9621712010-04-24 17:59:49 +000016095 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016099fi
16100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16103$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016104if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016105
Matthias Kloseb9621712010-04-24 17:59:49 +000016106$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016107
16108fi
16109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016111#ifdef HAVE_SYS_TYPES_H
16112#include <sys/types.h>
16113#endif
16114#ifdef HAVE_SYS_SOCKET_H
16115#include <sys/socket.h>
16116#endif
16117
Matthias Kloseb9621712010-04-24 17:59:49 +000016118"
Victor Stinnere0be4232011-10-25 13:06:09 +020016119if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016120
Martin v. Löwis11437992002-04-12 09:54:03 +000016121else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016122
Matthias Kloseb9621712010-04-24 17:59:49 +000016123$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016124
16125fi
16126
Michael W. Hudson54241132001-12-07 15:38:26 +000016127
Matthias Kloseb9621712010-04-24 17:59:49 +000016128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16129$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016130if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016131 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016132else
Matthias Kloseb9621712010-04-24 17:59:49 +000016133 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016134 ac_cv_broken_mbstowcs=no
16135else
Matthias Kloseb9621712010-04-24 17:59:49 +000016136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016137/* end confdefs.h. */
16138
Stefan Krah19c21392012-11-22 23:47:32 +010016139#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016140#include<stdlib.h>
16141int main() {
16142 size_t len = -1;
16143 const char *str = "text";
16144 len = mbstowcs(NULL, str, 0);
16145 return (len != 4);
16146}
16147
16148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016149if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016150 ac_cv_broken_mbstowcs=no
16151else
Matthias Kloseb9621712010-04-24 17:59:49 +000016152 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016156fi
16157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016158fi
16159
Matthias Kloseb9621712010-04-24 17:59:49 +000016160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16161$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016162if test "$ac_cv_broken_mbstowcs" = yes
16163then
16164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016166
16167fi
16168
Antoine Pitroub52ec782009-01-25 16:34:23 +000016169# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16171$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016172
16173# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016174if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016175 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016176if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016177then
16178
Matthias Kloseb9621712010-04-24 17:59:49 +000016179$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016180
Matthias Kloseb9621712010-04-24 17:59:49 +000016181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16182$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016183fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016184if test "$withval" = no
16185then
16186
16187$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16188
Matthias Kloseb9621712010-04-24 17:59:49 +000016189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16190$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016191fi
16192
Antoine Pitrou042b1282010-08-13 21:15:58 +000016193else
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16195$as_echo "no value specified" >&6; }
16196fi
16197
Antoine Pitroub52ec782009-01-25 16:34:23 +000016198
Matthias Kloseb17289e2012-03-15 19:51:34 +010016199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16200$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16201if ${ac_cv_computed_gotos+:} false; then :
16202 $as_echo_n "(cached) " >&6
16203else
16204 if test "$cross_compiling" = yes; then :
16205 if test "${with_computed_gotos+set}" = set; then
16206 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16207 else
16208 ac_cv_computed_gotos=no
16209 fi
16210else
16211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212/* end confdefs.h. */
16213
16214int main(int argc, char **argv)
16215{
16216 static void *targets[1] = { &&LABEL1 };
16217 goto LABEL2;
16218LABEL1:
16219 return 0;
16220LABEL2:
16221 goto *targets[0];
16222 return 1;
16223}
16224
16225_ACEOF
16226if ac_fn_c_try_run "$LINENO"; then :
16227 ac_cv_computed_gotos=yes
16228else
16229 ac_cv_computed_gotos=no
16230fi
16231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16232 conftest.$ac_objext conftest.beam conftest.$ac_ext
16233fi
16234
16235fi
16236
16237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16238$as_echo "$ac_cv_computed_gotos" >&6; }
16239case "$ac_cv_computed_gotos" in yes*)
16240
16241$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16242
16243esac
16244
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016245case $ac_sys_system in
16246AIX*)
16247
16248$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16249 ;;
16250esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016251
Michael W. Hudson54241132001-12-07 15:38:26 +000016252
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016253
16254
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016255for h in `(cd $srcdir;echo Python/thread_*.h)`
16256do
16257 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16258done
16259
Michael W. Hudson54241132001-12-07 15:38:26 +000016260
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016261SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16263$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016264for dir in $SRCDIRS; do
16265 if test ! -d $dir; then
16266 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016267 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016268done
Matthias Kloseb9621712010-04-24 17:59:49 +000016269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16270$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016271
Stefan Krah1919b7e2012-03-21 18:25:23 +010016272# Availability of -O2:
16273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16274$as_echo_n "checking for -O2... " >&6; }
16275saved_cflags="$CFLAGS"
16276CFLAGS="-O2"
16277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278/* end confdefs.h. */
16279
16280int
16281main ()
16282{
16283
16284
16285 ;
16286 return 0;
16287}
16288_ACEOF
16289if ac_fn_c_try_compile "$LINENO"; then :
16290 have_O2=yes
16291else
16292 have_O2=no
16293fi
16294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16296$as_echo "$have_O2" >&6; }
16297CFLAGS="$saved_cflags"
16298
16299# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16300# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16302$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16303saved_cflags="$CFLAGS"
16304CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16305if test "$have_O2" = no; then
16306 CFLAGS=""
16307fi
16308if test "$cross_compiling" = yes; then :
16309 have_glibc_memmove_bug=undefined
16310else
16311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16312/* end confdefs.h. */
16313
16314#include <stdio.h>
16315#include <stdlib.h>
16316#include <string.h>
16317void foo(void *p, void *q) { memmove(p, q, 19); }
16318int main() {
16319 char a[32] = "123456789000000000";
16320 foo(&a[9], a);
16321 if (strcmp(a, "123456789123456789000000000") != 0)
16322 return 1;
16323 foo(a, &a[9]);
16324 if (strcmp(a, "123456789000000000") != 0)
16325 return 1;
16326 return 0;
16327}
16328
16329_ACEOF
16330if ac_fn_c_try_run "$LINENO"; then :
16331 have_glibc_memmove_bug=no
16332else
16333 have_glibc_memmove_bug=yes
16334fi
16335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16336 conftest.$ac_objext conftest.beam conftest.$ac_ext
16337fi
16338
16339CFLAGS="$saved_cflags"
16340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16341$as_echo "$have_glibc_memmove_bug" >&6; }
16342if test "$have_glibc_memmove_bug" = yes; then
16343
16344$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16345
16346fi
16347
16348if test "$have_gcc_asm_for_x87" = yes; then
16349 # Some versions of gcc miscompile inline asm:
16350 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16351 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16352 case $CC in
16353 *gcc*)
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16355$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16356 saved_cflags="$CFLAGS"
16357 CFLAGS="-O2"
16358 if test "$cross_compiling" = yes; then :
16359 have_ipa_pure_const_bug=undefined
16360else
16361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16362/* end confdefs.h. */
16363
16364 __attribute__((noinline)) int
16365 foo(int *p) {
16366 int r;
16367 asm ( "movl \$6, (%1)\n\t"
16368 "xorl %0, %0\n\t"
16369 : "=r" (r) : "r" (p) : "memory"
16370 );
16371 return r;
16372 }
16373 int main() {
16374 int p = 8;
16375 if ((foo(&p) ? : p) != 6)
16376 return 1;
16377 return 0;
16378 }
16379
16380_ACEOF
16381if ac_fn_c_try_run "$LINENO"; then :
16382 have_ipa_pure_const_bug=no
16383else
16384 have_ipa_pure_const_bug=yes
16385fi
16386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16387 conftest.$ac_objext conftest.beam conftest.$ac_ext
16388fi
16389
16390 CFLAGS="$saved_cflags"
16391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16392$as_echo "$have_ipa_pure_const_bug" >&6; }
16393 if test "$have_ipa_pure_const_bug" = yes; then
16394
16395$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16396
16397 fi
16398 ;;
16399 esac
16400fi
16401
Victor Stinner4f5366e2015-01-09 02:13:19 +010016402# Check for stdatomic.h
16403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16404$as_echo_n "checking for stdatomic.h... " >&6; }
16405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16406/* end confdefs.h. */
16407
16408
16409 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016410 atomic_int value = ATOMIC_VAR_INIT(1);
16411 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016412 int main() {
16413 int loaded_value = atomic_load(&value);
16414 return 0;
16415 }
16416
16417
16418_ACEOF
16419if ac_fn_c_try_link "$LINENO"; then :
16420 have_stdatomic_h=yes
16421else
16422 have_stdatomic_h=no
16423fi
16424rm -f core conftest.err conftest.$ac_objext \
16425 conftest$ac_exeext conftest.$ac_ext
16426
16427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16428$as_echo "$have_stdatomic_h" >&6; }
16429
16430if test "$have_stdatomic_h" = yes; then
16431
16432$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16433
16434fi
16435
16436# Check for GCC >= 4.7 __atomic builtins
16437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16438$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16440/* end confdefs.h. */
16441
16442
16443 volatile int val = 1;
16444 int main() {
16445 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16446 return 0;
16447 }
16448
16449
16450_ACEOF
16451if ac_fn_c_try_link "$LINENO"; then :
16452 have_builtin_atomic=yes
16453else
16454 have_builtin_atomic=no
16455fi
16456rm -f core conftest.err conftest.$ac_objext \
16457 conftest$ac_exeext conftest.$ac_ext
16458
16459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16460$as_echo "$have_builtin_atomic" >&6; }
16461
16462if test "$have_builtin_atomic" = yes; then
16463
16464$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16465
16466fi
16467
Ned Deily322f5ba2013-11-21 23:01:59 -080016468# ensurepip option
16469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16470$as_echo_n "checking for ensurepip... " >&6; }
16471
16472# Check whether --with-ensurepip was given.
16473if test "${with_ensurepip+set}" = set; then :
16474 withval=$with_ensurepip;
16475else
16476 with_ensurepip=upgrade
16477fi
16478
16479case $with_ensurepip in #(
16480 yes|upgrade) :
16481 ENSUREPIP=upgrade ;; #(
16482 install) :
16483 ENSUREPIP=install ;; #(
16484 no) :
16485 ENSUREPIP=no ;; #(
16486 *) :
16487 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16488esac
16489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16490$as_echo "$ENSUREPIP" >&6; }
16491
16492
Victor Stinner35a97c02015-03-08 02:59:09 +010016493# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16495$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16497/* end confdefs.h. */
16498
16499
16500 #include <dirent.h>
16501
16502 int main() {
16503 struct dirent entry;
16504 return entry.d_type == DT_UNKNOWN;
16505 }
16506
16507
16508_ACEOF
16509if ac_fn_c_try_link "$LINENO"; then :
16510 have_dirent_d_type=yes
16511else
16512 have_dirent_d_type=no
16513fi
16514rm -f core conftest.err conftest.$ac_objext \
16515 conftest$ac_exeext conftest.$ac_ext
16516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16517$as_echo "$have_dirent_d_type" >&6; }
16518
16519if test "$have_dirent_d_type" = yes; then
16520
16521$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16522
16523fi
16524
Victor Stinner9eb57c52015-03-19 22:21:49 +010016525# check if the Linux getrandom() syscall is available
16526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16527$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16529/* end confdefs.h. */
16530
16531
Victor Stinner1b80b242016-04-12 22:34:58 +020016532 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016533 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016534 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016535
16536 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016537 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016538 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016539 const int flags = GRND_NONBLOCK;
16540 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016541 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016542 return 0;
16543 }
16544
16545
16546_ACEOF
16547if ac_fn_c_try_link "$LINENO"; then :
16548 have_getrandom_syscall=yes
16549else
16550 have_getrandom_syscall=no
16551fi
16552rm -f core conftest.err conftest.$ac_objext \
16553 conftest$ac_exeext conftest.$ac_ext
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16555$as_echo "$have_getrandom_syscall" >&6; }
16556
16557if test "$have_getrandom_syscall" = yes; then
16558
16559$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16560
16561fi
16562
Victor Stinner3abf44e2015-09-18 15:38:37 +020016563# check if the getrandom() function is available
16564# the test was written for the Solaris function of <sys/random.h>
16565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16566$as_echo_n "checking for the getrandom() function... " >&6; }
16567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16568/* end confdefs.h. */
16569
16570
16571 #include <sys/random.h>
16572
16573 int main() {
16574 char buffer[1];
16575 const size_t buflen = sizeof(buffer);
16576 const int flags = 0;
16577 /* ignore the result, Python checks for ENOSYS at runtime */
16578 (void)getrandom(buffer, buflen, flags);
16579 return 0;
16580 }
16581
16582
16583_ACEOF
16584if ac_fn_c_try_link "$LINENO"; then :
16585 have_getrandom=yes
16586else
16587 have_getrandom=no
16588fi
16589rm -f core conftest.err conftest.$ac_objext \
16590 conftest$ac_exeext conftest.$ac_ext
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16592$as_echo "$have_getrandom" >&6; }
16593
16594if test "$have_getrandom" = yes; then
16595
16596$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16597
16598fi
16599
Guido van Rossum627b2d71993-12-24 10:39:16 +000016600# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016601ac_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 +000016602
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016603ac_config_files="$ac_config_files Modules/ld_so_aix"
16604
Martin v. Löwis11437992002-04-12 09:54:03 +000016605cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016606# This file is a shell script that caches the results of configure
16607# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016608# scripts and configure runs, see configure's option --config-cache.
16609# It is not useful on other systems. If it contains results you don't
16610# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016611#
Martin v. Löwis11437992002-04-12 09:54:03 +000016612# config.status only pays attention to the cache file if you give it
16613# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016614#
Skip Montanaro6dead952003-09-25 14:50:04 +000016615# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016616# loading this file, other *unset* `ac_cv_foo' will be assigned the
16617# following values.
16618
16619_ACEOF
16620
Guido van Rossumf78abae1997-01-21 22:02:36 +000016621# The following way of writing the cache mishandles newlines in values,
16622# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016624# Ultrix sh set writes to stderr and can't be redirected directly,
16625# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626(
16627 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16628 eval ac_val=\$$ac_var
16629 case $ac_val in #(
16630 *${as_nl}*)
16631 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016632 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16633$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634 esac
16635 case $ac_var in #(
16636 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016637 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16638 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 esac ;;
16640 esac
16641 done
16642
Martin v. Löwis11437992002-04-12 09:54:03 +000016643 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16645 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016646 # `set' does not quote correctly, so add quotes: double-quote
16647 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016648 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016649 "s/'/'\\\\''/g;
16650 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 *)
16653 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656 esac |
16657 sort
16658) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016663 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16664 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16666 :end' >>confcache
16667if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16668 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016669 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16671$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016672 if test ! -f "$cache_file" || test -h "$cache_file"; then
16673 cat confcache >"$cache_file"
16674 else
16675 case $cache_file in #(
16676 */* | ?:*)
16677 mv -f confcache "$cache_file"$$ &&
16678 mv -f "$cache_file"$$ "$cache_file" ;; #(
16679 *)
16680 mv -f confcache "$cache_file" ;;
16681 esac
16682 fi
16683 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016684 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016685 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16686$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016687 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016688fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016689rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016690
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016691test "x$prefix" = xNONE && prefix=$ac_default_prefix
16692# Let make expand exec_prefix.
16693test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016695DEFS=-DHAVE_CONFIG_H
16696
Skip Montanaro6dead952003-09-25 14:50:04 +000016697ac_libobjs=
16698ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016699U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016700for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16701 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016702 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016703 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16705 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016706 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16707 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016708done
16709LIBOBJS=$ac_libobjs
16710
16711LTLIBOBJS=$ac_ltlibobjs
16712
16713
Martin v. Löwis11437992002-04-12 09:54:03 +000016714
Matthias Kloseb9621712010-04-24 17:59:49 +000016715
Victor Stinnere0be4232011-10-25 13:06:09 +020016716: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016717ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016718ac_clean_files_save=$ac_clean_files
16719ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016720{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16721$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16722as_write_fail=0
16723cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016724#! $SHELL
16725# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016726# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016727# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016728# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016729
Martin v. Löwis11437992002-04-12 09:54:03 +000016730debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016731ac_cs_recheck=false
16732ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016733
Matthias Kloseb9621712010-04-24 17:59:49 +000016734SHELL=\${CONFIG_SHELL-$SHELL}
16735export SHELL
16736_ASEOF
16737cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16738## -------------------- ##
16739## M4sh Initialization. ##
16740## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742# Be more Bourne compatible
16743DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016744if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 emulate sh
16746 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016747 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016748 # is contrary to our usage. Disable this feature.
16749 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016750 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016751else
Matthias Kloseb9621712010-04-24 17:59:49 +000016752 case `(set -o) 2>/dev/null` in #(
16753 *posix*) :
16754 set -o posix ;; #(
16755 *) :
16756 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016758fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016759
16760
Matthias Kloseb9621712010-04-24 17:59:49 +000016761as_nl='
16762'
16763export as_nl
16764# Printing a long string crashes Solaris 7 /usr/bin/printf.
16765as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16766as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16767as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16768# Prefer a ksh shell builtin over an external printf program on Solaris,
16769# but without wasting forks for bash or zsh.
16770if test -z "$BASH_VERSION$ZSH_VERSION" \
16771 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16772 as_echo='print -r --'
16773 as_echo_n='print -rn --'
16774elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16775 as_echo='printf %s\n'
16776 as_echo_n='printf %s'
16777else
16778 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16779 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16780 as_echo_n='/usr/ucb/echo -n'
16781 else
16782 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16783 as_echo_n_body='eval
16784 arg=$1;
16785 case $arg in #(
16786 *"$as_nl"*)
16787 expr "X$arg" : "X\\(.*\\)$as_nl";
16788 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16789 esac;
16790 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16791 '
16792 export as_echo_n_body
16793 as_echo_n='sh -c $as_echo_n_body as_echo'
16794 fi
16795 export as_echo_body
16796 as_echo='sh -c $as_echo_body as_echo'
16797fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016798
16799# The user is always right.
16800if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016801 PATH_SEPARATOR=:
16802 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16803 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16804 PATH_SEPARATOR=';'
16805 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808
16809# IFS
16810# We need space, tab and new line, in precisely that order. Quoting is
16811# there to prevent editors from complaining about space-tab.
16812# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16813# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814IFS=" "" $as_nl"
16815
16816# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016817as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016818case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819 *[\\/]* ) as_myself=$0 ;;
16820 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016821for as_dir in $PATH
16822do
16823 IFS=$as_save_IFS
16824 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016825 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16826 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829 ;;
16830esac
16831# We did not find ourselves, most probably we were run as `sh COMMAND'
16832# in which case we are not to be found in the path.
16833if test "x$as_myself" = x; then
16834 as_myself=$0
16835fi
16836if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016837 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16838 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016839fi
16840
Matthias Kloseb9621712010-04-24 17:59:49 +000016841# Unset variables that we do not need and which cause bugs (e.g. in
16842# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16843# suppresses any "Segmentation fault" message there. '((' could
16844# trigger a bug in pdksh 5.2.14.
16845for as_var in BASH_ENV ENV MAIL MAILPATH
16846do eval test x\${$as_var+set} = xset \
16847 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016848done
16849PS1='$ '
16850PS2='> '
16851PS4='+ '
16852
16853# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016854LC_ALL=C
16855export LC_ALL
16856LANGUAGE=C
16857export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858
Matthias Kloseb9621712010-04-24 17:59:49 +000016859# CDPATH.
16860(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16861
16862
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016863# as_fn_error STATUS ERROR [LINENO LOG_FD]
16864# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016865# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16866# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016867# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016868as_fn_error ()
16869{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016870 as_status=$1; test $as_status -eq 0 && as_status=1
16871 if test "$4"; then
16872 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16873 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016874 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016875 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016876 as_fn_exit $as_status
16877} # as_fn_error
16878
16879
16880# as_fn_set_status STATUS
16881# -----------------------
16882# Set $? to STATUS, without forking.
16883as_fn_set_status ()
16884{
16885 return $1
16886} # as_fn_set_status
16887
16888# as_fn_exit STATUS
16889# -----------------
16890# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16891as_fn_exit ()
16892{
16893 set +e
16894 as_fn_set_status $1
16895 exit $1
16896} # as_fn_exit
16897
16898# as_fn_unset VAR
16899# ---------------
16900# Portably unset VAR.
16901as_fn_unset ()
16902{
16903 { eval $1=; unset $1;}
16904}
16905as_unset=as_fn_unset
16906# as_fn_append VAR VALUE
16907# ----------------------
16908# Append the text in VALUE to the end of the definition contained in VAR. Take
16909# advantage of any shell optimizations that allow amortized linear growth over
16910# repeated appends, instead of the typical quadratic growth present in naive
16911# implementations.
16912if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16913 eval 'as_fn_append ()
16914 {
16915 eval $1+=\$2
16916 }'
16917else
16918 as_fn_append ()
16919 {
16920 eval $1=\$$1\$2
16921 }
16922fi # as_fn_append
16923
16924# as_fn_arith ARG...
16925# ------------------
16926# Perform arithmetic evaluation on the ARGs, and store the result in the
16927# global $as_val. Take advantage of shells that can avoid forks. The arguments
16928# must be portable across $(()) and expr.
16929if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16930 eval 'as_fn_arith ()
16931 {
16932 as_val=$(( $* ))
16933 }'
16934else
16935 as_fn_arith ()
16936 {
16937 as_val=`expr "$@" || test $? -eq 1`
16938 }
16939fi # as_fn_arith
16940
16941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016942if expr a : '\(a\)' >/dev/null 2>&1 &&
16943 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16944 as_expr=expr
16945else
16946 as_expr=false
16947fi
16948
16949if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16950 as_basename=basename
16951else
16952 as_basename=false
16953fi
16954
Matthias Kloseb9621712010-04-24 17:59:49 +000016955if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16956 as_dirname=dirname
16957else
16958 as_dirname=false
16959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961as_me=`$as_basename -- "$0" ||
16962$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16963 X"$0" : 'X\(//\)$' \| \
16964 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016965$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966 sed '/^.*\/\([^/][^/]*\)\/*$/{
16967 s//\1/
16968 q
16969 }
16970 /^X\/\(\/\/\)$/{
16971 s//\1/
16972 q
16973 }
16974 /^X\/\(\/\).*/{
16975 s//\1/
16976 q
16977 }
16978 s/.*/./; q'`
16979
Matthias Kloseb9621712010-04-24 17:59:49 +000016980# Avoid depending upon Character Ranges.
16981as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16982as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16983as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16984as_cr_digits='0123456789'
16985as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986
16987ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016988case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016990 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016992 xy) ECHO_C='\c';;
16993 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16994 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995 esac;;
16996*)
16997 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016999
Martin v. Löwis11437992002-04-12 09:54:03 +000017000rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017001if test -d conf$$.dir; then
17002 rm -f conf$$.dir/conf$$.file
17003else
17004 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017005 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017007if (echo >conf$$.file) 2>/dev/null; then
17008 if ln -s conf$$.file conf$$ 2>/dev/null; then
17009 as_ln_s='ln -s'
17010 # ... but there are two gotchas:
17011 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17012 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017013 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017014 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017015 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017016 elif ln conf$$.file conf$$ 2>/dev/null; then
17017 as_ln_s=ln
17018 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017019 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017020 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017021else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017022 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017024rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17025rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017026
Matthias Kloseb9621712010-04-24 17:59:49 +000017027
17028# as_fn_mkdir_p
17029# -------------
17030# Create "$as_dir" as a directory, including parents if necessary.
17031as_fn_mkdir_p ()
17032{
17033
17034 case $as_dir in #(
17035 -*) as_dir=./$as_dir;;
17036 esac
17037 test -d "$as_dir" || eval $as_mkdir_p || {
17038 as_dirs=
17039 while :; do
17040 case $as_dir in #(
17041 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17042 *) as_qdir=$as_dir;;
17043 esac
17044 as_dirs="'$as_qdir' $as_dirs"
17045 as_dir=`$as_dirname -- "$as_dir" ||
17046$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17047 X"$as_dir" : 'X\(//\)[^/]' \| \
17048 X"$as_dir" : 'X\(//\)$' \| \
17049 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17050$as_echo X"$as_dir" |
17051 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17052 s//\1/
17053 q
17054 }
17055 /^X\(\/\/\)[^/].*/{
17056 s//\1/
17057 q
17058 }
17059 /^X\(\/\/\)$/{
17060 s//\1/
17061 q
17062 }
17063 /^X\(\/\).*/{
17064 s//\1/
17065 q
17066 }
17067 s/.*/./; q'`
17068 test -d "$as_dir" && break
17069 done
17070 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017071 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017072
17073
17074} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017075if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017077else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017078 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017079 as_mkdir_p=false
17080fi
17081
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017082
17083# as_fn_executable_p FILE
17084# -----------------------
17085# Test if FILE is an executable regular file.
17086as_fn_executable_p ()
17087{
17088 test -f "$1" && test -x "$1"
17089} # as_fn_executable_p
17090as_test_x='test -x'
17091as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017092
17093# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017094as_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 +000017095
17096# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017098
17099
Martin v. Löwis11437992002-04-12 09:54:03 +000017100exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017101## ----------------------------------- ##
17102## Main body of $CONFIG_STATUS script. ##
17103## ----------------------------------- ##
17104_ASEOF
17105test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017106
Matthias Kloseb9621712010-04-24 17:59:49 +000017107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17108# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017109# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110# values after options handling.
17111ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017112This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017113generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017114
17115 CONFIG_FILES = $CONFIG_FILES
17116 CONFIG_HEADERS = $CONFIG_HEADERS
17117 CONFIG_LINKS = $CONFIG_LINKS
17118 CONFIG_COMMANDS = $CONFIG_COMMANDS
17119 $ $0 $@
17120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017121on `(hostname || uname -n) 2>/dev/null | sed 1q`
17122"
17123
Martin v. Löwis11437992002-04-12 09:54:03 +000017124_ACEOF
17125
Matthias Kloseb9621712010-04-24 17:59:49 +000017126case $ac_config_files in *"
17127"*) set x $ac_config_files; shift; ac_config_files=$*;;
17128esac
17129
17130case $ac_config_headers in *"
17131"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17132esac
17133
17134
17135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017136# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017137config_files="$ac_config_files"
17138config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
Matthias Kloseb9621712010-04-24 17:59:49 +000017142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017143ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017144\`$as_me' instantiates files and other configuration actions
17145from templates according to the current configuration. Unless the files
17146and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017147
Matthias Kloseb9621712010-04-24 17:59:49 +000017148Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017149
17150 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017152 --config print configuration, then exit
17153 -q, --quiet, --silent
17154 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017155 -d, --debug don't remove temporary files
17156 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017157 --file=FILE[:TEMPLATE]
17158 instantiate the configuration file FILE
17159 --header=FILE[:TEMPLATE]
17160 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017161
17162Configuration files:
17163$config_files
17164
17165Configuration headers:
17166$config_headers
17167
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017168Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17172ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017173ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017174python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017175configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017176 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017177
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017178Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017179This config.status script is free software; the Free Software Foundation
17180gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017181
17182ac_pwd='$ac_pwd'
17183srcdir='$srcdir'
17184INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017185MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017186test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017187_ACEOF
17188
Matthias Kloseb9621712010-04-24 17:59:49 +000017189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17190# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017191ac_need_defaults=:
17192while test $# != 0
17193do
17194 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017195 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17197 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017198 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017200 --*=)
17201 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17202 ac_optarg=
17203 ac_shift=:
17204 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017206 ac_option=$1
17207 ac_optarg=$2
17208 ac_shift=shift
17209 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017210 esac
17211
Skip Montanaro6dead952003-09-25 14:50:04 +000017212 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017213 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017214 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17215 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017217 $as_echo "$ac_cs_version"; exit ;;
17218 --config | --confi | --conf | --con | --co | --c )
17219 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 debug=: ;;
17222 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017223 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017224 case $ac_optarg in
17225 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017226 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017227 esac
17228 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 ac_need_defaults=false;;
17230 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017231 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017232 case $ac_optarg in
17233 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17234 esac
17235 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017236 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237 --he | --h)
17238 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017239 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017240Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017242 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017243 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17244 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17245 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017246
17247 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017248 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017249Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017250
Matthias Kloseb9621712010-04-24 17:59:49 +000017251 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017252 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017253
17254 esac
17255 shift
17256done
17257
Skip Montanaro6dead952003-09-25 14:50:04 +000017258ac_configure_extra_args=
17259
17260if $ac_cs_silent; then
17261 exec 6>/dev/null
17262 ac_configure_extra_args="$ac_configure_extra_args --silent"
17263fi
17264
17265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017266cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017267if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017268 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017269 shift
17270 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17271 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017272 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017273 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017274fi
17275
Martin v. Löwis11437992002-04-12 09:54:03 +000017276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278exec 5>>config.log
17279{
17280 echo
17281 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17282## Running $as_me. ##
17283_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017284 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017290
Matthias Kloseb9621712010-04-24 17:59:49 +000017291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292
17293# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017294for ac_config_target in $ac_config_targets
17295do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296 case $ac_config_target in
17297 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17298 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17299 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017300 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17301 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017302 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17303 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017304 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017305 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017306 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307
Victor Stinnere0be4232011-10-25 13:06:09 +020017308 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017309 esac
17310done
17311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017312
Martin v. Löwis11437992002-04-12 09:54:03 +000017313# If the user did not use the arguments to specify the items to instantiate,
17314# then the envvar interface is used. Set only those that are not.
17315# We use the long form for the default assignment because of an extremely
17316# bizarre bug on SunOS 4.1.3.
17317if $ac_need_defaults; then
17318 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17319 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17320fi
17321
Skip Montanaro6dead952003-09-25 14:50:04 +000017322# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017324# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325# Hook for its removal unless debugging.
17326# Note that there is a small window in which the directory will not be cleaned:
17327# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017328$debug ||
17329{
Victor Stinnere0be4232011-10-25 13:06:09 +020017330 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017332 : "${ac_tmp:=$tmp}"
17333 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017335 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017336}
Martin v. Löwis11437992002-04-12 09:54:03 +000017337# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017338
Martin v. Löwis11437992002-04-12 09:54:03 +000017339{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017341 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017342} ||
17343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344 tmp=./conf$$-$RANDOM
17345 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017346} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017347ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017348
Matthias Kloseb9621712010-04-24 17:59:49 +000017349# Set up the scripts for CONFIG_FILES section.
17350# No need to generate them if there are no CONFIG_FILES.
17351# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017353
Matthias Kloseb9621712010-04-24 17:59:49 +000017354
17355ac_cr=`echo X | tr X '\015'`
17356# On cygwin, bash can eat \r inside `` if the user requested igncr.
17357# But we know of no other shell where ac_cr would be empty at this
17358# point, so we can use a bashism as a fallback.
17359if test "x$ac_cr" = x; then
17360 eval ac_cr=\$\'\\r\'
17361fi
17362ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17363if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017364 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017365else
17366 ac_cs_awk_cr=$ac_cr
17367fi
17368
Victor Stinnere0be4232011-10-25 13:06:09 +020017369echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017370_ACEOF
17371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372
Matthias Kloseb9621712010-04-24 17:59:49 +000017373{
17374 echo "cat >conf$$subs.awk <<_ACEOF" &&
17375 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17376 echo "_ACEOF"
17377} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017378 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17379ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380ac_delim='%!_!# '
17381for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017382 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017383 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384
Matthias Kloseb9621712010-04-24 17:59:49 +000017385 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17386 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 break
17388 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017389 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 else
17391 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393done
Matthias Kloseb9621712010-04-24 17:59:49 +000017394rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395
Matthias Kloseb9621712010-04-24 17:59:49 +000017396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017397cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017399sed -n '
17400h
17401s/^/S["/; s/!.*/"]=/
17402p
17403g
17404s/^[^!]*!//
17405:repl
17406t repl
17407s/'"$ac_delim"'$//
17408t delim
17409:nl
17410h
17411s/\(.\{148\}\)..*/\1/
17412t more1
17413s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17414p
17415n
17416b repl
17417:more1
17418s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17419p
17420g
17421s/.\{148\}//
17422t nl
17423:delim
17424h
17425s/\(.\{148\}\)..*/\1/
17426t more2
17427s/["\\]/\\&/g; s/^/"/; s/$/"/
17428p
17429b
17430:more2
17431s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17432p
17433g
17434s/.\{148\}//
17435t delim
17436' <conf$$subs.awk | sed '
17437/^[^""]/{
17438 N
17439 s/\n//
17440}
17441' >>$CONFIG_STATUS || ac_write_fail=1
17442rm -f conf$$subs.awk
17443cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17444_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017445cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017446 for (key in S) S_is_set[key] = 1
17447 FS = ""
17448
17449}
17450{
17451 line = $ 0
17452 nfields = split(line, field, "@")
17453 substed = 0
17454 len = length(field[1])
17455 for (i = 2; i < nfields; i++) {
17456 key = field[i]
17457 keylen = length(key)
17458 if (S_is_set[key]) {
17459 value = S[key]
17460 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17461 len += length(value) + length(field[++i])
17462 substed = 1
17463 } else
17464 len += 1 + keylen
17465 }
17466
17467 print line
17468}
17469
17470_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017472cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17473if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17474 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17475else
17476 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017477fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017478 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017479_ACEOF
17480
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017481# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17482# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483# trailing colons and then remove the whole line if VPATH becomes empty
17484# (actually we leave an empty line to preserve line numbers).
17485if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017486 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17487h
17488s///
17489s/^/:/
17490s/[ ]*$/:/
17491s/:\$(srcdir):/:/g
17492s/:\${srcdir}:/:/g
17493s/:@srcdir@:/:/g
17494s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017496x
17497s/\(=[ ]*\).*/\1/
17498G
17499s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500s/^[^=]*=[ ]*$//
17501}'
17502fi
17503
Matthias Kloseb9621712010-04-24 17:59:49 +000017504cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017505fi # test -n "$CONFIG_FILES"
17506
Matthias Kloseb9621712010-04-24 17:59:49 +000017507# Set up the scripts for CONFIG_HEADERS section.
17508# No need to generate them if there are no CONFIG_HEADERS.
17509# This happens for instance with `./config.status Makefile'.
17510if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017511cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017512BEGIN {
17513_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514
Matthias Kloseb9621712010-04-24 17:59:49 +000017515# Transform confdefs.h into an awk script `defines.awk', embedded as
17516# here-document in config.status, that substitutes the proper values into
17517# config.h.in to produce config.h.
17518
17519# Create a delimiter string that does not exist in confdefs.h, to ease
17520# handling of long lines.
17521ac_delim='%!_!# '
17522for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017523 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17524 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 break
17526 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017527 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 else
17529 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17530 fi
17531done
17532
17533# For the awk script, D is an array of macro values keyed by name,
17534# likewise P contains macro parameters if any. Preserve backslash
17535# newline sequences.
17536
17537ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17538sed -n '
17539s/.\{148\}/&'"$ac_delim"'/g
17540t rset
17541:rset
17542s/^[ ]*#[ ]*define[ ][ ]*/ /
17543t def
17544d
17545:def
17546s/\\$//
17547t bsnl
17548s/["\\]/\\&/g
17549s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17550D["\1"]=" \3"/p
17551s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17552d
17553:bsnl
17554s/["\\]/\\&/g
17555s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17556D["\1"]=" \3\\\\\\n"\\/p
17557t cont
17558s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17559t cont
17560d
17561:cont
17562n
17563s/.\{148\}/&'"$ac_delim"'/g
17564t clear
17565:clear
17566s/\\$//
17567t bsnlc
17568s/["\\]/\\&/g; s/^/"/; s/$/"/p
17569d
17570:bsnlc
17571s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17572b cont
17573' <confdefs.h | sed '
17574s/'"$ac_delim"'/"\\\
17575"/g' >>$CONFIG_STATUS || ac_write_fail=1
17576
17577cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17578 for (key in D) D_is_set[key] = 1
17579 FS = ""
17580}
17581/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17582 line = \$ 0
17583 split(line, arg, " ")
17584 if (arg[1] == "#") {
17585 defundef = arg[2]
17586 mac1 = arg[3]
17587 } else {
17588 defundef = substr(arg[1], 2)
17589 mac1 = arg[2]
17590 }
17591 split(mac1, mac2, "(") #)
17592 macro = mac2[1]
17593 prefix = substr(line, 1, index(line, defundef) - 1)
17594 if (D_is_set[macro]) {
17595 # Preserve the white space surrounding the "#".
17596 print prefix "define", macro P[macro] D[macro]
17597 next
17598 } else {
17599 # Replace #undef with comments. This is necessary, for example,
17600 # in the case of _POSIX_SOURCE, which is predefined and required
17601 # on some systems where configure will not decide to define it.
17602 if (defundef == "undef") {
17603 print "/*", prefix defundef, macro, "*/"
17604 next
17605 }
17606 }
17607}
17608{ print }
17609_ACAWK
17610_ACEOF
17611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017612 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017613fi # test -n "$CONFIG_HEADERS"
17614
17615
17616eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17617shift
17618for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619do
17620 case $ac_tag in
17621 :[FHLC]) ac_mode=$ac_tag; continue;;
17622 esac
17623 case $ac_mode$ac_tag in
17624 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017625 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626 :[FH]-) ac_tag=-:-;;
17627 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17628 esac
17629 ac_save_IFS=$IFS
17630 IFS=:
17631 set x $ac_tag
17632 IFS=$ac_save_IFS
17633 shift
17634 ac_file=$1
17635 shift
17636
17637 case $ac_mode in
17638 :L) ac_source=$1;;
17639 :[FH])
17640 ac_file_inputs=
17641 for ac_f
17642 do
17643 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017644 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017645 *) # Look for the file first in the build tree, then in the source tree
17646 # (if the path is not absolute). The absolute path cannot be DOS-style,
17647 # because $ac_f cannot contain `:'.
17648 test -f "$ac_f" ||
17649 case $ac_f in
17650 [\\/$]*) false;;
17651 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17652 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017653 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17656 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657 done
17658
17659 # Let's still pretend it is `configure' which instantiates (i.e., don't
17660 # use $as_me), people would be surprised to read:
17661 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017662 configure_input='Generated from '`
17663 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17664 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 if test x"$ac_file" != x-; then
17666 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017667 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17668$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017670 # Neutralize special characters interpreted by sed in replacement strings.
17671 case $configure_input in #(
17672 *\&* | *\|* | *\\* )
17673 ac_sed_conf_input=`$as_echo "$configure_input" |
17674 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17675 *) ac_sed_conf_input=$configure_input;;
17676 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677
17678 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017679 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17680 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681 esac
17682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017683 esac
17684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017686$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017687 X"$ac_file" : 'X\(//\)[^/]' \| \
17688 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017690$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017691 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17692 s//\1/
17693 q
17694 }
17695 /^X\(\/\/\)[^/].*/{
17696 s//\1/
17697 q
17698 }
17699 /^X\(\/\/\)$/{
17700 s//\1/
17701 q
17702 }
17703 /^X\(\/\).*/{
17704 s//\1/
17705 q
17706 }
17707 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017708 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017709 ac_builddir=.
17710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711case "$ac_dir" in
17712.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17713*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017714 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017716 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 case $ac_top_builddir_sub in
17718 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17719 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17720 esac ;;
17721esac
17722ac_abs_top_builddir=$ac_pwd
17723ac_abs_builddir=$ac_pwd$ac_dir_suffix
17724# for backward compatibility:
17725ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017726
17727case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017729 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017730 ac_top_srcdir=$ac_top_builddir_sub
17731 ac_abs_top_srcdir=$ac_pwd ;;
17732 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017733 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 ac_top_srcdir=$srcdir
17735 ac_abs_top_srcdir=$srcdir ;;
17736 *) # Relative name.
17737 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17738 ac_top_srcdir=$ac_top_build_prefix$srcdir
17739 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017740esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017742
Martin v. Löwis11437992002-04-12 09:54:03 +000017743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 case $ac_mode in
17745 :F)
17746 #
17747 # CONFIG_FILE
17748 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017749
17750 case $INSTALL in
17751 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017754 ac_MKDIR_P=$MKDIR_P
17755 case $MKDIR_P in
17756 [\\/$]* | ?:[\\/]* ) ;;
17757 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17758 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017759_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760
Matthias Kloseb9621712010-04-24 17:59:49 +000017761cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762# If the template does not know about datarootdir, expand it.
17763# FIXME: This hack should be removed a few years after 2.60.
17764ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017765ac_sed_dataroot='
17766/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017767 p
17768 q
17769}
17770/@datadir@/p
17771/@docdir@/p
17772/@infodir@/p
17773/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017774/@mandir@/p'
17775case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776*datarootdir*) ac_datarootdir_seen=yes;;
17777*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17779$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782 ac_datarootdir_hack='
17783 s&@datadir@&$datadir&g
17784 s&@docdir@&$docdir&g
17785 s&@infodir@&$infodir&g
17786 s&@localedir@&$localedir&g
17787 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017788 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789esac
17790_ACEOF
17791
17792# Neutralize VPATH when `$srcdir' = `.'.
17793# Shell code in configure.ac might set extrasub.
17794# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017795cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17796ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017797$extrasub
17798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017800:t
17801/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017802s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017804s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805s&@srcdir@&$ac_srcdir&;t t
17806s&@abs_srcdir@&$ac_abs_srcdir&;t t
17807s&@top_srcdir@&$ac_top_srcdir&;t t
17808s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17809s&@builddir@&$ac_builddir&;t t
17810s&@abs_builddir@&$ac_abs_builddir&;t t
17811s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17812s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017813s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017815"
Victor Stinnere0be4232011-10-25 13:06:09 +020017816eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17817 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017819test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017820 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17821 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17822 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017824which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017825$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017826which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017827
Victor Stinnere0be4232011-10-25 13:06:09 +020017828 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017829 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017830 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17831 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017832 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017833 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834 ;;
17835 :H)
17836 #
17837 # CONFIG_HEADER
17838 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017839 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017840 {
17841 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017842 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17843 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017844 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017845 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017846 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17847$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017848 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017849 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017850 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017851 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017852 fi
17853 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017854 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017855 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017856 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860
17861 esac
17862
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017863
17864 case $ac_file$ac_mode in
17865 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17866
17867 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868done # for ac_tag
17869
Guido van Rossum627b2d71993-12-24 10:39:16 +000017870
Matthias Kloseb9621712010-04-24 17:59:49 +000017871as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017872_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017873ac_clean_files=$ac_clean_files_save
17874
Matthias Kloseb9621712010-04-24 17:59:49 +000017875test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017876 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017877
Martin v. Löwis11437992002-04-12 09:54:03 +000017878
17879# configure is writing to config.log, and then calls config.status.
17880# config.status does its own redirection, appending to config.log.
17881# Unfortunately, on DOS this fails, as config.log is still kept open
17882# by configure, so config.status won't be able to write to it; its
17883# output is simply discarded. So we exec the FD to /dev/null,
17884# effectively closing config.log, so it can be properly (re)opened and
17885# appended to by config.status. When coming back to configure, we
17886# need to make the FD available again.
17887if test "$no_create" != yes; then
17888 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017889 ac_config_status_args=
17890 test "$silent" = yes &&
17891 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017892 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017893 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017894 exec 5>>config.log
17895 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17896 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017897 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017898fi
17899if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17901$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017902fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017903
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017904
Christian Heimes75ed8902013-11-20 01:11:18 +010017905echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017906if test ! -f Modules/Setup
17907then
17908 cp $srcdir/Modules/Setup.dist Modules/Setup
17909fi
17910
Christian Heimes75ed8902013-11-20 01:11:18 +010017911echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017912if test ! -f Modules/Setup.local
17913then
17914 echo "# Edit this file for local setup changes" >Modules/Setup.local
17915fi
17916
Christian Heimes75ed8902013-11-20 01:11:18 +010017917echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017918$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17919 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017920 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017921mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017922
17923if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17924 echo "" >&6
17925 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017926 echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017927 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017928 echo "" >&6
17929 echo "" >&6
17930fi
17931