blob: 8a763ef6e495ffd2f539697ff48cacc63bbfaf6b [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 +0000649LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200669CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000670OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700671LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700672target_os
673target_vendor
674target_cpu
675target
676LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_ERR
678LLVM_PROF_FILE
679LLVM_PROF_MERGER
680PGO_PROF_USE_FLAG
681PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700682DEF_MAKE_RULE
683DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000685LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100686MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000687INSTALL_DATA
688INSTALL_SCRIPT
689INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200690ac_ct_READELF
691READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000692ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000694AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000695GNULD
696LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000697LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000698RUNSHARED
699INSTSONAME
700LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000701PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000702BLDLIBRARY
703DLLLIBRARY
704LDLIBRARY
705LIBRARY
706BUILDEXEEXT
707EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200708NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200709MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710PLATFORM_TRIPLET
711MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200712ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000713MAINCC
714CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700715SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716GREP
717CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000718OBJEXT
719EXEEXT
720ac_ct_CC
721CPPFLAGS
722LDFLAGS
723CFLAGS
724CC
725EXPORT_MACOSX_DEPLOYMENT_TARGET
726CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200727_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000728MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000729FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800731FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000732FRAMEWORKALTINSTALLLAST
733FRAMEWORKALTINSTALLFIRST
734FRAMEWORKINSTALLLAST
735FRAMEWORKINSTALLFIRST
736PYTHONFRAMEWORKINSTALLDIR
737PYTHONFRAMEWORKPREFIX
738PYTHONFRAMEWORKDIR
739PYTHONFRAMEWORKIDENTIFIER
740PYTHONFRAMEWORK
741LIPO_32BIT_FLAGS
742ARCH_RUN_32BIT
743UNIVERSALSDK
744CONFIG_ARGS
745SOVERSION
746VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200747PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200748PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100749host_os
750host_vendor
751host_cpu
752host
753build_os
754build_vendor
755build_cpu
756build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500757HAS_GIT
758GITBRANCH
759GITTAG
760GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400761BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000762target_alias
763host_alias
764build_alias
765LIBS
766ECHO_T
767ECHO_N
768ECHO_C
769DEFS
770mandir
771localedir
772libdir
773psdir
774pdfdir
775dvidir
776htmldir
777infodir
778docdir
779oldincludedir
780includedir
Antoine Pitroua6a4dc82017-09-07 18:56:24 +0200781runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000782localstatedir
783sharedstatedir
784sysconfdir
785datadir
786datarootdir
787libexecdir
788sbindir
789bindir
790program_transform_name
791prefix
792exec_prefix
793PACKAGE_URL
794PACKAGE_BUGREPORT
795PACKAGE_STRING
796PACKAGE_VERSION
797PACKAGE_TARNAME
798PACKAGE_NAME
799PATH_SEPARATOR
800SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000801ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000802ac_user_opts='
803enable_option_checking
804enable_universalsdk
805with_universal_archs
806with_framework_name
807enable_framework
808with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600809with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_cxx_main
811with_suffix
812enable_shared
813enable_profiling
814with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200815with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000816enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700817with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100818with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100819with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_libs
821with_system_expat
822with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100823with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000824enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700825with_tcltk_includes
826with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000828enable_ipv6
829with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000831with_c_locale_coercion
832with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700834with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_fpectl
836with_libm
837with_libc
838enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800840with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000841'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 ac_precious_vars='build_alias
843host_alias
844target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100845MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846CC
847CFLAGS
848LDFLAGS
849LIBS
850CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100851CPP
852PKG_CONFIG
853PKG_CONFIG_PATH
854PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000858ac_init_help=
859ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000860ac_unrecognized_opts=
861ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# The variables have the same names as the options, with
863# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867no_recursion=
868prefix=NONE
869program_prefix=NONE
870program_suffix=NONE
871program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876x_includes=NONE
877x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879# Installation directory options.
880# These are left unexpanded so users can "make install exec_prefix=/foo"
881# and all the variables that are supposed to be based on exec_prefix
882# by default will actually change.
883# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885bindir='${exec_prefix}/bin'
886sbindir='${exec_prefix}/sbin'
887libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888datarootdir='${prefix}/share'
889datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890sysconfdir='${prefix}/etc'
891sharedstatedir='${prefix}/com'
892localstatedir='${prefix}/var'
Antoine Pitroua6a4dc82017-09-07 18:56:24 +0200893runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894includedir='${prefix}/include'
895oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 ac_prev=
914 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
934 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200965 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200991 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 no_create=yes ;;
1082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001146 -runstatedir | --runstatedir | --runstatedi | --runstated \
1147 | --runstate | --runstat | --runsta | --runst | --runs \
1148 | --run | --ru | --r)
1149 ac_prev=runstatedir ;;
1150 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1151 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1152 | --run=* | --ru=* | --r=*)
1153 runstatedir=$ac_optarg ;;
1154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1156 ac_prev=sbindir ;;
1157 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1158 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
1161 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1162 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1163 | --sharedst | --shareds | --shared | --share | --shar \
1164 | --sha | --sh)
1165 ac_prev=sharedstatedir ;;
1166 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1167 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1168 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1169 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 -site | --site | --sit)
1173 ac_prev=site ;;
1174 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1178 ac_prev=srcdir ;;
1179 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1183 | --syscon | --sysco | --sysc | --sys | --sy)
1184 ac_prev=sysconfdir ;;
1185 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1186 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1195 verbose=yes ;;
1196
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 -version | --version | --versio | --versi | --vers | -V)
1198 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"with_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
1213 esac
1214 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 --x)
1233 # Obsolete; use --with-x.
1234 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237 | --x-incl | --x-inc | --x-in | --x-i)
1238 ac_prev=x_includes ;;
1239 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245 ac_prev=x_libraries ;;
1246 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1251Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ;;
1253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 *=*)
1255 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 case $ac_envvar in #(
1258 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 export $ac_envvar ;;
1263
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001264 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001269 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 ;;
1271
1272 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273done
1274
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278fi
1279
Matthias Kloseb9621712010-04-24 17:59:49 +00001280if test -n "$ac_unrecognized_opts"; then
1281 case $enable_option_checking in
1282 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001284 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285 esac
1286fi
1287
1288# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290 datadir sysconfdir sharedstatedir localstatedir includedir \
1291 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001292 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001295 # Remove trailing slashes.
1296 case $ac_val in
1297 */ )
1298 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299 eval $ac_var=\$ac_val;;
1300 esac
1301 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001302 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 [\\/$]* | ?:[\\/]* ) continue;;
1304 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# There might be people who depend on the old broken behavior: `$host'
1310# used to hold the argument of --host etc.
1311# FIXME: To remove some day.
1312build=$build_alias
1313host=$host_alias
1314target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# FIXME: To remove some day.
1317if test "x$host_alias" != x; then
1318 if test "x$build_alias" = x; then
1319 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001320 elif test "x$build_alias" != "x$host_alias"; then
1321 cross_compiling=yes
1322 fi
1323fi
1324
1325ac_tool_prefix=
1326test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328test "$silent" = yes && exec 6>/dev/null
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332ac_ls_di=`ls -di .` &&
1333ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337
1338
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339# Find the source files, if location was not specified.
1340if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 ac_confdir=`$as_dirname -- "$as_myself" ||
1344$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345 X"$as_myself" : 'X\(//\)[^/]' \| \
1346 X"$as_myself" : 'X\(//\)$' \| \
1347 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)[^/].*/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\).*/{
1362 s//\1/
1363 q
1364 }
1365 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001366 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368 srcdir=..
1369 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370else
1371 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373if test ! -r "$srcdir/$ac_unique_file"; then
1374 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1378ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380 pwd)`
1381# When building in place, set srcdir=.
1382if test "$ac_abs_confdir" = "$ac_pwd"; then
1383 srcdir=.
1384fi
1385# Remove unnecessary trailing slashes from srcdir.
1386# Double slashes in file names in object file debugging info
1387# mess up M-x gdb in Emacs.
1388case $srcdir in
1389*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1390esac
1391for ac_var in $ac_precious_vars; do
1392 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_env_${ac_var}_value=\$${ac_var}
1394 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1396done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398#
1399# Report the --help message.
1400#
1401if test "$ac_init_help" = "long"; then
1402 # Omit some internal or obsolete options to make the list less imposing.
1403 # This message is too long to be a string in the A/UX 3.1 sh.
1404 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001405\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Usage: $0 [OPTION]... [VAR=VALUE]...
1408
1409To assign environment variables (e.g., CC, CFLAGS...), specify them as
1410VAR=VALUE. See below for descriptions of some of the useful variables.
1411
1412Defaults for the options are specified in brackets.
1413
1414Configuration:
1415 -h, --help display this help and exit
1416 --help=short display options specific to this package
1417 --help=recursive display the short help of all the included packages
1418 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001419 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --cache-file=FILE cache test results in FILE [disabled]
1421 -C, --config-cache alias for \`--cache-file=config.cache'
1422 -n, --no-create do not create output files
1423 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425Installation directories:
1426 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431By default, \`make install' will install all the files in
1432\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1433an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1434for instance \`--prefix=\$HOME'.
1435
1436For better control, use the options below.
1437
1438Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 --bindir=DIR user executables [EPREFIX/bin]
1440 --sbindir=DIR system admin executables [EPREFIX/sbin]
1441 --libexecdir=DIR program executables [EPREFIX/libexec]
1442 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1443 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1444 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001445 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --libdir=DIR object code libraries [EPREFIX/lib]
1447 --includedir=DIR C header files [PREFIX/include]
1448 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1449 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1450 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1451 --infodir=DIR info documentation [DATAROOTDIR/info]
1452 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1453 --mandir=DIR man documentation [DATAROOTDIR/man]
1454 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1455 --htmldir=DIR html documentation [DOCDIR]
1456 --dvidir=DIR dvi documentation [DOCDIR]
1457 --pdfdir=DIR pdf documentation [DOCDIR]
1458 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460
1461 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001462
1463System types:
1464 --build=BUILD configure for building on BUILD [guessed]
1465 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001466 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468fi
1469
1470if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001472 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 cat <<\_ACEOF
1475
1476Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1479 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001480 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001481 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-framework[=INSTALLDIR]
1483 Build (MacOSX|Darwin) framework
1484 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001485 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001486 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1487 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001488 --enable-loadable-sqlite-extensions
1489 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --enable-ipv6 Enable ipv6 (with ipv4) support
1491 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001492 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495Optional Packages:
1496 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1497 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001498 --with-universal-archs=ARCH
1499 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001500 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001501 --with-framework-name=FRAMEWORK
1502 specify an alternate name of the framework built
1503 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001505 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001506 --with-cxx-main=<compiler>
1507 compile main() and link python executable with C++
1508 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-suffix=.exe set executable suffix
1510 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001511 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001512 --with-lto Enable Link Time Optimization in any build. Disabled
1513 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001514 --with-hash-algorithm=[fnv|siphash24]
1515 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001516 --with-address-sanitizer
1517 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001519 --with-system-expat build pyexpat module using an installed expat
1520 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001521 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001522 --with-system-libmpdec build _decimal module using an installed libmpdec
1523 library
Ned Deilyd819b932013-09-06 01:07:05 -07001524 --with-tcltk-includes='-I...'
1525 override search for Tcl and Tk include files
1526 --with-tcltk-libs='-L...'
1527 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001528 --with-dbmliborder=db1:db2:...
1529 order to check db backends for dbm. Valid value is a
1530 colon separated string with the backend names
1531 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with(out)-doc-strings disable/enable documentation strings
1533 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001534 --with(out)-c-locale-coercion
1535 disable/enable C locale coercion to a UTF-8 based
1536 locale
1537 --with(out)-c-locale-warning
1538 disable/enable locale compatibility warning in the C
1539 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001540 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001541 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001542 --with-fpectl enable SIGFPE catching
1543 --with-libm=STRING math library
1544 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001545 --with(out)-computed-gotos
1546 Use computed gotos in evaluation loop (enabled by
1547 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001548 --with(out)-ensurepip=[=upgrade]
1549 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
1551Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001552 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 CC C compiler command
1554 CFLAGS C compiler flags
1555 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1556 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001561 PKG_CONFIG path to pkg-config utility
1562 PKG_CONFIG_PATH
1563 directories to add to pkg-config's search path
1564 PKG_CONFIG_LIBDIR
1565 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
1567Use these variables to override the choices made by `configure' or to help
1568it to find libraries and programs with nonstandard names/locations.
1569
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001570Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001573fi
1574
1575if test "$ac_init_help" = "recursive"; then
1576 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -d "$ac_dir" ||
1579 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_builddir=.
1582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583case "$ac_dir" in
1584.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $ac_top_builddir_sub in
1590 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592 esac ;;
1593esac
1594ac_abs_top_builddir=$ac_pwd
1595ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596# for backward compatibility:
1597ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001598
1599case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$ac_top_builddir_sub
1603 ac_abs_top_srcdir=$ac_pwd ;;
1604 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 ac_top_srcdir=$srcdir
1607 ac_abs_top_srcdir=$srcdir ;;
1608 *) # Relative name.
1609 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610 ac_top_srcdir=$ac_top_build_prefix$srcdir
1611 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001612esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 cd "$ac_dir" || { ac_status=$?; continue; }
1616 # Check for guested configure.
1617 if test -f "$ac_srcdir/configure.gnu"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620 elif test -f "$ac_srcdir/configure"; then
1621 echo &&
1622 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 fi || ac_status=$?
1626 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 done
1628fi
1629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if $ac_init_version; then
1632 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001633python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001635
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001637This configure script is free software; the Free Software Foundation
1638gives unlimited permission to copy, distribute and modify it.
1639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001642
1643## ------------------------ ##
1644## Autoconf initialization. ##
1645## ------------------------ ##
1646
1647# ac_fn_c_try_compile LINENO
1648# --------------------------
1649# Try to compile conftest.$ac_ext, and return whether this succeeded.
1650ac_fn_c_try_compile ()
1651{
1652 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653 rm -f conftest.$ac_objext
1654 if { { ac_try="$ac_compile"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_compile") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } && {
1670 test -z "$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 } && test -s conftest.$ac_objext; then :
1673 ac_retval=0
1674else
1675 $as_echo "$as_me: failed program was:" >&5
1676sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_compile
1684
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } > conftest.i && {
1707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
Matthias Kloseb9621712010-04-24 17:59:49 +00001722# ac_fn_c_try_link LINENO
1723# -----------------------
1724# Try to link conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_c_try_link ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext conftest$ac_exeext
1729 if { { ac_try="$ac_link"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_link") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_c_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest$ac_exeext && {
1748 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001749 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 }; then :
1751 ac_retval=0
1752else
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=1
1757fi
1758 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1759 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1760 # interfere with the next link command; also delete a directory that is
1761 # left behind by Apple's compiler. We do this before executing the actions.
1762 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_link
1767
Matthias Kloseb9621712010-04-24 17:59:49 +00001768# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1769# -------------------------------------------------------
1770# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1771# the include files in INCLUDES and setting the cache variable VAR
1772# accordingly.
1773ac_fn_c_check_header_mongrel ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001779if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 $as_echo_n "(cached) " >&6
1781fi
1782eval ac_res=\$$3
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784$as_echo "$ac_res" >&6; }
1785else
1786 # Is the header compilable?
1787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1788$as_echo_n "checking $2 usability... " >&6; }
1789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790/* end confdefs.h. */
1791$4
1792#include <$2>
1793_ACEOF
1794if ac_fn_c_try_compile "$LINENO"; then :
1795 ac_header_compiler=yes
1796else
1797 ac_header_compiler=no
1798fi
1799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1801$as_echo "$ac_header_compiler" >&6; }
1802
1803# Is the header present?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1805$as_echo_n "checking $2 presence... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808#include <$2>
1809_ACEOF
1810if ac_fn_c_try_cpp "$LINENO"; then :
1811 ac_header_preproc=yes
1812else
1813 ac_header_preproc=no
1814fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001815rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1817$as_echo "$ac_header_preproc" >&6; }
1818
1819# So? What about this header?
1820case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1821 yes:no: )
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1823$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1826 ;;
1827 no:yes:* )
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1829$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1831$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1833$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1835$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001838( $as_echo "## --------------------------------------- ##
1839## Report this to https://bugs.python.org/ ##
1840## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 ) | sed "s/^/$as_me: WARNING: /" >&2
1842 ;;
1843esac
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001846if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 $as_echo_n "(cached) " >&6
1848else
1849 eval "$3=\$ac_header_compiler"
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001856
1857} # ac_fn_c_check_header_mongrel
1858
1859# ac_fn_c_try_run LINENO
1860# ----------------------
1861# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1862# that executables *can* be run.
1863ac_fn_c_try_run ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 if { { ac_try="$ac_link"
1867case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_link") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1877 { { case "(($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_try") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; }; }; then :
1887 ac_retval=0
1888else
1889 $as_echo "$as_me: program exited with status $ac_status" >&5
1890 $as_echo "$as_me: failed program was:" >&5
1891sed 's/^/| /' conftest.$ac_ext >&5
1892
1893 ac_retval=$ac_status
1894fi
1895 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001896 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 as_fn_set_status $ac_retval
1898
1899} # ac_fn_c_try_run
1900
1901# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902# -------------------------------------------------------
1903# Tests whether HEADER exists and can be compiled using the include files in
1904# INCLUDES, setting the cache variable VAR accordingly.
1905ac_fn_c_check_header_compile ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001911 $as_echo_n "(cached) " >&6
1912else
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916#include <$2>
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 eval "$3=yes"
1920else
1921 eval "$3=no"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_check_header_compile
1931
Matthias Kloseb9621712010-04-24 17:59:49 +00001932# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1933# -------------------------------------------
1934# Tests whether TYPE exists after having included INCLUDES, setting cache
1935# variable VAR accordingly.
1936ac_fn_c_check_type ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$4
1948int
1949main ()
1950{
1951if (sizeof ($2))
1952 return 0;
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$4
1961int
1962main ()
1963{
1964if (sizeof (($2)))
1965 return 0;
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 eval "$3=yes"
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984} # ac_fn_c_check_type
1985
Matthias Kloseb9621712010-04-24 17:59:49 +00001986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_hi=-1 ac_mid=-1
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002099test_array [0] = 0;
2100return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid
2108else
2109 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112done
2113case $ac_lo in #((
2114?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2115'') ac_retval=1 ;;
2116esac
2117 else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121static long int longval () { return $2; }
2122static unsigned long int ulongval () { return $2; }
2123#include <stdio.h>
2124#include <stdlib.h>
2125int
2126main ()
2127{
2128
2129 FILE *f = fopen ("conftest.val", "w");
2130 if (! f)
2131 return 1;
2132 if (($2) < 0)
2133 {
2134 long int i = longval ();
2135 if (i != ($2))
2136 return 1;
2137 fprintf (f, "%ld", i);
2138 }
2139 else
2140 {
2141 unsigned long int i = ulongval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%lu", i);
2145 }
2146 /* Do not output a trailing newline, as this causes \r\n confusion
2147 on some platforms. */
2148 return ferror (f) || fclose (f) != 0;
2149
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_run "$LINENO"; then :
2155 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2156else
2157 ac_retval=1
2158fi
2159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2160 conftest.$ac_objext conftest.beam conftest.$ac_ext
2161rm -f conftest.val
2162
2163 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002164 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002165 as_fn_set_status $ac_retval
2166
2167} # ac_fn_c_compute_int
2168
2169# ac_fn_c_check_func LINENO FUNC VAR
2170# ----------------------------------
2171# Tests whether FUNC exists, setting the cache variable VAR accordingly
2172ac_fn_c_check_func ()
2173{
2174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002177if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 $as_echo_n "(cached) " >&6
2179else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2184#define $2 innocuous_$2
2185
2186/* System header to define __stub macros and hopefully few prototypes,
2187 which can conflict with char $2 (); below.
2188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2189 <limits.h> exists even on freestanding compilers. */
2190
2191#ifdef __STDC__
2192# include <limits.h>
2193#else
2194# include <assert.h>
2195#endif
2196
2197#undef $2
2198
2199/* Override any GCC internal prototype to avoid an error.
2200 Use char because int might match the return type of a GCC
2201 builtin and then its argument prototype would still apply. */
2202#ifdef __cplusplus
2203extern "C"
2204#endif
2205char $2 ();
2206/* The GNU C library defines this for functions which it implements
2207 to always fail with ENOSYS. Some functions are actually named
2208 something starting with __ and the normal name is an alias. */
2209#if defined __stub_$2 || defined __stub___$2
2210choke me
2211#endif
2212
2213int
2214main ()
2215{
2216return $2 ();
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_link "$LINENO"; then :
2222 eval "$3=yes"
2223else
2224 eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext \
2227 conftest$ac_exeext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002232 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002233
2234} # ac_fn_c_check_func
2235
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002236# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2237# ---------------------------------------------
2238# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2239# accordingly.
2240ac_fn_c_check_decl ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 as_decl_name=`echo $2|sed 's/ *(.*//'`
2244 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2246$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2247if eval \${$3+:} false; then :
2248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$4
2253int
2254main ()
2255{
2256#ifndef $as_decl_name
2257#ifdef __cplusplus
2258 (void) $as_decl_use;
2259#else
2260 (void) $as_decl_name;
2261#endif
2262#endif
2263
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$3=yes"
2270else
2271 eval "$3=no"
2272fi
2273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274fi
2275eval ac_res=\$$3
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2277$as_echo "$ac_res" >&6; }
2278 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279
2280} # ac_fn_c_check_decl
2281
Matthias Kloseb9621712010-04-24 17:59:49 +00002282# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2283# ----------------------------------------------------
2284# Tries to find if the field MEMBER exists in type AGGR, after including
2285# INCLUDES, setting cache variable VAR accordingly.
2286ac_fn_c_check_member ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2290$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002291if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$5
2297int
2298main ()
2299{
2300static $2 ac_aggr;
2301if (ac_aggr.$3)
2302return 0;
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307if ac_fn_c_try_compile "$LINENO"; then :
2308 eval "$4=yes"
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$5
2313int
2314main ()
2315{
2316static $2 ac_aggr;
2317if (sizeof ac_aggr.$3)
2318return 0;
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$4=yes"
2325else
2326 eval "$4=no"
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$4
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002335 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Ned Deily4829bc62016-09-12 17:29:04 -04002342It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002343generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002454## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 echo
2457 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac ;;
2472 esac
2473 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac |
2485 sort
2486)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002488
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002490## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_files
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517 fi
2518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002521## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577 # We do not want a PATH search for config.site.
2578 case $CONFIG_SITE in #((
2579 -*) ac_site_file1=./$CONFIG_SITE;;
2580 */*) ac_site_file1=$CONFIG_SITE;;
2581 *) ac_site_file1=./$CONFIG_SITE;;
2582 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$prefix/share/config.site
2585 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586else
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$ac_default_prefix/share/config.site
2588 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002590for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591do
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 test "x$ac_site_file" = xNONE && continue
2593 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597 . "$ac_site_file" \
2598 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2600as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002601See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602 fi
2603done
2604
2605if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 # Some versions of bash will fail to source /dev/null (special files
2607 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2608 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2610$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2613 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 esac
2615 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2618$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 >$cache_file
2620fi
2621
2622# Check that the precious variables saved in the cache have kept the same
2623# value.
2624ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2627 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2629 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 case $ac_old_set,$ac_new_set in
2631 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2633$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 +00002634 ac_cache_corrupted=: ;;
2635 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2637$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_cache_corrupted=: ;;
2639 ,);;
2640 *)
2641 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 # differences in whitespace do not lead to failure.
2643 ac_old_val_w=`echo x $ac_old_val`
2644 ac_new_val_w=`echo x $ac_new_val`
2645 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2647$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2648 ac_cache_corrupted=:
2649 else
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2651$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2652 eval $ac_var=\$ac_old_val
2653 fi
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2655$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2657$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 fi;;
2659 esac
2660 # Pass precious variables to config.status.
2661 if test "$ac_new_set" = set; then
2662 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 *) ac_arg=$ac_var=$ac_new_val ;;
2665 esac
2666 case " $ac_configure_args " in
2667 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
2671done
2672if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2676$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002677 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002679## -------------------- ##
2680## Main body of script. ##
2681## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682
Guido van Rossum7f43da71994-08-01 12:15:30 +00002683ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002692if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693 # If we're building out-of-tree, we need to make sure the following
2694 # resources get picked up before their $srcdir counterparts.
2695 # Objects/ -> typeslots.inc
2696 # Include/ -> Python-ast.h, graminit.h
2697 # Python/ -> importlib.h
2698 # (A side effect of this is that these resources will automatically be
2699 # regenerated when building out-of-tree, regardless of whether or not
2700 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2701 # off.)
2702 BASECPPFLAGS="-IObjects -IInclude -IPython"
2703else
2704 BASECPPFLAGS=""
2705fi
2706
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707
2708
2709
2710
Victor Stinner9ed34a82017-05-02 22:35:58 +02002711if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713# Extract the first word of "git", so it can be a program name with args.
2714set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2716$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002717if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718 $as_echo_n "(cached) " >&6
2719else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720 if test -n "$HAS_GIT"; then
2721 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722else
2723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724for as_dir in $PATH
2725do
2726 IFS=$as_save_IFS
2727 test -z "$as_dir" && as_dir=.
2728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732 break 2
2733 fi
2734done
2735 done
2736IFS=$as_save_IFS
2737
Ned Deily5c4b0d02017-03-04 00:19:55 -05002738 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739fi
2740fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741HAS_GIT=$ac_cv_prog_HAS_GIT
2742if test -n "$HAS_GIT"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2744$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745else
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2747$as_echo "no" >&6; }
2748fi
2749
2750
2751else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755then
Ned Deily554626a2017-03-20 23:41:52 -04002756 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2757 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 GITVERSION=""
2761 GITTAG=""
2762 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
2764
2765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002767
2768
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002769ac_aux_dir=
2770for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2771 if test -f "$ac_dir/install-sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install-sh -c"
2774 break
2775 elif test -f "$ac_dir/install.sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install.sh -c"
2778 break
2779 elif test -f "$ac_dir/shtool"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/shtool install -c"
2782 break
2783 fi
2784done
2785if test -z "$ac_aux_dir"; then
2786 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2787fi
2788
2789# These three variables are undocumented and unsupported,
2790# and are intended to be withdrawn in a future Autoconf release.
2791# They can cause serious problems if a builder's source tree is in a directory
2792# whose full name contains unusual characters.
2793ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2794ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2795ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2796
2797
2798# Make sure we can run config.sub.
2799$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2800 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2801
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2803$as_echo_n "checking build system type... " >&6; }
2804if ${ac_cv_build+:} false; then :
2805 $as_echo_n "(cached) " >&6
2806else
2807 ac_build_alias=$build_alias
2808test "x$ac_build_alias" = x &&
2809 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2810test "x$ac_build_alias" = x &&
2811 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2812ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2813 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2814
2815fi
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2817$as_echo "$ac_cv_build" >&6; }
2818case $ac_cv_build in
2819*-*-*) ;;
2820*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2821esac
2822build=$ac_cv_build
2823ac_save_IFS=$IFS; IFS='-'
2824set x $ac_cv_build
2825shift
2826build_cpu=$1
2827build_vendor=$2
2828shift; shift
2829# Remember, the first character of IFS is used to create $*,
2830# except with old shells:
2831build_os=$*
2832IFS=$ac_save_IFS
2833case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2834
2835
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2837$as_echo_n "checking host system type... " >&6; }
2838if ${ac_cv_host+:} false; then :
2839 $as_echo_n "(cached) " >&6
2840else
2841 if test "x$host_alias" = x; then
2842 ac_cv_host=$ac_cv_build
2843else
2844 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2846fi
2847
2848fi
2849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2850$as_echo "$ac_cv_host" >&6; }
2851case $ac_cv_host in
2852*-*-*) ;;
2853*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2854esac
2855host=$ac_cv_host
2856ac_save_IFS=$IFS; IFS='-'
2857set x $ac_cv_host
2858shift
2859host_cpu=$1
2860host_vendor=$2
2861shift; shift
2862# Remember, the first character of IFS is used to create $*,
2863# except with old shells:
2864host_os=$*
2865IFS=$ac_save_IFS
2866case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2867
2868
2869
doko@python.orga10e4a92013-01-25 18:45:12 +01002870
2871
Ned Deilyfcbc2462014-08-22 13:32:49 -07002872# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2873rm -f pybuilddir.txt
2874
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002875for ac_prog in python$PACKAGE_VERSION python3 python
2876do
2877 # Extract the first word of "$ac_prog", so it can be a program name with args.
2878set dummy $ac_prog; ac_word=$2
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2880$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002881if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882 $as_echo_n "(cached) " >&6
2883else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884 if test -n "$PYTHON_FOR_REGEN"; then
2885 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886else
2887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2888for as_dir in $PATH
2889do
2890 IFS=$as_save_IFS
2891 test -z "$as_dir" && as_dir=.
2892 for ac_exec_ext in '' $ac_executable_extensions; do
2893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002894 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2896 break 2
2897 fi
2898done
2899 done
2900IFS=$as_save_IFS
2901
2902fi
2903fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2905if test -n "$PYTHON_FOR_REGEN"; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2907$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002908else
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2910$as_echo "no" >&6; }
2911fi
2912
2913
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
2919
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002920if test "$cross_compiling" = yes; then
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2922$as_echo_n "checking for python interpreter for cross build... " >&6; }
2923 if test -z "$PYTHON_FOR_BUILD"; then
2924 for interp in python$PACKAGE_VERSION python3 python; do
2925 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002926 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 +02002927 break
2928 fi
2929 interp=
2930 done
2931 if test x$interp = x; then
2932 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2933 fi
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2935$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002936 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 +02002937 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002938elif test "$cross_compiling" = maybe; then
2939 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940else
2941 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2942fi
2943
2944
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Ned Deily4829bc62016-09-12 17:29:04 -04002960VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002987# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991
2992
2993
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002994define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002995
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002996# Arguments passed to configure.
2997
2998CONFIG_ARGS="$ac_configure_args"
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3001$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003003if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 case $enableval in
3006 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003007 # Locate the best usable SDK, see Mac/README.txt for more
3008 # information
3009 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003010 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003011 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3013 if test ! -d "${enableval}"
3014 then
3015 enableval=/
3016 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003018 ;;
3019 esac
3020 case $enableval in
3021 no)
3022 UNIVERSALSDK=
3023 enable_universalsdk=
3024 ;;
3025 *)
3026 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 if test ! -d "${UNIVERSALSDK}"
3028 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003029 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003031 ;;
3032 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035else
3036
3037 UNIVERSALSDK=
3038 enable_universalsdk=
3039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042if test -n "${UNIVERSALSDK}"
3043then
Matthias Kloseb9621712010-04-24 17:59:49 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3045$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046else
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3048$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deily87adb6e2013-10-18 21:09:56 -07003053ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003054
Ned Deilycbfb9a52012-06-23 16:02:19 -07003055# For backward compatibility reasons we prefer to select '32-bit' if available,
3056# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058if test "`uname -s`" = "Darwin"
3059then
3060 if test -n "${UNIVERSALSDK}"
3061 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003062 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063 then
3064 UNIVERSAL_ARCHS="intel"
3065 fi
3066 fi
3067fi
3068
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3071$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072
3073# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003074if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076 UNIVERSAL_ARCHS="$withval"
3077
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078fi
3079
Ned Deily87adb6e2013-10-18 21:09:56 -07003080if test -n "${UNIVERSALSDK}"
3081then
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3083$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3084else
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086$as_echo "no" >&6; }
3087fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003089
3090# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092 withval=$with_framework_name;
3093 PYTHONFRAMEWORK=${withval}
3094 PYTHONFRAMEWORKDIR=${withval}.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3096
3097else
3098
3099 PYTHONFRAMEWORK=Python
3100 PYTHONFRAMEWORKDIR=Python.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3102
3103fi
3104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003108 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003110 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003111 esac
3112 case $enableval in
3113 no)
3114 PYTHONFRAMEWORK=
3115 PYTHONFRAMEWORKDIR=no-framework
3116 PYTHONFRAMEWORKPREFIX=
3117 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118 FRAMEWORKINSTALLFIRST=
3119 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003120 FRAMEWORKALTINSTALLFIRST=
3121 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003122 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 if test "x${prefix}" = "xNONE"; then
3124 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3125 else
3126 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3127 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003129 ;;
3130 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003131 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003134 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003135 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3136 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003137 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003139
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE" ; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 else
3144 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3145 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146
3147 case "${enableval}" in
3148 /System*)
3149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3150 if test "${prefix}" = "NONE" ; then
3151 # See below
3152 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3153 fi
3154 ;;
3155
3156 /Library*)
3157 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3158 ;;
3159
3160 */Library/Frameworks)
3161 MDIR="`dirname "${enableval}"`"
3162 MDIR="`dirname "${MDIR}"`"
3163 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3164
3165 if test "${prefix}" = "NONE"; then
3166 # User hasn't specified the
3167 # --prefix option, but wants to install
3168 # the framework in a non-default location,
3169 # ensure that the compatibility links get
3170 # installed relative to that prefix as well
3171 # instead of in /usr/local.
3172 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3173 fi
3174 ;;
3175
3176 *)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 ;;
3179 esac
3180
Jack Jansen127e56e2001-09-11 14:41:54 +00003181 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003183 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3190
3191 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3192
Jack Jansene578a632001-08-15 01:27:14 +00003193 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Guido van Rossum563e7081996-09-10 18:20:48 +00003195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORKPREFIX=
3200 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 FRAMEWORKINSTALLFIRST=
3202 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003203 FRAMEWORKALTINSTALLFIRST=
3204 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003205 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 if test "x${prefix}" = "xNONE" ; then
3207 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3208 else
3209 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3210 fi
Jack Jansene578a632001-08-15 01:27:14 +00003211 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003212
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214fi
3215
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
3217
Michael W. Hudson54241132001-12-07 15:38:26 +00003218
3219
3220
3221
Jack Jansene578a632001-08-15 01:27:14 +00003222
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223
3224
3225
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003226
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003227
Ned Deilyb8f944f2013-11-21 22:42:25 -08003228
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003229
3230cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003231#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232_ACEOF
3233
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003251 *-*-linux-android*)
3252 ac_sys_system=Linux-android
3253 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 *-*-linux*)
3255 ac_sys_system=Linux
3256 ;;
3257 *-*-cygwin*)
3258 ac_sys_system=Cygwin
3259 ;;
3260 *)
3261 # for now, limit cross builds to known configurations
3262 MACHDEP="unknown"
3263 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3264 esac
3265 ac_sys_release=
3266 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003268 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003269 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 fi
3275 ac_md_system=`echo $ac_sys_system |
3276 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3277 ac_md_release=`echo $ac_sys_release |
3278 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3279 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003280
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003282 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003283 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003284 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 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 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Jack Jansen6b08a402004-06-03 12:41:45 +00003433# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3434# it may influence the way we can build extensions, so distutils
3435# needs to check it
3436
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003439EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003440
Guido van Rossum627b2d71993-12-24 10:39:16 +00003441# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003442
3443# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3444# for debug/optimization stuff. BASECFLAGS is for flags that are required
3445# just to get things to compile and link. Users are free to override OPT
3446# when running configure or make. The build should not break if they do.
3447# BASECFLAGS should generally not be messed with, however.
3448
3449# XXX shouldn't some/most/all of this code be merged with the stuff later
3450# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3452$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003455if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003457 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003458 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003459 without_gcc=yes;;
3460 yes) CC=gcc
3461 without_gcc=no;;
3462 *) CC=$withval
3463 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003464 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003467 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003468 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003469 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003470 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003471 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472fi
3473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3475$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003476
Zachary Ware5af85642015-12-21 12:09:17 -06003477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3478$as_echo_n "checking for --with-icc... " >&6; }
3479
3480# Check whether --with-icc was given.
3481if test "${with_icc+set}" = set; then :
3482 withval=$with_icc;
3483 case $withval in
3484 no) CC=${CC:-cc}
3485 with_icc=no;;
3486 yes) CC=icc
3487 CXX=icpc
3488 with_icc=yes;;
3489 *) CC=$withval
3490 with_icc=$withval;;
3491 esac
3492else
3493
3494 with_icc=no
3495fi
3496
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3498$as_echo "$with_icc" >&6; }
3499
Guido van Rossum8b131c51995-03-09 14:10:13 +00003500# If the user switches compilers, we can't believe the cache
3501if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3502then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003503 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003504(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003505fi
3506
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003507# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3508# when the compiler supports them, but we don't always want -O2, and
3509# we set -g later.
3510if test -z "$CFLAGS"; then
3511 CFLAGS=
3512fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003513
3514if test "$ac_sys_system" = "Darwin"
3515then
3516 # Compiler selection on MacOSX is more complicated than
3517 # AC_PROG_CC can handle, see Mac/README.txt for more
3518 # information
3519 if test -z "${CC}"
3520 then
3521 found_gcc=
3522 found_clang=
3523 as_save_IFS=$IFS; IFS=:
3524 for as_dir in $PATH
3525 do
3526 IFS=$as_save_IFS
3527 if test -x $as_dir/gcc; then
3528 if test -z "${found_gcc}"; then
3529 found_gcc=$as_dir/gcc
3530 fi
3531 fi
3532 if test -x $as_dir/clang; then
3533 if test -z "${found_clang}"; then
3534 found_clang=$as_dir/clang
3535 fi
3536 fi
3537 done
3538 IFS=$as_save_IFS
3539
3540 if test -n "$found_gcc" -a -n "$found_clang"
3541 then
3542 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3543 then
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3545$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3546 CC="$found_clang"
3547 CXX="$found_clang++"
3548 fi
3549
3550
3551 elif test -z "$found_gcc" -a -n "$found_clang"
3552 then
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3554$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3555 CC="$found_clang"
3556 CXX="$found_clang++"
3557
3558 elif test -z "$found_gcc" -a -z "$found_clang"
3559 then
3560 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3561 if test -n "${found_clang}"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3564$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3565 CC="${found_clang}"
3566 CXX="`/usr/bin/xcrun -find clang++`"
3567
3568 # else: use default behaviour
3569 fi
3570 fi
3571 fi
3572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003573ac_ext=c
3574ac_cpp='$CPP $CPPFLAGS'
3575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3577ac_compiler_gnu=$ac_cv_c_compiler_gnu
3578if test -n "$ac_tool_prefix"; then
3579 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3580set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3582$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003583if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003585else
3586 if test -n "$CC"; then
3587 ac_cv_prog_CC="$CC" # Let the user override the test.
3588else
Martin v. Löwis11437992002-04-12 09:54:03 +00003589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $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 +00003598 break 2
3599 fi
3600done
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003603
Jack Jansendd19cf82001-12-06 22:36:17 +00003604fi
3605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003606CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003607if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3609$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003610else
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616fi
3617if test -z "$ac_cv_prog_CC"; then
3618 ac_ct_CC=$CC
3619 # Extract the first word of "gcc", so it can be a program name with args.
3620set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003623if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003625else
3626 if test -n "$ac_ct_CC"; then
3627 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3628else
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $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 +00003638 break 2
3639 fi
3640done
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003643
3644fi
3645fi
3646ac_ct_CC=$ac_cv_prog_ac_ct_CC
3647if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3649$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655 if test "x$ac_ct_CC" = x; then
3656 CC=""
3657 else
3658 case $cross_compiling:$ac_tool_warned in
3659yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662ac_tool_warned=yes ;;
3663esac
3664 CC=$ac_ct_CC
3665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666else
3667 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003668fi
3669
Jack Jansendd19cf82001-12-06 22:36:17 +00003670if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 if test -n "$ac_tool_prefix"; then
3672 # 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 +00003673set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3675$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003676if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003678else
3679 if test -n "$CC"; then
3680 ac_cv_prog_CC="$CC" # Let the user override the test.
3681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683for as_dir in $PATH
3684do
3685 IFS=$as_save_IFS
3686 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $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 +00003691 break 2
3692 fi
3693done
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
3697fi
3698fi
3699CC=$ac_cv_prog_CC
3700if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3702$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3705$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003710fi
3711if test -z "$CC"; then
3712 # Extract the first word of "cc", so it can be a program name with args.
3713set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003716if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003718else
3719 if test -n "$CC"; then
3720 ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003722 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726 IFS=$as_save_IFS
3727 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3731 ac_prog_rejected=yes
3732 continue
3733 fi
3734 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 $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 +00003736 break 2
3737 fi
3738done
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003740IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003741
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742if test $ac_prog_rejected = yes; then
3743 # We found a bogon in the path, so make sure we never use it.
3744 set dummy $ac_cv_prog_CC
3745 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747 # We chose a different compiler from the bogus one.
3748 # However, it has the same basename, so the bogon will be chosen
3749 # first if we set CC to just the basename; use the full file name.
3750 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003751 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 fi
3753fi
3754fi
3755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3759$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760else
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3762$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766fi
3767if test -z "$CC"; then
3768 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 do
3771 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3772set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003775if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003777else
3778 if test -n "$CC"; then
3779 ac_cv_prog_CC="$CC" # Let the user override the test.
3780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784 IFS=$as_save_IFS
3785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $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 +00003790 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003792done
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003795
3796fi
3797fi
3798CC=$ac_cv_prog_CC
3799if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3801$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805fi
3806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 test -n "$CC" && break
3809 done
3810fi
3811if test -z "$CC"; then
3812 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003814do
3815 # Extract the first word of "$ac_prog", so it can be a program name with args.
3816set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003819if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
3822 if test -n "$ac_ct_CC"; then
3823 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3824else
3825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $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 +00003834 break 2
3835 fi
3836done
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840fi
3841fi
3842ac_ct_CC=$ac_cv_prog_ac_ct_CC
3843if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3845$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846else
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 test -n "$ac_ct_CC" && break
3853done
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855 if test "x$ac_ct_CC" = x; then
3856 CC=""
3857 else
3858 case $cross_compiling:$ac_tool_warned in
3859yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862ac_tool_warned=yes ;;
3863esac
3864 CC=$ac_ct_CC
3865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
3867
3868fi
3869
3870
Matthias Kloseb9621712010-04-24 17:59:49 +00003871test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003873as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003874See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003875
3876# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003877$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3878set X $ac_compile
3879ac_compiler=$2
3880for ac_option in --version -v -V -qversion; do
3881 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882case "(($ac_try" in
3883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3884 *) ac_try_echo=$ac_try;;
3885esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3887$as_echo "$ac_try_echo"; } >&5
3888 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 if test -s conftest.err; then
3891 sed '10a\
3892... rest of stderr output deleted ...
3893 10q' conftest.err >conftest.er1
3894 cat conftest.er1 >&5
3895 fi
3896 rm -f conftest.er1 conftest.err
3897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3898 test $ac_status = 0; }
3899done
Martin v. Löwis11437992002-04-12 09:54:03 +00003900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003902/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904int
3905main ()
3906{
3907
3908 ;
3909 return 0;
3910}
3911_ACEOF
3912ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003913ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003914# Try to create an executable without -o first, disregard a.out.
3915# It will help us diagnose broken compilers, and finding out an intuition
3916# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3918$as_echo_n "checking whether the C compiler works... " >&6; }
3919ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3920
3921# The possible output files:
3922ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924ac_rmfiles=
3925for ac_file in $ac_files
3926do
3927 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3930 esac
3931done
3932rm -f $ac_rmfiles
3933
Matthias Kloseb9621712010-04-24 17:59:49 +00003934if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935case "(($ac_try" in
3936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3937 *) ac_try_echo=$ac_try;;
3938esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3940$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3946# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3947# in a Makefile. We should not override ac_cv_exeext if it was cached,
3948# so that the user can short-circuit this test for compilers unknown to
3949# Autoconf.
3950for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003951do
3952 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003955 ;;
3956 [ab].out )
3957 # We found the default executable, but exeext='' is most
3958 # certainly right.
3959 break;;
3960 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 then :; else
3963 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3964 fi
3965 # We set ac_cv_exeext here because the later test for it is not
3966 # safe: cross compilers may not add the suffix if given an `-o'
3967 # argument, so we may need to know it at that point already.
3968 # Even if this section looks crufty: it has the advantage of
3969 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003970 break;;
3971 * )
3972 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 esac
3974done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975test "$ac_cv_exeext" = no && ac_cv_exeext=
3976
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003977else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 ac_file=''
3979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003980if test -z "$ac_file"; then :
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982$as_echo "no" >&6; }
3983$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003984sed 's/^/| /' conftest.$ac_ext >&5
3985
Matthias Kloseb9621712010-04-24 17:59:49 +00003986{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003988as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003989See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003990else
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3992$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3995$as_echo_n "checking for C compiler default output file name... " >&6; }
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3997$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999
Matthias Kloseb9621712010-04-24 17:59:49 +00004000rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4003$as_echo_n "checking for suffix of executables... " >&6; }
4004if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005case "(($ac_try" in
4006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007 *) ac_try_echo=$ac_try;;
4008esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4010$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004015 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4016# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4017# work properly (i.e., refer to `conftest.exe'), while it won't with
4018# `rm'.
4019for ac_file in conftest.exe conftest conftest.*; do
4020 test -f "$ac_file" || continue
4021 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4024 break;;
4025 * ) break;;
4026 esac
4027done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028else
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004031as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004032See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004034rm -f conftest conftest$ac_cv_exeext
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4036$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037
4038rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004039EXEEXT=$ac_cv_exeext
4040ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4042/* end confdefs.h. */
4043#include <stdio.h>
4044int
4045main ()
4046{
4047FILE *f = fopen ("conftest.out", "w");
4048 return ferror (f) || fclose (f) != 0;
4049
4050 ;
4051 return 0;
4052}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004054ac_clean_files="$ac_clean_files conftest.out"
4055# Check that the compiler produces executables we can run. If not, either
4056# the compiler is broken, or we cross compile.
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4058$as_echo_n "checking whether we are cross compiling... " >&6; }
4059if test "$cross_compiling" != yes; then
4060 { { ac_try="$ac_link"
4061case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
4065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_link") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }
4071 if { ac_try='./conftest$ac_cv_exeext'
4072 { { case "(($ac_try" in
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077$as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_try") 2>&5
4079 ac_status=$?
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }; }; then
4082 cross_compiling=no
4083 else
4084 if test "$cross_compiling" = maybe; then
4085 cross_compiling=yes
4086 else
4087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004089as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004090If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004091See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 fi
4093 fi
4094fi
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4096$as_echo "$cross_compiling" >&6; }
4097
4098rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4099ac_clean_files=$ac_clean_files_save
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4101$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
4104else
4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004106/* end confdefs.h. */
4107
4108int
4109main ()
4110{
4111
4112 ;
4113 return 0;
4114}
4115_ACEOF
4116rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004117if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004118case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128 for ac_file in conftest.o conftest.obj conftest.*; do
4129 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4133 break;;
4134 esac
4135done
4136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004138sed 's/^/| /' conftest.$ac_ext >&5
4139
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004142as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004143See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4148$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004149OBJEXT=$ac_cv_objext
4150ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4152$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004153if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Martin v. Löwis11437992002-04-12 09:54:03 +00004159int
4160main ()
4161{
4162#ifndef __GNUC__
4163 choke me
4164#endif
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_compiler_gnu=yes
4172else
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176ac_cv_c_compiler_gnu=$ac_compiler_gnu
4177
4178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4180$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4181if test $ac_compiler_gnu = yes; then
4182 GCC=yes
4183else
4184 GCC=
4185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_test_CFLAGS=${CFLAGS+set}
4187ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4189$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004190if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193 ac_save_c_werror_flag=$ac_c_werror_flag
4194 ac_c_werror_flag=yes
4195 ac_cv_prog_cc_g=no
4196 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199
Martin v. Löwis11437992002-04-12 09:54:03 +00004200int
4201main ()
4202{
4203
4204 ;
4205 return 0;
4206}
4207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004209 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210else
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 CFLAGS=""
4212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213/* end confdefs.h. */
4214
4215int
4216main ()
4217{
4218
4219 ;
4220 return 0;
4221}
4222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004223if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224
Matthias Kloseb9621712010-04-24 17:59:49 +00004225else
4226 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229/* end confdefs.h. */
4230
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247 ac_c_werror_flag=$ac_save_c_werror_flag
4248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4250$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253elif test $ac_cv_prog_cc_g = yes; then
4254 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 CFLAGS="-g -O2"
4256 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258 fi
4259else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260 if test "$GCC" = yes; then
4261 CFLAGS="-O2"
4262 else
4263 CFLAGS=
4264 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4267$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004268if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004269 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004270else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004272ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* end confdefs.h. */
4275#include <stdarg.h>
4276#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004277struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4279struct buf { int x; };
4280FILE * (*rcsopen) (struct buf *, struct stat *, int);
4281static char *e (p, i)
4282 char **p;
4283 int i;
4284{
4285 return p[i];
4286}
4287static char *f (char * (*g) (char **, int), char **p, ...)
4288{
4289 char *s;
4290 va_list v;
4291 va_start (v,p);
4292 s = g (p, va_arg (v,int));
4293 va_end (v);
4294 return s;
4295}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296
4297/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4298 function prototypes and stuff, but not '\xHH' hex character constants.
4299 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4302 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4307 inside strings and character constants. */
4308#define FOO(x) 'x'
4309int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4310
Skip Montanaro6dead952003-09-25 14:50:04 +00004311int test (int i, double x);
4312struct s1 {int (*f) (int a);};
4313struct s2 {int (*f) (double a);};
4314int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4315int argc;
4316char **argv;
4317int
4318main ()
4319{
4320return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4321 ;
4322 return 0;
4323}
4324_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4326 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004327do
4328 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004329 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332rm -f core conftest.err conftest.$ac_objext
4333 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004334done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004336CC=$ac_save_CC
4337
4338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339# AC_CACHE_VAL
4340case "x$ac_cv_prog_cc_c89" in
4341 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4343$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4346$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4350$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004352if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004355
Martin v. Löwis11437992002-04-12 09:54:03 +00004356ac_ext=c
4357ac_cpp='$CPP $CPPFLAGS'
4358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4360ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004362ac_ext=c
4363ac_cpp='$CPP $CPPFLAGS'
4364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4366ac_compiler_gnu=$ac_cv_c_compiler_gnu
4367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4368$as_echo_n "checking how to run the C preprocessor... " >&6; }
4369# On Suns, sometimes $CPP names a directory.
4370if test -n "$CPP" && test -d "$CPP"; then
4371 CPP=
4372fi
4373if test -z "$CPP"; then
4374 if ${ac_cv_prog_CPP+:} false; then :
4375 $as_echo_n "(cached) " >&6
4376else
4377 # Double quotes because CPP needs to be expanded
4378 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4379 do
4380 ac_preproc_ok=false
4381for ac_c_preproc_warn_flag in '' yes
4382do
4383 # Use a header file that comes with gcc, so configuring glibc
4384 # with a fresh cross-compiler works.
4385 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4386 # <limits.h> exists even on freestanding compilers.
4387 # On the NeXT, cc -E runs the code through the compiler's parser,
4388 # not just through cpp. "Syntax error" is here to catch this case.
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390/* end confdefs.h. */
4391#ifdef __STDC__
4392# include <limits.h>
4393#else
4394# include <assert.h>
4395#endif
4396 Syntax error
4397_ACEOF
4398if ac_fn_c_try_cpp "$LINENO"; then :
4399
4400else
4401 # Broken: fails on valid input.
4402continue
4403fi
4404rm -f conftest.err conftest.i conftest.$ac_ext
4405
4406 # OK, works on sane cases. Now check whether nonexistent headers
4407 # can be detected and how.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#include <ac_nonexistent.h>
4411_ACEOF
4412if ac_fn_c_try_cpp "$LINENO"; then :
4413 # Broken: success on invalid input.
4414continue
4415else
4416 # Passes both tests.
4417ac_preproc_ok=:
4418break
4419fi
4420rm -f conftest.err conftest.i conftest.$ac_ext
4421
4422done
4423# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4424rm -f conftest.i conftest.err conftest.$ac_ext
4425if $ac_preproc_ok; then :
4426 break
4427fi
4428
4429 done
4430 ac_cv_prog_CPP=$CPP
4431
4432fi
4433 CPP=$ac_cv_prog_CPP
4434else
4435 ac_cv_prog_CPP=$CPP
4436fi
4437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4438$as_echo "$CPP" >&6; }
4439ac_preproc_ok=false
4440for ac_c_preproc_warn_flag in '' yes
4441do
4442 # Use a header file that comes with gcc, so configuring glibc
4443 # with a fresh cross-compiler works.
4444 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4445 # <limits.h> exists even on freestanding compilers.
4446 # On the NeXT, cc -E runs the code through the compiler's parser,
4447 # not just through cpp. "Syntax error" is here to catch this case.
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450#ifdef __STDC__
4451# include <limits.h>
4452#else
4453# include <assert.h>
4454#endif
4455 Syntax error
4456_ACEOF
4457if ac_fn_c_try_cpp "$LINENO"; then :
4458
4459else
4460 # Broken: fails on valid input.
4461continue
4462fi
4463rm -f conftest.err conftest.i conftest.$ac_ext
4464
4465 # OK, works on sane cases. Now check whether nonexistent headers
4466 # can be detected and how.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#include <ac_nonexistent.h>
4470_ACEOF
4471if ac_fn_c_try_cpp "$LINENO"; then :
4472 # Broken: success on invalid input.
4473continue
4474else
4475 # Passes both tests.
4476ac_preproc_ok=:
4477break
4478fi
4479rm -f conftest.err conftest.i conftest.$ac_ext
4480
4481done
4482# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4483rm -f conftest.i conftest.err conftest.$ac_ext
4484if $ac_preproc_ok; then :
4485
4486else
4487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4489as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4490See \`config.log' for more details" "$LINENO" 5; }
4491fi
4492
4493ac_ext=c
4494ac_cpp='$CPP $CPPFLAGS'
4495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4497ac_compiler_gnu=$ac_cv_c_compiler_gnu
4498
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4500$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4501if ${ac_cv_path_GREP+:} false; then :
4502 $as_echo_n "(cached) " >&6
4503else
4504 if test -z "$GREP"; then
4505 ac_path_GREP_found=false
4506 # Loop through the user's path and test for each of PROGNAME-LIST
4507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4509do
4510 IFS=$as_save_IFS
4511 test -z "$as_dir" && as_dir=.
4512 for ac_prog in grep ggrep; do
4513 for ac_exec_ext in '' $ac_executable_extensions; do
4514 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4515 as_fn_executable_p "$ac_path_GREP" || continue
4516# Check for GNU ac_path_GREP and select it if it is found.
4517 # Check for GNU $ac_path_GREP
4518case `"$ac_path_GREP" --version 2>&1` in
4519*GNU*)
4520 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4521*)
4522 ac_count=0
4523 $as_echo_n 0123456789 >"conftest.in"
4524 while :
4525 do
4526 cat "conftest.in" "conftest.in" >"conftest.tmp"
4527 mv "conftest.tmp" "conftest.in"
4528 cp "conftest.in" "conftest.nl"
4529 $as_echo 'GREP' >> "conftest.nl"
4530 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4531 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4532 as_fn_arith $ac_count + 1 && ac_count=$as_val
4533 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4534 # Best one so far, save it but keep looking for a better one
4535 ac_cv_path_GREP="$ac_path_GREP"
4536 ac_path_GREP_max=$ac_count
4537 fi
4538 # 10*(2^10) chars as input seems more than enough
4539 test $ac_count -gt 10 && break
4540 done
4541 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4542esac
4543
4544 $ac_path_GREP_found && break 3
4545 done
4546 done
4547 done
4548IFS=$as_save_IFS
4549 if test -z "$ac_cv_path_GREP"; then
4550 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4551 fi
4552else
4553 ac_cv_path_GREP=$GREP
4554fi
4555
4556fi
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4558$as_echo "$ac_cv_path_GREP" >&6; }
4559 GREP="$ac_cv_path_GREP"
4560
4561
Łukasz Langaa785c872016-09-09 17:37:37 -07004562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4563$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4564if ${ac_cv_path_SED+:} false; then :
4565 $as_echo_n "(cached) " >&6
4566else
4567 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4568 for ac_i in 1 2 3 4 5 6 7; do
4569 ac_script="$ac_script$as_nl$ac_script"
4570 done
4571 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4572 { ac_script=; unset ac_script;}
4573 if test -z "$SED"; then
4574 ac_path_SED_found=false
4575 # Loop through the user's path and test for each of PROGNAME-LIST
4576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579 IFS=$as_save_IFS
4580 test -z "$as_dir" && as_dir=.
4581 for ac_prog in sed gsed; do
4582 for ac_exec_ext in '' $ac_executable_extensions; do
4583 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4584 as_fn_executable_p "$ac_path_SED" || continue
4585# Check for GNU ac_path_SED and select it if it is found.
4586 # Check for GNU $ac_path_SED
4587case `"$ac_path_SED" --version 2>&1` in
4588*GNU*)
4589 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4590*)
4591 ac_count=0
4592 $as_echo_n 0123456789 >"conftest.in"
4593 while :
4594 do
4595 cat "conftest.in" "conftest.in" >"conftest.tmp"
4596 mv "conftest.tmp" "conftest.in"
4597 cp "conftest.in" "conftest.nl"
4598 $as_echo '' >> "conftest.nl"
4599 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4600 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4601 as_fn_arith $ac_count + 1 && ac_count=$as_val
4602 if test $ac_count -gt ${ac_path_SED_max-0}; then
4603 # Best one so far, save it but keep looking for a better one
4604 ac_cv_path_SED="$ac_path_SED"
4605 ac_path_SED_max=$ac_count
4606 fi
4607 # 10*(2^10) chars as input seems more than enough
4608 test $ac_count -gt 10 && break
4609 done
4610 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4611esac
4612
4613 $ac_path_SED_found && break 3
4614 done
4615 done
4616 done
4617IFS=$as_save_IFS
4618 if test -z "$ac_cv_path_SED"; then
4619 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4620 fi
4621else
4622 ac_cv_path_SED=$SED
4623fi
4624
4625fi
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4627$as_echo "$ac_cv_path_SED" >&6; }
4628 SED="$ac_cv_path_SED"
4629 rm -f conftest.sed
4630
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004631
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004632
4633
Matthias Kloseb9621712010-04-24 17:59:49 +00004634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4635$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004637# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004638if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004639 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004640
4641 case $withval in
4642 no) with_cxx_main=no
4643 MAINCC='$(CC)';;
4644 yes) with_cxx_main=yes
4645 MAINCC='$(CXX)';;
4646 *) with_cxx_main=yes
4647 MAINCC=$withval
4648 if test -z "$CXX"
4649 then
4650 CXX=$withval
4651 fi;;
4652 esac
4653else
4654
4655 with_cxx_main=no
4656 MAINCC='$(CC)'
4657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004658fi
4659
Matthias Kloseb9621712010-04-24 17:59:49 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4661$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662
4663preset_cxx="$CXX"
4664if test -z "$CXX"
4665then
4666 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004667 gcc) if test -n "$ac_tool_prefix"; then
4668 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4669set dummy ${ac_tool_prefix}g++; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_CXX+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674else
4675 case $CXX in
4676 [\\/]* | ?:[\\/]*)
4677 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4678 ;;
4679 *)
4680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in notfound
4682do
4683 IFS=$as_save_IFS
4684 test -z "$as_dir" && as_dir=.
4685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689 break 2
4690 fi
4691done
4692 done
4693IFS=$as_save_IFS
4694
4695 ;;
4696esac
4697fi
4698CXX=$ac_cv_path_CXX
4699if test -n "$CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4701$as_echo "$CXX" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707
4708fi
4709if test -z "$ac_cv_path_CXX"; then
4710 ac_pt_CXX=$CXX
4711 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004712set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4714$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004715if ${ac_cv_path_ac_pt_CXX+:} false; then :
4716 $as_echo_n "(cached) " >&6
4717else
4718 case $ac_pt_CXX in
4719 [\\/]* | ?:[\\/]*)
4720 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4721 ;;
4722 *)
4723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724for as_dir in notfound
4725do
4726 IFS=$as_save_IFS
4727 test -z "$as_dir" && as_dir=.
4728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732 break 2
4733 fi
4734done
4735 done
4736IFS=$as_save_IFS
4737
4738 ;;
4739esac
4740fi
4741ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4742if test -n "$ac_pt_CXX"; then
4743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4744$as_echo "$ac_pt_CXX" >&6; }
4745else
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4747$as_echo "no" >&6; }
4748fi
4749
4750 if test "x$ac_pt_CXX" = x; then
4751 CXX="g++"
4752 else
4753 case $cross_compiling:$ac_tool_warned in
4754yes:)
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4756$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4757ac_tool_warned=yes ;;
4758esac
4759 CXX=$ac_pt_CXX
4760 fi
4761else
4762 CXX="$ac_cv_path_CXX"
4763fi
4764 ;;
4765 cc) if test -n "$ac_tool_prefix"; then
4766 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4767set dummy ${ac_tool_prefix}c++; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004770if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004771 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772else
4773 case $CXX in
4774 [\\/]* | ?:[\\/]*)
4775 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4776 ;;
4777 *)
4778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779for as_dir in notfound
4780do
4781 IFS=$as_save_IFS
4782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787 break 2
4788 fi
4789done
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004791IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793 ;;
4794esac
4795fi
4796CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004797if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4799$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004800else
Matthias Kloseb9621712010-04-24 17:59:49 +00004801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004804
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805
4806fi
4807if test -z "$ac_cv_path_CXX"; then
4808 ac_pt_CXX=$CXX
4809 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4812$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818 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 +00004819 ;;
4820 *)
4821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822for as_dir in notfound
4823do
4824 IFS=$as_save_IFS
4825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830 break 2
4831 fi
4832done
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004834IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836 ;;
4837esac
4838fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004839ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4840if test -n "$ac_pt_CXX"; then
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4842$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004843else
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4845$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004847
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004848 if test "x$ac_pt_CXX" = x; then
4849 CXX="c++"
4850 else
4851 case $cross_compiling:$ac_tool_warned in
4852yes:)
4853{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4854$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4855ac_tool_warned=yes ;;
4856esac
4857 CXX=$ac_pt_CXX
4858 fi
4859else
4860 CXX="$ac_cv_path_CXX"
4861fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004863 clang|*/clang) if test -n "$ac_tool_prefix"; then
4864 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4865set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4867$as_echo_n "checking for $ac_word... " >&6; }
4868if ${ac_cv_path_CXX+:} false; then :
4869 $as_echo_n "(cached) " >&6
4870else
4871 case $CXX in
4872 [\\/]* | ?:[\\/]*)
4873 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4874 ;;
4875 *)
4876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4877for as_dir in notfound
4878do
4879 IFS=$as_save_IFS
4880 test -z "$as_dir" && as_dir=.
4881 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004883 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4885 break 2
4886 fi
4887done
4888 done
4889IFS=$as_save_IFS
4890
Ned Deilycbfb9a52012-06-23 16:02:19 -07004891 ;;
4892esac
4893fi
4894CXX=$ac_cv_path_CXX
4895if test -n "$CXX"; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4897$as_echo "$CXX" >&6; }
4898else
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900$as_echo "no" >&6; }
4901fi
4902
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004903
4904fi
4905if test -z "$ac_cv_path_CXX"; then
4906 ac_pt_CXX=$CXX
4907 # Extract the first word of "clang++", so it can be a program name with args.
4908set dummy clang++; ac_word=$2
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910$as_echo_n "checking for $ac_word... " >&6; }
4911if ${ac_cv_path_ac_pt_CXX+:} false; then :
4912 $as_echo_n "(cached) " >&6
4913else
4914 case $ac_pt_CXX in
4915 [\\/]* | ?:[\\/]*)
4916 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4917 ;;
4918 *)
4919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in notfound
4921do
4922 IFS=$as_save_IFS
4923 test -z "$as_dir" && as_dir=.
4924 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4928 break 2
4929 fi
4930done
4931 done
4932IFS=$as_save_IFS
4933
4934 ;;
4935esac
4936fi
4937ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4938if test -n "$ac_pt_CXX"; then
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4940$as_echo "$ac_pt_CXX" >&6; }
4941else
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943$as_echo "no" >&6; }
4944fi
4945
4946 if test "x$ac_pt_CXX" = x; then
4947 CXX="clang++"
4948 else
4949 case $cross_compiling:$ac_tool_warned in
4950yes:)
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4953ac_tool_warned=yes ;;
4954esac
4955 CXX=$ac_pt_CXX
4956 fi
4957else
4958 CXX="$ac_cv_path_CXX"
4959fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004960 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004961 icc|*/icc) if test -n "$ac_tool_prefix"; then
4962 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4963set dummy ${ac_tool_prefix}icpc; ac_word=$2
4964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965$as_echo_n "checking for $ac_word... " >&6; }
4966if ${ac_cv_path_CXX+:} false; then :
4967 $as_echo_n "(cached) " >&6
4968else
4969 case $CXX in
4970 [\\/]* | ?:[\\/]*)
4971 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4972 ;;
4973 *)
4974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975for as_dir in notfound
4976do
4977 IFS=$as_save_IFS
4978 test -z "$as_dir" && as_dir=.
4979 for ac_exec_ext in '' $ac_executable_extensions; do
4980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4981 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983 break 2
4984 fi
4985done
4986 done
4987IFS=$as_save_IFS
4988
4989 ;;
4990esac
4991fi
4992CXX=$ac_cv_path_CXX
4993if test -n "$CXX"; then
4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4995$as_echo "$CXX" >&6; }
4996else
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
4999fi
5000
5001
5002fi
5003if test -z "$ac_cv_path_CXX"; then
5004 ac_pt_CXX=$CXX
5005 # Extract the first word of "icpc", so it can be a program name with args.
5006set dummy icpc; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
5009if ${ac_cv_path_ac_pt_CXX+:} false; then :
5010 $as_echo_n "(cached) " >&6
5011else
5012 case $ac_pt_CXX in
5013 [\\/]* | ?:[\\/]*)
5014 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5015 ;;
5016 *)
5017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in notfound
5019do
5020 IFS=$as_save_IFS
5021 test -z "$as_dir" && as_dir=.
5022 for ac_exec_ext in '' $ac_executable_extensions; do
5023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5024 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026 break 2
5027 fi
5028done
5029 done
5030IFS=$as_save_IFS
5031
5032 ;;
5033esac
5034fi
5035ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5036if test -n "$ac_pt_CXX"; then
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5038$as_echo "$ac_pt_CXX" >&6; }
5039else
5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041$as_echo "no" >&6; }
5042fi
5043
5044 if test "x$ac_pt_CXX" = x; then
5045 CXX="icpc"
5046 else
5047 case $cross_compiling:$ac_tool_warned in
5048yes:)
5049{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5050$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5051ac_tool_warned=yes ;;
5052esac
5053 CXX=$ac_pt_CXX
5054 fi
5055else
5056 CXX="$ac_cv_path_CXX"
5057fi
5058 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059 esac
5060 if test "$CXX" = "notfound"
5061 then
5062 CXX=""
5063 fi
5064fi
5065if test -z "$CXX"
5066then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 if test -n "$ac_tool_prefix"; then
5068 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5069 do
5070 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005074if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005076else
5077 if test -n "$CXX"; then
5078 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5079else
5080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083 IFS=$as_save_IFS
5084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005087 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089 break 2
5090 fi
5091done
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094
5095fi
5096fi
5097CXX=$ac_cv_prog_CXX
5098if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5100$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101else
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005104fi
5105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005107 test -n "$CXX" && break
5108 done
5109fi
5110if test -z "$CXX"; then
5111 ac_ct_CXX=$CXX
5112 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5113do
5114 # Extract the first word of "$ac_prog", so it can be a program name with args.
5115set dummy $ac_prog; ac_word=$2
5116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5117$as_echo_n "checking for $ac_word... " >&6; }
5118if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5119 $as_echo_n "(cached) " >&6
5120else
5121 if test -n "$ac_ct_CXX"; then
5122 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5123else
5124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5125for as_dir in $PATH
5126do
5127 IFS=$as_save_IFS
5128 test -z "$as_dir" && as_dir=.
5129 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005131 ac_cv_prog_ac_ct_CXX="$ac_prog"
5132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5133 break 2
5134 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005136 done
5137IFS=$as_save_IFS
5138
5139fi
5140fi
5141ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5142if test -n "$ac_ct_CXX"; then
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5144$as_echo "$ac_ct_CXX" >&6; }
5145else
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
5148fi
5149
5150
5151 test -n "$ac_ct_CXX" && break
5152done
5153
5154 if test "x$ac_ct_CXX" = x; then
5155 CXX="notfound"
5156 else
5157 case $cross_compiling:$ac_tool_warned in
5158yes:)
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5161ac_tool_warned=yes ;;
5162esac
5163 CXX=$ac_ct_CXX
5164 fi
5165fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166
5167 if test "$CXX" = "notfound"
5168 then
5169 CXX=""
5170 fi
5171fi
5172if test "$preset_cxx" != "$CXX"
5173then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005174 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005175
5176 By default, distutils will build C++ extension modules with \"$CXX\".
5177 If this is not intended, then set CXX on the configure command line.
5178 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005179$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180
5181 By default, distutils will build C++ extension modules with \"$CXX\".
5182 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005183 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005184fi
5185
5186
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005187MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5188
5189
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5191$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5192cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005193#undef bfin
5194#undef cris
5195#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef hppa
5198#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005200#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005201#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005202#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005204#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005205 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005206#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005207# if defined(__x86_64__) && defined(__LP64__)
5208 x86_64-linux-gnu
5209# elif defined(__x86_64__) && defined(__ILP32__)
5210 x86_64-linux-gnux32
5211# elif defined(__i386__)
5212 i386-linux-gnu
5213# elif defined(__aarch64__) && defined(__AARCH64EL__)
5214# if defined(__ILP32__)
5215 aarch64_ilp32-linux-gnu
5216# else
5217 aarch64-linux-gnu
5218# endif
5219# elif defined(__aarch64__) && defined(__AARCH64EB__)
5220# if defined(__ILP32__)
5221 aarch64_be_ilp32-linux-gnu
5222# else
5223 aarch64_be-linux-gnu
5224# endif
5225# elif defined(__alpha__)
5226 alpha-linux-gnu
5227# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5228# if defined(__ARMEL__)
5229 arm-linux-gnueabihf
5230# else
5231 armeb-linux-gnueabihf
5232# endif
5233# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5234# if defined(__ARMEL__)
5235 arm-linux-gnueabi
5236# else
5237 armeb-linux-gnueabi
5238# endif
5239# elif defined(__hppa__)
5240 hppa-linux-gnu
5241# elif defined(__ia64__)
5242 ia64-linux-gnu
5243# elif defined(__m68k__) && !defined(__mcoldfire__)
5244 m68k-linux-gnu
5245# elif defined(__mips_hard_float) && defined(_MIPSEL)
5246# if _MIPS_SIM == _ABIO32
5247 mipsel-linux-gnu
5248# elif _MIPS_SIM == _ABIN32
5249 mips64el-linux-gnuabin32
5250# elif _MIPS_SIM == _ABI64
5251 mips64el-linux-gnuabi64
5252# else
5253# error unknown platform triplet
5254# endif
5255# elif defined(__mips_hard_float)
5256# if _MIPS_SIM == _ABIO32
5257 mips-linux-gnu
5258# elif _MIPS_SIM == _ABIN32
5259 mips64-linux-gnuabin32
5260# elif _MIPS_SIM == _ABI64
5261 mips64-linux-gnuabi64
5262# else
5263# error unknown platform triplet
5264# endif
5265# elif defined(__or1k__)
5266 or1k-linux-gnu
5267# elif defined(__powerpc__) && defined(__SPE__)
5268 powerpc-linux-gnuspe
5269# elif defined(__powerpc64__)
5270# if defined(__LITTLE_ENDIAN__)
5271 powerpc64le-linux-gnu
5272# else
5273 powerpc64-linux-gnu
5274# endif
5275# elif defined(__powerpc__)
5276 powerpc-linux-gnu
5277# elif defined(__s390x__)
5278 s390x-linux-gnu
5279# elif defined(__s390__)
5280 s390-linux-gnu
5281# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5282 sh4-linux-gnu
5283# elif defined(__sparc__) && defined(__arch64__)
5284 sparc64-linux-gnu
5285# elif defined(__sparc__)
5286 sparc-linux-gnu
5287# else
5288# error unknown platform triplet
5289# endif
5290#elif defined(__FreeBSD_kernel__)
5291# if defined(__LP64__)
5292 x86_64-kfreebsd-gnu
5293# elif defined(__i386__)
5294 i386-kfreebsd-gnu
5295# else
5296# error unknown platform triplet
5297# endif
5298#elif defined(__gnu_hurd__)
5299 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005300#elif defined(__APPLE__)
5301 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005302#else
5303# error unknown platform triplet
5304#endif
5305
5306EOF
5307
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005308if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005309 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5311$as_echo "$PLATFORM_TRIPLET" >&6; }
5312else
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5314$as_echo "none" >&6; }
5315fi
5316rm -f conftest.c conftest.out
5317
5318if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5319 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5320 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5321 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005322elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5323 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005324fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325
doko@ubuntu.com55532312016-06-14 08:55:19 +02005326if test x$MULTIARCH != x; then
5327 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5328fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005329
5330
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5332$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5333save_LDFLAGS="$LDFLAGS"
5334LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005335
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5337/* end confdefs.h. */
5338
5339int
5340main ()
5341{
5342
5343 ;
5344 return 0;
5345}
5346_ACEOF
5347if ac_fn_c_try_link "$LINENO"; then :
5348 NO_AS_NEEDED="-Wl,--no-as-needed"
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5350$as_echo "yes" >&6; }
5351else
5352 NO_AS_NEEDED=""
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354$as_echo "no" >&6; }
5355fi
5356rm -f core conftest.err conftest.$ac_objext \
5357 conftest$ac_exeext conftest.$ac_ext
5358LDFLAGS="$save_LDFLAGS"
5359
5360
5361
5362# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363
Matthias Kloseb9621712010-04-24 17:59:49 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5365$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005366if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368else
5369 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5370 then ac_cv_path_EGREP="$GREP -E"
5371 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 # Loop through the user's path and test for each of PROGNAME-LIST
5375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5377do
5378 IFS=$as_save_IFS
5379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 for ac_prog in egrep; do
5381 for ac_exec_ext in '' $ac_executable_extensions; do
5382 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005383 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005384# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385 # Check for GNU $ac_path_EGREP
5386case `"$ac_path_EGREP" --version 2>&1` in
5387*GNU*)
5388 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5389*)
5390 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 while :
5393 do
5394 cat "conftest.in" "conftest.in" >"conftest.tmp"
5395 mv "conftest.tmp" "conftest.in"
5396 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5399 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5402 # Best one so far, save it but keep looking for a better one
5403 ac_cv_path_EGREP="$ac_path_EGREP"
5404 ac_path_EGREP_max=$ac_count
5405 fi
5406 # 10*(2^10) chars as input seems more than enough
5407 test $ac_count -gt 10 && break
5408 done
5409 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5410esac
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $ac_path_EGREP_found && break 3
5413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005417 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005418 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 +00005419 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420else
5421 ac_cv_path_EGREP=$EGREP
5422fi
5423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424 fi
5425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5427$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005429
5430
Matthias Kloseb9621712010-04-24 17:59:49 +00005431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5432$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005433if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 $as_echo_n "(cached) " >&6
5435else
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005437/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005438#include <stdlib.h>
5439#include <stdarg.h>
5440#include <string.h>
5441#include <float.h>
5442
5443int
5444main ()
5445{
5446
5447 ;
5448 return 0;
5449}
5450_ACEOF
5451if ac_fn_c_try_compile "$LINENO"; then :
5452 ac_cv_header_stdc=yes
5453else
5454 ac_cv_header_stdc=no
5455fi
5456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5457
5458if test $ac_cv_header_stdc = yes; then
5459 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5461/* end confdefs.h. */
5462#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005463
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005464_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005468else
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005470fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005471rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472
Matthias Kloseb9621712010-04-24 17:59:49 +00005473fi
5474
5475if test $ac_cv_header_stdc = yes; then
5476 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5478/* end confdefs.h. */
5479#include <stdlib.h>
5480
5481_ACEOF
5482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5483 $EGREP "free" >/dev/null 2>&1; then :
5484
5485else
5486 ac_cv_header_stdc=no
5487fi
5488rm -f conftest*
5489
5490fi
5491
5492if test $ac_cv_header_stdc = yes; then
5493 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5494 if test "$cross_compiling" = yes; then :
5495 :
5496else
5497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5498/* end confdefs.h. */
5499#include <ctype.h>
5500#include <stdlib.h>
5501#if ((' ' & 0x0FF) == 0x020)
5502# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5503# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5504#else
5505# define ISLOWER(c) \
5506 (('a' <= (c) && (c) <= 'i') \
5507 || ('j' <= (c) && (c) <= 'r') \
5508 || ('s' <= (c) && (c) <= 'z'))
5509# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5510#endif
5511
5512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5513int
5514main ()
5515{
5516 int i;
5517 for (i = 0; i < 256; i++)
5518 if (XOR (islower (i), ISLOWER (i))
5519 || toupper (i) != TOUPPER (i))
5520 return 2;
5521 return 0;
5522}
5523_ACEOF
5524if ac_fn_c_try_run "$LINENO"; then :
5525
5526else
5527 ac_cv_header_stdc=no
5528fi
5529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5530 conftest.$ac_objext conftest.beam conftest.$ac_ext
5531fi
5532
5533fi
5534fi
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5536$as_echo "$ac_cv_header_stdc" >&6; }
5537if test $ac_cv_header_stdc = yes; then
5538
5539$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5540
5541fi
5542
5543# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5544for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5545 inttypes.h stdint.h unistd.h
5546do :
5547 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5548ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5549"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005550if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 cat >>confdefs.h <<_ACEOF
5552#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5553_ACEOF
5554
5555fi
5556
5557done
5558
5559
5560
5561 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 +02005562if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 MINIX=yes
5564else
5565 MINIX=
5566fi
5567
5568
5569 if test "$MINIX" = yes; then
5570
5571$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5572
5573
5574$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5575
5576
5577$as_echo "#define _MINIX 1" >>confdefs.h
5578
5579 fi
5580
5581
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5583$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005584if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005585 $as_echo_n "(cached) " >&6
5586else
5587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5588/* end confdefs.h. */
5589
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005590# define __EXTENSIONS__ 1
5591 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005592int
5593main ()
5594{
5595
5596 ;
5597 return 0;
5598}
5599_ACEOF
5600if ac_fn_c_try_compile "$LINENO"; then :
5601 ac_cv_safe_to_define___extensions__=yes
5602else
5603 ac_cv_safe_to_define___extensions__=no
5604fi
5605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5606fi
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5608$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5609 test $ac_cv_safe_to_define___extensions__ = yes &&
5610 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5611
5612 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5613
5614 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5615
5616 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5617
5618 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5619
5620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621
Xavier de Gaye95750b12016-07-09 11:05:42 +02005622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5623$as_echo_n "checking for the Android API level... " >&6; }
5624cat >> conftest.c <<EOF
5625#ifdef __ANDROID__
5626#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005627android_api = __ANDROID_API__
5628arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005629#else
5630#error not Android
5631#endif
5632EOF
5633
5634if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005635 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5636 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5638$as_echo "$ANDROID_API_LEVEL" >&6; }
5639
5640cat >>confdefs.h <<_ACEOF
5641#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5642_ACEOF
5643
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005644
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5646$as_echo_n "checking for the Android arm ABI... " >&6; }
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5648$as_echo "$_arm_arch" >&6; }
5649 if test "$_arm_arch" = 7; then
5650 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5651 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5652 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653else
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5655$as_echo "not Android" >&6; }
5656fi
5657rm -f conftest.c conftest.out
5658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659# Check for unsupported systems
5660case $ac_sys_system/$ac_sys_release in
5661atheos*|Linux*/1*)
5662 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5663 echo See README for details.
5664 exit 1;;
5665esac
5666
5667
Matthias Kloseb9621712010-04-24 17:59:49 +00005668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5669$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670
5671# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005672if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 withval=$with_suffix;
5674 case $withval in
5675 no) EXEEXT=;;
5676 yes) EXEEXT=.exe;;
5677 *) EXEEXT=$withval;;
5678 esac
5679fi
5680
Matthias Kloseb9621712010-04-24 17:59:49 +00005681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5682$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683
5684# Test whether we're running on a non-case-sensitive system, in which
5685# case we give a warning if no ext is given
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5688$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689if test ! -d CaseSensitiveTestDir; then
5690mkdir CaseSensitiveTestDir
5691fi
5692
5693if test -d casesensitivetestdir
5694then
Matthias Kloseb9621712010-04-24 17:59:49 +00005695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5696$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 BUILDEXEEXT=.exe
5698else
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 BUILDEXEEXT=$EXEEXT
5702fi
5703rmdir CaseSensitiveTestDir
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705case $ac_sys_system in
5706hp*|HP*)
5707 case $CC in
5708 cc|*/cc) CC="$CC -Ae";;
5709 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710esac
5711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5714$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715if test -z "$LIBRARY"
5716then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005717 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5720$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721
5722# LDLIBRARY is the name of the library to link against (as opposed to the
5723# name of the library into which to insert object files). BLDLIBRARY is also
5724# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5725# is blank as the main program is not linked directly against LDLIBRARY.
5726# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5727# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5728# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5729# DLLLIBRARY is the shared (i.e., DLL) library.
5730#
5731# RUNSHARED is used to run shared python without installed libraries
5732#
5733# INSTSONAME is the name of the shared library that will be use to install
5734# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005735#
5736# LDVERSION is the shared library version number, normally the Python version
5737# with the ABI build flags appended.
5738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740
5741
5742
5743
5744
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746LDLIBRARY="$LIBRARY"
5747BLDLIBRARY='$(LDLIBRARY)'
5748INSTSONAME='$(LDLIBRARY)'
5749DLLLIBRARY=''
5750LDLIBRARYDIR=''
5751RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005752LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753
5754# LINKCC is the command that links the python executable -- default is $(CC).
5755# If CXX is set, and if it is needed to link a main function that was
5756# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5757# python might then depend on the C++ runtime
5758# This is altered for AIX in order to build the export list before
5759# linking.
5760
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5762$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763if test -z "$LINKCC"
5764then
5765 LINKCC='$(PURIFY) $(MAINCC)'
5766 case $ac_sys_system in
5767 AIX*)
5768 exp_extra="\"\""
5769 if test $ac_sys_release -ge 5 -o \
5770 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5771 exp_extra="."
5772 fi
5773 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 QNX*)
5775 # qcc must be used because the other compilers do not
5776 # support -N.
5777 LINKCC=qcc;;
5778 esac
5779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5781$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
5783# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5784# make sure we default having it set to "no": this is used by
5785# distutils.unixccompiler to know if it should add --enable-new-dtags
5786# to linker command lines, and failing to detect GNU ld simply results
5787# in the same bahaviour as before.
5788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5790$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791ac_prog=ld
5792if test "$GCC" = yes; then
5793 ac_prog=`$CC -print-prog-name=ld`
5794fi
5795case `"$ac_prog" -V 2>&1 < /dev/null` in
5796 *GNU*)
5797 GNULD=yes;;
5798 *)
5799 GNULD=no;;
5800esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5802$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5805$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 enableval=$enable_shared;
5809fi
5810
5811
5812if test -z "$enable_shared"
5813then
5814 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005815 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 enable_shared="yes";;
5817 *)
5818 enable_shared="no";;
5819 esac
5820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5822$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5825$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005827if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005828 enableval=$enable_profiling;
5829fi
5830
5831if test "x$enable_profiling" = xyes; then
5832 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005833 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835/* end confdefs.h. */
5836int main() { return 0; }
5837_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005838if ac_fn_c_try_link "$LINENO"; then :
5839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843rm -f core conftest.err conftest.$ac_objext \
5844 conftest$ac_exeext conftest.$ac_ext
5845 CC="$ac_save_cc"
5846else
5847 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5850$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
doko@ubuntu.comba015832012-06-30 16:52:05 +02005852if test "x$enable_profiling" = xyes; then
5853 BASECFLAGS="-pg $BASECFLAGS"
5854 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855fi
5856
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5858$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859
5860# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5861# library that we build, but we do not want to link against it (we
5862# will find it with a -framework option). For this reason there is an
5863# extra variable BLDLIBRARY against which Python and the extension
5864# modules are linked, BLDLIBRARY. This is normally the same as
5865# LDLIBRARY, but empty for MacOSX framework builds.
5866if test "$enable_framework"
5867then
5868 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005869 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870 BLDLIBRARY=''
5871else
5872 BLDLIBRARY='$(LDLIBRARY)'
5873fi
5874
5875# Other platforms follow
5876if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005877 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
5881 case $ac_sys_system in
5882 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005883 LDLIBRARY='libpython$(LDVERSION).dll.a'
5884 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ;;
5886 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005887 LDLIBRARY='libpython$(LDVERSION).so'
5888 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005889 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005891 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005892 then
5893 PY3LIBRARY=libpython3.so
5894 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005896 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005897 LDLIBRARY='libpython$(LDVERSION).so'
5898 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005899 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005901 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005902 then
5903 PY3LIBRARY=libpython3.so
5904 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
5906 hp*|HP*)
5907 case `uname -m` in
5908 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
5911 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
5914 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).dylib'
5920 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005923 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005925 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005926 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928 esac
5929else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005930 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 case $ac_sys_system in
5932 CYGWIN*)
5933 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 esac
5937fi
5938
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005939if test "$cross_compiling" = yes; then
5940 RUNSHARED=
5941fi
5942
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5944$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005947if test -n "$ac_tool_prefix"; then
5948 for ac_prog in ar aal
5949 do
5950 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5951set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005954if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956else
5957 if test -n "$AR"; then
5958 ac_cv_prog_AR="$AR" # Let the user override the test.
5959else
5960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5961for as_dir in $PATH
5962do
5963 IFS=$as_save_IFS
5964 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005966 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005967 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 break 2
5970 fi
5971done
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973IFS=$as_save_IFS
5974
5975fi
5976fi
5977AR=$ac_cv_prog_AR
5978if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5980$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5983$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
5985
5986
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005987 test -n "$AR" && break
5988 done
5989fi
5990if test -z "$AR"; then
5991 ac_ct_AR=$AR
5992 for ac_prog in ar aal
5993do
5994 # Extract the first word of "$ac_prog", so it can be a program name with args.
5995set dummy $ac_prog; ac_word=$2
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997$as_echo_n "checking for $ac_word... " >&6; }
5998if ${ac_cv_prog_ac_ct_AR+:} false; then :
5999 $as_echo_n "(cached) " >&6
6000else
6001 if test -n "$ac_ct_AR"; then
6002 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6003else
6004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007 IFS=$as_save_IFS
6008 test -z "$as_dir" && as_dir=.
6009 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006011 ac_cv_prog_ac_ct_AR="$ac_prog"
6012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013 break 2
6014 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006016 done
6017IFS=$as_save_IFS
6018
6019fi
6020fi
6021ac_ct_AR=$ac_cv_prog_ac_ct_AR
6022if test -n "$ac_ct_AR"; then
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6024$as_echo "$ac_ct_AR" >&6; }
6025else
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028fi
6029
6030
6031 test -n "$ac_ct_AR" && break
6032done
6033
6034 if test "x$ac_ct_AR" = x; then
6035 AR="ar"
6036 else
6037 case $cross_compiling:$ac_tool_warned in
6038yes:)
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6040$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6041ac_tool_warned=yes ;;
6042esac
6043 AR=$ac_ct_AR
6044 fi
6045fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046
6047
6048# tweak ARFLAGS only if the user didn't set it on the command line
6049
6050if test -z "$ARFLAGS"
6051then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006052 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053fi
6054
doko@ubuntu.com58844492012-06-30 18:25:32 +02006055if test -n "$ac_tool_prefix"; then
6056 for ac_prog in readelf
6057 do
6058 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6059set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6061$as_echo_n "checking for $ac_word... " >&6; }
6062if ${ac_cv_prog_READELF+:} false; then :
6063 $as_echo_n "(cached) " >&6
6064else
6065 if test -n "$READELF"; then
6066 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6067else
6068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6069for as_dir in $PATH
6070do
6071 IFS=$as_save_IFS
6072 test -z "$as_dir" && as_dir=.
6073 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006075 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6077 break 2
6078 fi
6079done
6080 done
6081IFS=$as_save_IFS
6082
6083fi
6084fi
6085READELF=$ac_cv_prog_READELF
6086if test -n "$READELF"; then
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6088$as_echo "$READELF" >&6; }
6089else
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6091$as_echo "no" >&6; }
6092fi
6093
6094
6095 test -n "$READELF" && break
6096 done
6097fi
6098if test -z "$READELF"; then
6099 ac_ct_READELF=$READELF
6100 for ac_prog in readelf
6101do
6102 # Extract the first word of "$ac_prog", so it can be a program name with args.
6103set dummy $ac_prog; ac_word=$2
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105$as_echo_n "checking for $ac_word... " >&6; }
6106if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6107 $as_echo_n "(cached) " >&6
6108else
6109 if test -n "$ac_ct_READELF"; then
6110 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6111else
6112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113for as_dir in $PATH
6114do
6115 IFS=$as_save_IFS
6116 test -z "$as_dir" && as_dir=.
6117 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006119 ac_cv_prog_ac_ct_READELF="$ac_prog"
6120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6121 break 2
6122 fi
6123done
6124 done
6125IFS=$as_save_IFS
6126
6127fi
6128fi
6129ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6130if test -n "$ac_ct_READELF"; then
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6132$as_echo "$ac_ct_READELF" >&6; }
6133else
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139 test -n "$ac_ct_READELF" && break
6140done
6141
6142 if test "x$ac_ct_READELF" = x; then
6143 READELF=":"
6144 else
6145 case $cross_compiling:$ac_tool_warned in
6146yes:)
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6149ac_tool_warned=yes ;;
6150esac
6151 READELF=$ac_ct_READELF
6152 fi
6153fi
6154
6155if test "$cross_compiling" = yes; then
6156 case "$READELF" in
6157 readelf|:)
6158 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6159 ;;
6160 esac
6161fi
6162
6163
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006166hp*|HP*)
6167 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168 if test -z "$INSTALL"
6169 then
6170 INSTALL="${srcdir}/install-sh -c"
6171 fi
6172esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173# Find a good install program. We prefer a C program (faster),
6174# so one script is as good as another. But avoid the broken or
6175# incompatible versions:
6176# SysV /etc/install, /usr/sbin/install
6177# SunOS /usr/etc/install
6178# IRIX /sbin/install
6179# AIX /bin/install
6180# AmigaOS /C/install, which installs bootblocks on floppy discs
6181# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6182# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6183# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6184# OS/2's system install, which has a completely different semantic
6185# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186# Reject install programs that cannot install multiple files.
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6188$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006190if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192else
6193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6194for as_dir in $PATH
6195do
6196 IFS=$as_save_IFS
6197 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006198 # Account for people who put trailing slashes in PATH elements.
6199case $as_dir/ in #((
6200 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006202 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203 /usr/ucb/* ) ;;
6204 *)
6205 # OSF1 and SCO ODT 3.0 have their own names for install.
6206 # Don't use installbsd from OSF since it installs stuff as root
6207 # by default.
6208 for ac_prog in ginstall scoinst install; do
6209 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006210 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 if test $ac_prog = install &&
6212 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6213 # AIX install. It has an incompatible calling convention.
6214 :
6215 elif test $ac_prog = install &&
6216 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6217 # program-specific install script used by HP pwplus--don't use.
6218 :
6219 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 rm -rf conftest.one conftest.two conftest.dir
6221 echo one > conftest.one
6222 echo two > conftest.two
6223 mkdir conftest.dir
6224 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6225 test -s conftest.one && test -s conftest.two &&
6226 test -s conftest.dir/conftest.one &&
6227 test -s conftest.dir/conftest.two
6228 then
6229 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6230 break 3
6231 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232 fi
6233 fi
6234 done
6235 done
6236 ;;
6237esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006238
6239 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240IFS=$as_save_IFS
6241
Matthias Kloseb9621712010-04-24 17:59:49 +00006242rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243
6244fi
6245 if test "${ac_cv_path_install+set}" = set; then
6246 INSTALL=$ac_cv_path_install
6247 else
6248 # As a last resort, use the slow shell script. Don't cache a
6249 # value for INSTALL within a source directory, because that will
6250 # break other packages using the cache if that directory is
6251 # removed, or if the value is a relative name.
6252 INSTALL=$ac_install_sh
6253 fi
6254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6256$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006257
6258# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6259# It thinks the first close brace ends the variable substitution.
6260test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6261
6262test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6263
6264test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6265
Matthias Klose93a0ef12012-03-15 18:08:34 +01006266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6267$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6268if test -z "$MKDIR_P"; then
6269 if ${ac_cv_path_mkdir+:} false; then :
6270 $as_echo_n "(cached) " >&6
6271else
6272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6274do
6275 IFS=$as_save_IFS
6276 test -z "$as_dir" && as_dir=.
6277 for ac_prog in mkdir gmkdir; do
6278 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006279 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006280 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6281 'mkdir (GNU coreutils) '* | \
6282 'mkdir (coreutils) '* | \
6283 'mkdir (fileutils) '4.1*)
6284 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6285 break 3;;
6286 esac
6287 done
6288 done
6289 done
6290IFS=$as_save_IFS
6291
6292fi
6293
6294 test -d ./--version && rmdir ./--version
6295 if test "${ac_cv_path_mkdir+set}" = set; then
6296 MKDIR_P="$ac_cv_path_mkdir -p"
6297 else
6298 # As a last resort, use the slow shell script. Don't cache a
6299 # value for MKDIR_P within a source directory, because that will
6300 # break other packages using the cache if that directory is
6301 # removed, or if the value is a relative name.
6302 MKDIR_P="$ac_install_sh -d"
6303 fi
6304fi
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6306$as_echo "$MKDIR_P" >&6; }
6307
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308
6309# Not every filesystem supports hard links
6310
6311if test -z "$LN" ; then
6312 case $ac_sys_system in
6313 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314 *) LN=ln;;
6315 esac
6316fi
6317
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006318# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006319
6320ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006321
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6324$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
6326# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006327if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 withval=$with_pydebug;
6329if test "$withval" != no
6330then
6331
Matthias Kloseb9621712010-04-24 17:59:49 +00006332$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6335$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006337 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006338else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6339$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340fi
6341else
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6343$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344fi
6345
6346
T. Woutersddbfa2c2017-05-23 01:30:49 +02006347# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6348# the ABI. This allows enabling assertions without changing the ABI.
6349assertions='false'
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6351$as_echo_n "checking for --with-assertions... " >&6; }
6352
6353# Check whether --with-assertions was given.
6354if test "${with_assertions+set}" = set; then :
6355 withval=$with_assertions;
6356if test "$withval" != no
6357then
6358 assertions='true'
6359fi
6360fi
6361
6362if test "$assertions" = 'true'; then
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6364$as_echo "yes" >&6; }
6365elif test "$Py_DEBUG" = 'true'; then
6366 assertions='true'
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6368$as_echo "implied by --with-pydebug" >&6; }
6369else
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
Brett Cannon63d98bc2016-09-06 17:12:40 -07006374# Enable optimization flags
6375
6376
6377Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6379$as_echo_n "checking for --enable-optimizations... " >&6; }
6380# Check whether --enable-optimizations was given.
6381if test "${enable_optimizations+set}" = set; then :
6382 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006383if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006384then
6385 Py_OPT='true'
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6387$as_echo "yes" >&6; };
6388else
6389 Py_OPT='false'
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; };
6392fi
6393else
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395$as_echo "no" >&6; }
6396fi
6397
6398if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006399 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6400 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006401 # 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 +00006402 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006403 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006404 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006405 DEF_MAKE_RULE="build_all"
6406else
6407 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006408 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006409 DEF_MAKE_RULE="all"
6410fi
6411
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006412# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6414$as_echo_n "checking for --with-lto... " >&6; }
6415
6416# Check whether --with-lto was given.
6417if test "${with_lto+set}" = set; then :
6418 withval=$with_lto;
6419if test "$withval" != no
6420then
6421 Py_LTO='true'
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6423$as_echo "yes" >&6; };
6424else
6425 Py_LTO='false'
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6427$as_echo "no" >&6; };
6428fi
6429else
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
6434if test "$Py_LTO" = 'true' ; then
6435 case $CC in
6436 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006437 case $ac_sys_system in
6438 Darwin*)
6439 # Any changes made here should be reflected in the GCC+Darwin case below
6440 LTOFLAGS="-flto -Wl,-export_dynamic"
6441 ;;
6442 *)
6443 LTOFLAGS="-flto"
6444 ;;
6445 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006446 ;;
6447 *gcc*)
6448 case $ac_sys_system in
6449 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006450 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006451 ;;
6452 *)
6453 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6454 ;;
6455 esac
6456 ;;
6457 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006458 CFLAGS="$CFLAGS $LTOFLAGS"
6459 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006460fi
6461
Brett Cannon7188a3e2015-09-18 15:13:44 -07006462# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006463
6464
6465
6466
6467
Gregory P. Smith799520c2016-09-07 16:10:00 -07006468# Make this work on systems where llvm tools are not installed with their
6469# normal names in the default $PATH (ie: Ubuntu). They exist under the
6470# non-suffixed name in their versioned llvm directory.
6471llvm_bin_dir=''
6472llvm_path="${PATH}"
6473if test "${CC}" = "clang"
6474then
6475 clang_bin=`which clang`
6476 # Some systems install clang elsewhere as a symlink to the real path
6477 # which is where the related llvm tools are located.
6478 if test -L "${clang_bin}"
6479 then
6480 clang_dir=`dirname "${clang_bin}"`
6481 clang_bin=`readlink "${clang_bin}"`
6482 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6483 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6484 fi
6485fi
Zachary Ware5af85642015-12-21 12:09:17 -06006486
Gregory P. Smith799520c2016-09-07 16:10:00 -07006487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6488$as_echo_n "checking target system type... " >&6; }
6489if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006490 $as_echo_n "(cached) " >&6
6491else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006492 if test "x$target_alias" = x; then
6493 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006494else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006495 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6496 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6497fi
6498
6499fi
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6501$as_echo "$ac_cv_target" >&6; }
6502case $ac_cv_target in
6503*-*-*) ;;
6504*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6505esac
6506target=$ac_cv_target
6507ac_save_IFS=$IFS; IFS='-'
6508set x $ac_cv_target
6509shift
6510target_cpu=$1
6511target_vendor=$2
6512shift; shift
6513# Remember, the first character of IFS is used to create $*,
6514# except with old shells:
6515target_os=$*
6516IFS=$ac_save_IFS
6517case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6518
6519
6520# The aliases save the names the user supplied, while $host etc.
6521# will get canonicalized.
6522test -n "$target_alias" &&
6523 test "$program_prefix$program_suffix$program_transform_name" = \
6524 NONENONEs,x,x, &&
6525 program_prefix=${target_alias}-
6526# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6527set dummy $target_alias-llvm-profdata; ac_word=$2
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6529$as_echo_n "checking for $ac_word... " >&6; }
6530if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6531 $as_echo_n "(cached) " >&6
6532else
6533 case $LLVM_PROFDATA in
6534 [\\/]* | ?:[\\/]*)
6535 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6536 ;;
6537 *)
6538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6539for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006540do
6541 IFS=$as_save_IFS
6542 test -z "$as_dir" && as_dir=.
6543 for ac_exec_ext in '' $ac_executable_extensions; do
6544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006545 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6547 break 2
6548 fi
6549done
6550 done
6551IFS=$as_save_IFS
6552
Gregory P. Smith799520c2016-09-07 16:10:00 -07006553 ;;
6554esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006555fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006556LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6557if test -n "$LLVM_PROFDATA"; then
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6559$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006560else
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6562$as_echo "no" >&6; }
6563fi
6564
6565
Gregory P. Smith799520c2016-09-07 16:10:00 -07006566if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6567 if test "$build" = "$target"; then
6568 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6569 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6570set dummy llvm-profdata; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575else
6576 case $ac_pt_LLVM_PROFDATA in
6577 [\\/]* | ?:[\\/]*)
6578 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6579 ;;
6580 *)
6581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in ${llvm_path}
6583do
6584 IFS=$as_save_IFS
6585 test -z "$as_dir" && as_dir=.
6586 for ac_exec_ext in '' $ac_executable_extensions; do
6587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6588 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590 break 2
6591 fi
6592done
6593 done
6594IFS=$as_save_IFS
6595
6596 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6597 ;;
6598esac
6599fi
6600ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6601if test -n "$ac_pt_LLVM_PROFDATA"; then
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6603$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6604else
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
6607fi
6608
6609 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6610 else
6611 LLVM_PROFDATA="''"
6612 fi
6613else
6614 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6615fi
6616
6617
6618if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6619then
6620 LLVM_PROF_FOUND="found"
6621else
6622 LLVM_PROF_FOUND="not-found"
6623fi
6624if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6625then
6626 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6627 if test -n "${found_llvm_profdata}"
6628 then
6629 # llvm-profdata isn't directly in $PATH in some cases.
6630 # https://apple.stackexchange.com/questions/197053/
6631 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6632 LLVM_PROF_FOUND=found
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6634$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6635 fi
6636fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006637LLVM_PROF_ERR=no
6638case $CC in
6639 *clang*)
6640 # Any changes made here should be reflected in the GCC+Darwin case below
6641 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6642 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006643 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006644 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6645 if test $LLVM_PROF_FOUND = not-found
6646 then
6647 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648 if test "${REQUIRE_PGO}" = "yes"
6649 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006650 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 -07006651 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006652 fi
6653 ;;
6654 *gcc*)
6655 case $ac_sys_system in
6656 Darwin*)
6657 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6658 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006659 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006660 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006661 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006662 then
6663 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006664 if test "${REQUIRE_PGO}" = "yes"
6665 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006666 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 -07006667 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006668 fi
6669 ;;
6670 *)
6671 PGO_PROF_GEN_FLAG="-fprofile-generate"
6672 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6673 LLVM_PROF_MERGER="true"
6674 LLVM_PROF_FILE=""
6675 ;;
6676 esac
6677 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006678 *icc*)
6679 PGO_PROF_GEN_FLAG="-prof-gen"
6680 PGO_PROF_USE_FLAG="-prof-use"
6681 LLVM_PROF_MERGER="true"
6682 LLVM_PROF_FILE=""
6683 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006684esac
6685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6687# merged with this chunk of code?
6688
6689# Optimizer/debugger flags
6690# ------------------------
6691# (The following bit of code is complicated enough - please keep things
6692# indented properly. Just pretend you're editing Python code. ;-)
6693
6694# There are two parallel sets of case statements below, one that checks to
6695# see if OPT was set and one that does BASECFLAGS setting based upon
6696# compiler and platform. BASECFLAGS tweaks need to be made even if the
6697# user set OPT.
6698
6699# tweak OPT based on compiler and platform, only if the user didn't set
6700# it on the command line
6701
Victor Stinner9ed34a82017-05-02 22:35:58 +02006702
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006703if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704then
6705 case $GCC in
6706 yes)
6707 if test "$CC" != 'g++' ; then
6708 STRICT_PROTO="-Wstrict-prototypes"
6709 fi
6710 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6711 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6712 WRAP="-fwrapv"
6713 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006714
Stefan Krahaf04ff22011-12-08 22:20:31 +01006715 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006716 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006717 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006718 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006719 *)
6720 if $CC --version 2>&1 | grep -q clang
6721 then
6722 cc_is_clang=1
6723 else
6724 cc_is_clang=
6725 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006726 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006727
Victor Stinner35f3d242017-04-21 12:35:24 +02006728 if test -n "${cc_is_clang}"
6729 then
6730 # Clang also needs -fwrapv
6731 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006732 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6733 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006734 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006735 fi
6736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737 case $ac_cv_prog_cc_g in
6738 yes)
6739 if test "$Py_DEBUG" = 'true' ; then
6740 # Optimization messes up debuggers, so turn it off for
6741 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006742 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006743 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006744 else
Victor Stinner28205b22017-04-21 11:24:34 +02006745 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006746 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747 else
Victor Stinner28205b22017-04-21 11:24:34 +02006748 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749 fi
6750 ;;
6751 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006752 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753 ;;
6754 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006755
Victor Stinner826f83f2017-04-28 15:07:10 +02006756 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758 case $ac_sys_system in
6759 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6760 ;;
6761 esac
6762 ;;
6763
6764 *)
6765 OPT="-O"
6766 ;;
6767 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006768fi
6769
6770
6771
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773# The -arch flags for universal builds on OSX
6774UNIVERSAL_ARCH_FLAGS=
6775
6776
6777# tweak BASECFLAGS based on compiler and platform
6778case $GCC in
6779yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006780 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006781
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6783$as_echo_n "checking for -Wextra... " >&6; }
6784 ac_save_cc="$CC"
6785 CC="$CC -Wextra -Werror"
6786 if ${ac_cv_extra_warnings+:} false; then :
6787 $as_echo_n "(cached) " >&6
6788else
6789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6790/* end confdefs.h. */
6791
6792
6793int
6794main ()
6795{
6796
6797 ;
6798 return 0;
6799}
6800
6801_ACEOF
6802if ac_fn_c_try_compile "$LINENO"; then :
6803
6804 ac_cv_extra_warnings=yes
6805
6806else
6807
6808 ac_cv_extra_warnings=no
6809
6810fi
6811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6812fi
6813
6814 CC="$ac_save_cc"
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6816$as_echo "$ac_cv_extra_warnings" >&6; }
6817
6818 if test $ac_cv_extra_warnings = yes
6819 then
6820 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6821 fi
6822
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006823 # Python doesn't violate C99 aliasing rules, but older versions of
6824 # GCC produce warnings for legal Python code. Enable
6825 # -fno-strict-aliasing on versions of GCC that support but produce
6826 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6828$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829 ac_save_cc="$CC"
6830 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006831 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006832 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006834else
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006837
Matthias Kloseb159a552010-04-25 21:00:44 +00006838
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006839int
6840main ()
6841{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006842
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006843 ;
6844 return 0;
6845}
Matthias Kloseb159a552010-04-25 21:00:44 +00006846
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006848if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006849
6850 CC="$ac_save_cc -fstrict-aliasing"
6851 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006853/* end confdefs.h. */
6854
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006855 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856int
6857main ()
6858{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006859double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006860 ;
6861 return 0;
6862}
Matthias Kloseb159a552010-04-25 21:00:44 +00006863
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006865if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006866
6867 ac_cv_no_strict_aliasing=no
6868
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869else
Matthias Kloseb159a552010-04-25 21:00:44 +00006870
6871 ac_cv_no_strict_aliasing=yes
6872
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006873fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006875
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006876else
Matthias Kloseb159a552010-04-25 21:00:44 +00006877
6878 ac_cv_no_strict_aliasing=no
6879
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006882fi
6883
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006884 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6887$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006888 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 then
6890 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6891 fi
6892
Zachary Ware5af85642015-12-21 12:09:17 -06006893 # ICC doesn't recognize the option, but only emits a warning
6894 ## XXX does it emit an unused result warning and can it be disabled?
6895 case "$CC" in
6896 *icc*)
6897 ac_cv_disable_unused_result_warning=no
6898 ;;
6899 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6901$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6902 ac_save_cc="$CC"
6903 CC="$CC -Wunused-result -Werror"
6904 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006905 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006906 $as_echo_n "(cached) " >&6
6907else
6908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6909/* end confdefs.h. */
6910
6911
6912int
6913main ()
6914{
6915
6916 ;
6917 return 0;
6918}
6919
6920_ACEOF
6921if ac_fn_c_try_compile "$LINENO"; then :
6922
6923 ac_cv_disable_unused_result_warning=yes
6924
6925else
6926
6927 ac_cv_disable_unused_result_warning=no
6928
6929fi
6930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6931fi
6932
6933 CFLAGS="$save_CFLAGS"
6934 CC="$ac_save_cc"
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6936$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006937 ;;
6938 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006939
6940 if test $ac_cv_disable_unused_result_warning = yes
6941 then
6942 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006943 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6944 fi
6945
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6947$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6948 ac_save_cc="$CC"
6949 CC="$CC -Wunused-parameter -Werror"
6950 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6951 $as_echo_n "(cached) " >&6
6952else
6953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6954/* end confdefs.h. */
6955
6956
6957int
6958main ()
6959{
6960
6961 ;
6962 return 0;
6963}
6964
6965_ACEOF
6966if ac_fn_c_try_compile "$LINENO"; then :
6967
6968 ac_cv_disable_unused_parameter_warning=yes
6969
6970else
6971
6972 ac_cv_disable_unused_parameter_warning=no
6973
6974fi
6975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6976fi
6977
6978 CC="$ac_save_cc"
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6980$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6981
6982 if test $ac_cv_disable_unused_parameter_warning = yes
6983 then
6984 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6985 fi
6986
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6988$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6989 ac_save_cc="$CC"
6990 CC="$CC -Wmissing-field-initializers -Werror"
6991 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6992 $as_echo_n "(cached) " >&6
6993else
6994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6995/* end confdefs.h. */
6996
6997
6998int
6999main ()
7000{
7001
7002 ;
7003 return 0;
7004}
7005
7006_ACEOF
7007if ac_fn_c_try_compile "$LINENO"; then :
7008
7009 ac_cv_disable_missing_field_initializers=yes
7010
7011else
7012
7013 ac_cv_disable_missing_field_initializers=no
7014
7015fi
7016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7017fi
7018
7019 CC="$ac_save_cc"
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7021$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7022
7023 if test $ac_cv_disable_missing_field_initializers = yes
7024 then
7025 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007026 fi
7027
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7029$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7030 ac_save_cc="$CC"
7031 CC="$CC -Wsign-compare"
7032 save_CFLAGS="$CFLAGS"
7033 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7034 $as_echo_n "(cached) " >&6
7035else
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7037/* end confdefs.h. */
7038
7039
7040int
7041main ()
7042{
7043
7044 ;
7045 return 0;
7046}
7047
7048_ACEOF
7049if ac_fn_c_try_compile "$LINENO"; then :
7050
7051 ac_cv_enable_sign_compare_warning=yes
7052
7053else
7054
7055 ac_cv_enable_sign_compare_warning=no
7056
7057fi
7058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7059fi
7060
7061 CFLAGS="$save_CFLAGS"
7062 CC="$ac_save_cc"
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7064$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7065
7066 if test $ac_cv_enable_sign_compare_warning = yes
7067 then
7068 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7069 fi
7070
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7072$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7073 ac_save_cc="$CC"
7074 CC="$CC -Wunreachable-code"
7075 save_CFLAGS="$CFLAGS"
7076 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7077 $as_echo_n "(cached) " >&6
7078else
7079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7080/* end confdefs.h. */
7081
7082
7083int
7084main ()
7085{
7086
7087 ;
7088 return 0;
7089}
7090
7091_ACEOF
7092if ac_fn_c_try_compile "$LINENO"; then :
7093
7094 ac_cv_enable_unreachable_code_warning=yes
7095
7096else
7097
7098 ac_cv_enable_unreachable_code_warning=no
7099
7100fi
7101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7102fi
7103
7104 CFLAGS="$save_CFLAGS"
7105 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007106
7107 # Don't enable unreachable code warning in debug mode, since it usually
7108 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007109 # Issue #24324: Unfortunately, the unreachable code warning does not work
7110 # correctly on gcc and has been silently removed from the compiler.
7111 # It is supported on clang but on OS X systems gcc may be an alias
7112 # for clang. Try to determine if the compiler is not really gcc and,
7113 # if so, only then enable the warning.
7114 if test $ac_cv_enable_unreachable_code_warning = yes && \
7115 test "$Py_DEBUG" != "true" && \
7116 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007117 then
7118 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007119 else
7120 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007121 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7123$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007124
Victor Stinner193ee0a2017-02-06 14:24:00 +01007125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7126$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7127 ac_save_cc="$CC"
7128 CC="$CC -Werror=implicit-function-declaration"
7129 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7130 $as_echo_n "(cached) " >&6
7131else
7132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7133/* end confdefs.h. */
7134
7135
7136int
7137main ()
7138{
7139
7140 ;
7141 return 0;
7142}
7143
7144_ACEOF
7145if ac_fn_c_try_compile "$LINENO"; then :
7146
7147 ac_cv_enable_implicit_function_declaration_error=yes
7148
7149else
7150
7151 ac_cv_enable_implicit_function_declaration_error=no
7152
7153fi
7154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7155fi
7156
7157 CC="$ac_save_cc"
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7159$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7160
7161 if test $ac_cv_enable_implicit_function_declaration_error = yes
7162 then
7163 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7164 fi
7165
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7167 # support. Without this, treatment of subnormals doesn't follow
7168 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007169 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007170 alpha*)
7171 BASECFLAGS="$BASECFLAGS -mieee"
7172 ;;
7173 esac
7174
7175 case $ac_sys_system in
7176 SCO_SV*)
7177 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7178 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007179
7180 # is there any other compiler on Darwin besides gcc?
7181 Darwin*)
7182 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7183 # used to be here, but non-Apple gcc doesn't accept them.
7184 if test "${CC}" = gcc
7185 then
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007187$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007188 case "${UNIVERSALSDK}" in
7189 */MacOSX10.4u.sdk)
7190 # Build using 10.4 SDK, force usage of gcc when the
7191 # compiler is gcc, otherwise the user will get very
7192 # confusing error messages when building on OSX 10.6
7193 CC=gcc-4.0
7194 CPP=cpp-4.0
7195 ;;
7196 esac
7197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007198$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007199 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007200
Ned Deily87adb6e2013-10-18 21:09:56 -07007201 if test "${enable_universalsdk}"
7202 then
7203 case "$UNIVERSAL_ARCHS" in
7204 32-bit)
7205 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7206 LIPO_32BIT_FLAGS=""
7207 ARCH_RUN_32BIT=""
7208 ;;
7209 64-bit)
7210 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7211 LIPO_32BIT_FLAGS=""
7212 ARCH_RUN_32BIT="true"
7213 ;;
7214 all)
7215 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7216 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7217 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7218 ;;
7219 intel)
7220 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7221 LIPO_32BIT_FLAGS="-extract i386"
7222 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7223 ;;
7224 intel-32)
7225 UNIVERSAL_ARCH_FLAGS="-arch i386"
7226 LIPO_32BIT_FLAGS=""
7227 ARCH_RUN_32BIT=""
7228 ;;
7229 3-way)
7230 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7231 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7232 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7233 ;;
7234 *)
7235 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7236 ;;
7237 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007238
Ned Deily87adb6e2013-10-18 21:09:56 -07007239 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7240 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7241 if test "${UNIVERSALSDK}" != "/"
7242 then
7243 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7244 fi
7245 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246
Ned Deily87adb6e2013-10-18 21:09:56 -07007247 # Calculate an appropriate deployment target for this build:
7248 # The deployment target value is used explicitly to enable certain
7249 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007250 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007251 # component of the string returned by distutils.get_platform().
7252 #
7253 # Use the value from:
7254 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7255 # 2. the operating system version of the build machine if >= 10.6
7256 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7257 # below to pick either 10.3, 10.4, or 10.5 as the target.
7258 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007259
Ned Deily87adb6e2013-10-18 21:09:56 -07007260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7261$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007262 cur_target_major=`sw_vers -productVersion | \
7263 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7264 cur_target_minor=`sw_vers -productVersion | \
7265 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7266 cur_target="${cur_target_major}.${cur_target_minor}"
7267 if test ${cur_target_major} -eq 10 && \
7268 test ${cur_target_minor} -ge 3 && \
7269 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007270 then
Ned Deily36820b62014-06-25 13:44:22 -07007271 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007272 cur_target=10.3
7273 if test ${enable_universalsdk}
7274 then
7275 case "$UNIVERSAL_ARCHS" in
7276 all|3-way|intel|64-bit)
7277 # These configurations were first supported in 10.5
7278 cur_target='10.5'
7279 ;;
7280 esac
7281 else
7282 if test `/usr/bin/arch` = "i386"
7283 then
7284 # 10.4 was the first release to support Intel archs
7285 cur_target="10.4"
7286 fi
7287 fi
7288 fi
7289 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007290
Ned Deily87adb6e2013-10-18 21:09:56 -07007291 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7292 # environment with a value that is the same as what we'll use
7293 # in the Makefile to ensure that we'll get the same compiler
7294 # environment during configure and build time.
7295 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7296 export MACOSX_DEPLOYMENT_TARGET
7297 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7299$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007300
Ned Deily87adb6e2013-10-18 21:09:56 -07007301 # end of Darwin* tests
7302 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007303 esac
7304 ;;
7305
7306*)
7307 case $ac_sys_system in
7308 OpenUNIX*|UnixWare*)
7309 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7310 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007311 SCO_SV*)
7312 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7313 ;;
7314 esac
7315 ;;
7316esac
7317
Zachary Ware5af85642015-12-21 12:09:17 -06007318# ICC needs -fp-model strict or floats behave badly
7319case "$CC" in
7320*icc*)
7321 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7322 ;;
7323esac
7324
T. Woutersddbfa2c2017-05-23 01:30:49 +02007325if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007326 :
7327else
7328 OPT="-DNDEBUG $OPT"
7329fi
7330
7331if test "$ac_arch_flags"
7332then
7333 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7334fi
7335
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336# On some compilers, pthreads are available without further options
7337# (e.g. MacOS X). On some of these systems, the compiler will not
7338# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7339# So we have to see first whether pthreads are available without
7340# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7342$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007343if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345else
Matthias Kloseb9621712010-04-24 17:59:49 +00007346 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347 ac_cv_pthread_is_default=no
7348else
Matthias Kloseb9621712010-04-24 17:59:49 +00007349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350/* end confdefs.h. */
7351
Stefan Krah7dba5942012-11-22 22:49:11 +01007352#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353#include <pthread.h>
7354
7355void* routine(void* p){return NULL;}
7356
7357int main(){
7358 pthread_t p;
7359 if(pthread_create(&p,NULL,routine,NULL)!=0)
7360 return 1;
7361 (void)pthread_detach(p);
7362 return 0;
7363}
7364
7365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007366if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367
7368 ac_cv_pthread_is_default=yes
7369 ac_cv_kthread=no
7370 ac_cv_pthread=no
7371
7372else
Matthias Kloseb9621712010-04-24 17:59:49 +00007373 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7376 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377fi
7378
7379
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380fi
7381
Matthias Kloseb9621712010-04-24 17:59:49 +00007382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7383$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384
7385
7386if test $ac_cv_pthread_is_default = yes
7387then
7388 ac_cv_kpthread=no
7389else
7390# -Kpthread, if available, provides the right #defines
7391# and linker options to make pthread_create available
7392# Some compilers won't report that they do not support -Kpthread,
7393# so we need to run a program to see whether it really made the
7394# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7396$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007397if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399else
7400 ac_save_cc="$CC"
7401CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007402if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403 ac_cv_kpthread=no
7404else
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406/* end confdefs.h. */
7407
Stefan Krah7dba5942012-11-22 22:49:11 +01007408#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007409#include <pthread.h>
7410
7411void* routine(void* p){return NULL;}
7412
7413int main(){
7414 pthread_t p;
7415 if(pthread_create(&p,NULL,routine,NULL)!=0)
7416 return 1;
7417 (void)pthread_detach(p);
7418 return 0;
7419}
7420
7421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007422if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423 ac_cv_kpthread=yes
7424else
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7428 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429fi
7430
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431CC="$ac_save_cc"
7432fi
7433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7435$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436fi
7437
7438if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7439then
7440# -Kthread, if available, provides the right #defines
7441# and linker options to make pthread_create available
7442# Some compilers won't report that they do not support -Kthread,
7443# so we need to run a program to see whether it really made the
7444# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7446$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007447if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449else
7450 ac_save_cc="$CC"
7451CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007452if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453 ac_cv_kthread=no
7454else
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456/* end confdefs.h. */
7457
Stefan Krah7dba5942012-11-22 22:49:11 +01007458#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459#include <pthread.h>
7460
7461void* routine(void* p){return NULL;}
7462
7463int main(){
7464 pthread_t p;
7465 if(pthread_create(&p,NULL,routine,NULL)!=0)
7466 return 1;
7467 (void)pthread_detach(p);
7468 return 0;
7469}
7470
7471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007472if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473 ac_cv_kthread=yes
7474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479fi
7480
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007481CC="$ac_save_cc"
7482fi
7483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7485$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486fi
7487
7488if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7489then
7490# -pthread, if available, provides the right #defines
7491# and linker options to make pthread_create available
7492# Some compilers won't report that they do not support -pthread,
7493# so we need to run a program to see whether it really made the
7494# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7496$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007497if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499else
7500 ac_save_cc="$CC"
7501CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007502if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503 ac_cv_pthread=no
7504else
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506/* end confdefs.h. */
7507
Stefan Krah7dba5942012-11-22 22:49:11 +01007508#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509#include <pthread.h>
7510
7511void* routine(void* p){return NULL;}
7512
7513int main(){
7514 pthread_t p;
7515 if(pthread_create(&p,NULL,routine,NULL)!=0)
7516 return 1;
7517 (void)pthread_detach(p);
7518 return 0;
7519}
7520
7521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007522if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523 ac_cv_pthread=yes
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529fi
7530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531CC="$ac_save_cc"
7532fi
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7535$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536fi
7537
7538# If we have set a CC compiler flag for thread support then
7539# check if it works for CXX, too.
7540ac_cv_cxx_thread=no
7541if test ! -z "$CXX"
7542then
Matthias Kloseb9621712010-04-24 17:59:49 +00007543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7544$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007545ac_save_cxx="$CXX"
7546
7547if test "$ac_cv_kpthread" = "yes"
7548then
7549 CXX="$CXX -Kpthread"
7550 ac_cv_cxx_thread=yes
7551elif test "$ac_cv_kthread" = "yes"
7552then
7553 CXX="$CXX -Kthread"
7554 ac_cv_cxx_thread=yes
7555elif test "$ac_cv_pthread" = "yes"
7556then
7557 CXX="$CXX -pthread"
7558 ac_cv_cxx_thread=yes
7559fi
7560
7561if test $ac_cv_cxx_thread = yes
7562then
7563 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7564 $CXX -c conftest.$ac_ext 2>&5
7565 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7566 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7567 then
7568 ac_cv_cxx_thread=yes
7569 else
7570 ac_cv_cxx_thread=no
7571 fi
7572 rm -fr conftest*
7573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7575$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576fi
7577CXX="$ac_save_cxx"
7578
7579
7580# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7582$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007583if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585else
Matthias Kloseb9621712010-04-24 17:59:49 +00007586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007587/* end confdefs.h. */
7588#include <stdlib.h>
7589#include <stdarg.h>
7590#include <string.h>
7591#include <float.h>
7592
7593int
7594main ()
7595{
7596
7597 ;
7598 return 0;
7599}
7600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007601if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602 ac_cv_header_stdc=yes
7603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7607
7608if test $ac_cv_header_stdc = yes; then
7609 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611/* end confdefs.h. */
7612#include <string.h>
7613
7614_ACEOF
7615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 $EGREP "memchr" >/dev/null 2>&1; then :
7617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618else
7619 ac_cv_header_stdc=no
7620fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007621rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622
7623fi
7624
7625if test $ac_cv_header_stdc = yes; then
7626 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628/* end confdefs.h. */
7629#include <stdlib.h>
7630
7631_ACEOF
7632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $EGREP "free" >/dev/null 2>&1; then :
7634
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635else
7636 ac_cv_header_stdc=no
7637fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007638rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639
7640fi
7641
7642if test $ac_cv_header_stdc = yes; then
7643 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645 :
7646else
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648/* end confdefs.h. */
7649#include <ctype.h>
7650#include <stdlib.h>
7651#if ((' ' & 0x0FF) == 0x020)
7652# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7653# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7654#else
7655# define ISLOWER(c) \
7656 (('a' <= (c) && (c) <= 'i') \
7657 || ('j' <= (c) && (c) <= 'r') \
7658 || ('s' <= (c) && (c) <= 'z'))
7659# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7660#endif
7661
7662#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7663int
7664main ()
7665{
7666 int i;
7667 for (i = 0; i < 256; i++)
7668 if (XOR (islower (i), ISLOWER (i))
7669 || toupper (i) != TOUPPER (i))
7670 return 2;
7671 return 0;
7672}
7673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007674if ac_fn_c_try_run "$LINENO"; then :
7675
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681fi
7682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683fi
7684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7686$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687if test $ac_cv_header_stdc = yes; then
7688
Matthias Kloseb9621712010-04-24 17:59:49 +00007689$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690
7691fi
7692
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007693for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007694fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007695ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007696sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007697unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007698poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007699sys/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 +01007700sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007701sys/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 +01007702sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007703sys/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 -07007704libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007705linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007706sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007707do :
7708 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7709ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007710if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007712#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007713_ACEOF
7714
7715fi
7716
Guido van Rossum627b2d71993-12-24 10:39:16 +00007717done
7718
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007719ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007720for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7723$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007724if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007726else
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007728/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007729#include <sys/types.h>
7730#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007731
Martin v. Löwis11437992002-04-12 09:54:03 +00007732int
7733main ()
7734{
7735if ((DIR *) 0)
7736return 0;
7737 ;
7738 return 0;
7739}
7740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007741if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007743else
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007748eval ac_res=\$$as_ac_Header
7749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7750$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007751if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007753#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007754_ACEOF
7755
7756ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007757fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007758
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007759done
7760# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7761if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7763$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007764if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007766else
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771/* Override any GCC internal prototype to avoid an error.
7772 Use char because int might match the return type of a GCC
7773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007774#ifdef __cplusplus
7775extern "C"
7776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007777char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
7780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 ;
7783 return 0;
7784}
7785_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786for ac_lib in '' dir; do
7787 if test -z "$ac_lib"; then
7788 ac_res="none required"
7789 else
7790 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007791 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796rm -f core conftest.err conftest.$ac_objext \
7797 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007798 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801done
Victor Stinnere0be4232011-10-25 13:06:09 +02007802if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804else
7805 ac_cv_search_opendir=no
7806fi
7807rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007808LIBS=$ac_func_search_save_LIBS
7809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7811$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007813if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007817
Michael W. Hudson54241132001-12-07 15:38:26 +00007818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7820$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007821if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007823else
7824 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828/* Override any GCC internal prototype to avoid an error.
7829 Use char because int might match the return type of a GCC
7830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007831#ifdef __cplusplus
7832extern "C"
7833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007834char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007835int
7836main ()
7837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 ;
7840 return 0;
7841}
7842_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843for ac_lib in '' x; do
7844 if test -z "$ac_lib"; then
7845 ac_res="none required"
7846 else
7847 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007853rm -f core conftest.err conftest.$ac_objext \
7854 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007855 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858done
Victor Stinnere0be4232011-10-25 13:06:09 +02007859if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861else
7862 ac_cv_search_opendir=no
7863fi
7864rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007865LIBS=$ac_func_search_save_LIBS
7866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7868$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007870if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007872
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007873fi
7874
7875fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7878$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007879if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007881else
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007883/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007884#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007885int
7886main ()
7887{
7888return makedev(0, 0);
7889 ;
7890 return 0;
7891}
7892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007894 ac_cv_header_sys_types_h_makedev=yes
7895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898rm -f core conftest.err conftest.$ac_objext \
7899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007900
7901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7903$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007904
7905if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007906ac_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 +02007907if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007908
Matthias Kloseb9621712010-04-24 17:59:49 +00007909$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007910
7911fi
7912
7913
7914
7915 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 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 +02007917if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007918
Matthias Kloseb9621712010-04-24 17:59:49 +00007919$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007920
7921fi
7922
7923
7924 fi
7925fi
7926
Michael W. Hudson54241132001-12-07 15:38:26 +00007927
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007928# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7929# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7930SAVE_CFLAGS=$CFLAGS
7931CFLAGS="-std=c99 $CFLAGS"
7932for ac_header in bluetooth/bluetooth.h
7933do :
7934 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7935if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7936 cat >>confdefs.h <<_ACEOF
7937#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7938_ACEOF
7939
7940fi
7941
7942done
7943
7944CFLAGS=$SAVE_CFLAGS
7945
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007946# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7947for ac_header in net/if.h
7948do :
7949 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7950#ifdef STDC_HEADERS
7951# include <stdlib.h>
7952# include <stddef.h>
7953#else
7954# ifdef HAVE_STDLIB_H
7955# include <stdlib.h>
7956# endif
7957#endif
7958#ifdef HAVE_SYS_SOCKET_H
7959# include <sys/socket.h>
7960#endif
7961
7962"
Victor Stinnere0be4232011-10-25 13:06:09 +02007963if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007964 cat >>confdefs.h <<_ACEOF
7965#define HAVE_NET_IF_H 1
7966_ACEOF
7967
7968fi
7969
7970done
7971
7972
Martin v. Löwis11017b12006-01-14 18:12:57 +00007973# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007974for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007975do :
7976 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 +00007977#ifdef HAVE_ASM_TYPES_H
7978#include <asm/types.h>
7979#endif
7980#ifdef HAVE_SYS_SOCKET_H
7981#include <sys/socket.h>
7982#endif
7983
Matthias Kloseb9621712010-04-24 17:59:49 +00007984"
Victor Stinnere0be4232011-10-25 13:06:09 +02007985if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007986 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007987#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007988_ACEOF
7989
7990fi
7991
7992done
7993
7994
caaveryeffc12f2017-09-06 18:18:10 -04007995for ac_header in linux/vm_sockets.h
7996do :
7997 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7998#ifdef HAVE_SYS_SOCKET_H
7999#include <sys/socket.h>
8000#endif
8001
8002"
8003if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8004 cat >>confdefs.h <<_ACEOF
8005#define HAVE_LINUX_VM_SOCKETS_H 1
8006_ACEOF
8007
8008fi
8009
8010done
8011
8012
Charles-François Natali47413c12011-10-06 19:47:44 +02008013# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008014for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008015do :
8016 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8017ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8018#ifdef HAVE_SYS_SOCKET_H
8019#include <sys/socket.h>
8020#endif
8021
8022"
8023if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8024 cat >>confdefs.h <<_ACEOF
8025#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8026_ACEOF
8027
8028fi
8029
8030done
8031
8032
Guido van Rossum627b2d71993-12-24 10:39:16 +00008033# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008034was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8036$as_echo_n "checking for clock_t in time.h... " >&6; }
8037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008038/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008039#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008040
8041_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008044 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008045else
Martin v. Löwis11437992002-04-12 09:54:03 +00008046
8047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008049
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008050
Guido van Rossum627b2d71993-12-24 10:39:16 +00008051fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008052rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008053
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8055$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008056
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8058$as_echo_n "checking for makedev... " >&6; }
8059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008060/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008061
Jesus Cea740f53a2010-04-28 11:35:30 +00008062#if defined(MAJOR_IN_MKDEV)
8063#include <sys/mkdev.h>
8064#elif defined(MAJOR_IN_SYSMACROS)
8065#include <sys/sysmacros.h>
8066#else
8067#include <sys/types.h>
8068#endif
8069
Neal Norwitz11690112002-07-30 01:08:28 +00008070int
8071main ()
8072{
Jesus Cea740f53a2010-04-28 11:35:30 +00008073
8074 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008075 ;
8076 return 0;
8077}
Matthias Kloseb159a552010-04-25 21:00:44 +00008078
Neal Norwitz11690112002-07-30 01:08:28 +00008079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008080if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008081 ac_cv_has_makedev=yes
8082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008085rm -f core conftest.err conftest.$ac_objext \
8086 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8088$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008089if test "$ac_cv_has_makedev" = "yes"; then
8090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008092
8093fi
8094
Christian Heimes985ecdc2013-11-20 11:46:18 +01008095# byte swapping
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8097$as_echo_n "checking for le64toh... " >&6; }
8098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8099/* end confdefs.h. */
8100
8101#ifdef HAVE_ENDIAN_H
8102#include <endian.h>
8103#elif defined(HAVE_SYS_ENDIAN_H)
8104#include <sys/endian.h>
8105#endif
8106
8107int
8108main ()
8109{
8110
8111 le64toh(1)
8112 ;
8113 return 0;
8114}
8115
8116_ACEOF
8117if ac_fn_c_try_link "$LINENO"; then :
8118 ac_cv_has_le64toh=yes
8119else
8120 ac_cv_has_le64toh=no
8121fi
8122rm -f core conftest.err conftest.$ac_objext \
8123 conftest$ac_exeext conftest.$ac_ext
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8125$as_echo "$ac_cv_has_le64toh" >&6; }
8126if test "$ac_cv_has_le64toh" = "yes"; then
8127
8128$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8129
8130fi
8131
Martin v. Löwis399a6892002-10-04 10:22:02 +00008132use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008133# Don't use largefile support for GNU/Hurd
8134case $ac_sys_system in GNU*)
8135 use_lfs=no
8136esac
8137
Martin v. Löwis399a6892002-10-04 10:22:02 +00008138if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008139# Two defines needed to enable largefile support on various platforms
8140# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008141case $ac_sys_system/$ac_sys_release in
8142AIX*)
8143
8144$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8145
8146 ;;
8147esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008148
Matthias Kloseb9621712010-04-24 17:59:49 +00008149$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008150
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008153
Martin v. Löwis399a6892002-10-04 10:22:02 +00008154fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008155
Guido van Rossum84e7b241996-08-19 21:59:00 +00008156# Add some code to confdefs.h so that the test for off_t works on SCO
8157cat >> confdefs.h <<\EOF
8158#if defined(SCO_DS)
8159#undef _OFF_T
8160#endif
8161EOF
8162
Guido van Rossumef2255b2000-03-10 22:30:29 +00008163# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008164ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008167else
Martin v. Löwis11437992002-04-12 09:54:03 +00008168
8169cat >>confdefs.h <<_ACEOF
8170#define mode_t int
8171_ACEOF
8172
8173fi
8174
Matthias Kloseb9621712010-04-24 17:59:49 +00008175ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008176if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008178else
Martin v. Löwis11437992002-04-12 09:54:03 +00008179
8180cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008182_ACEOF
8183
8184fi
8185
Matthias Kloseb9621712010-04-24 17:59:49 +00008186ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008187if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008189else
Martin v. Löwis11437992002-04-12 09:54:03 +00008190
8191cat >>confdefs.h <<_ACEOF
8192#define pid_t int
8193_ACEOF
8194
8195fi
8196
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008197
Martin v. Löwis11437992002-04-12 09:54:03 +00008198cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008199#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008200_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008203if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008205else
Martin v. Löwis11437992002-04-12 09:54:03 +00008206
8207cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008209_ACEOF
8210
8211fi
8212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8214$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008215if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008217else
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008219/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008225 ac_cv_type_uid_t=yes
8226else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008227 ac_cv_type_uid_t=no
8228fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008229rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8233$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008234if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008240
8241fi
8242
Mark Dickinson983bc162012-12-02 12:11:38 +00008243
Matthias Kloseb9621712010-04-24 17:59:49 +00008244ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008245if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246
Matthias Kloseb9621712010-04-24 17:59:49 +00008247$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008248
8249fi
8250
Stefan Krah1919b7e2012-03-21 18:25:23 +01008251ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8252if test "x$ac_cv_type___uint128_t" = xyes; then :
8253
8254$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8255
8256fi
8257
Jack Jansendd19cf82001-12-06 22:36:17 +00008258
Michael W. Hudson54241132001-12-07 15:38:26 +00008259# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008260# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261# The cast to long int works around a bug in the HP C Compiler
8262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8264# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8266$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008267if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008269else
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 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 +00008271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272else
Matthias Kloseb9621712010-04-24 17:59:49 +00008273 if test "$ac_cv_type_int" = yes; then
8274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008276as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008277See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278 else
8279 ac_cv_sizeof_int=0
8280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008282
Martin v. Löwis11437992002-04-12 09:54:03 +00008283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8285$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286
8287
8288
Martin v. Löwis11437992002-04-12 09:54:03 +00008289cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008290#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008291_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008292
8293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008294# The cast to long int works around a bug in the HP C Compiler
8295# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8296# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8297# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8299$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008300if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008302else
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 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 +00008304
Martin v. Löwis11437992002-04-12 09:54:03 +00008305else
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 if test "$ac_cv_type_long" = yes; then
8307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008309as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008310See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311 else
8312 ac_cv_sizeof_long=0
8313 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8318$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008319
8320
8321
Martin v. Löwis11437992002-04-12 09:54:03 +00008322cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008323#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008324_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008325
8326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008327# The cast to long int works around a bug in the HP C Compiler
8328# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8329# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8330# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8332$as_echo_n "checking size of long long... " >&6; }
8333if ${ac_cv_sizeof_long_long+:} false; then :
8334 $as_echo_n "(cached) " >&6
8335else
8336 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8337
8338else
8339 if test "$ac_cv_type_long_long" = yes; then
8340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8342as_fn_error 77 "cannot compute sizeof (long long)
8343See \`config.log' for more details" "$LINENO" 5; }
8344 else
8345 ac_cv_sizeof_long_long=0
8346 fi
8347fi
8348
8349fi
8350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8351$as_echo "$ac_cv_sizeof_long_long" >&6; }
8352
8353
8354
8355cat >>confdefs.h <<_ACEOF
8356#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8357_ACEOF
8358
8359
8360# The cast to long int works around a bug in the HP C Compiler
8361# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8362# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8363# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8365$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008366if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 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 +00008370
Martin v. Löwis11437992002-04-12 09:54:03 +00008371else
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 if test "$ac_cv_type_void_p" = yes; then
8373 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008375as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008376See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377 else
8378 ac_cv_sizeof_void_p=0
8379 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8384$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385
8386
8387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008389#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008390_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008391
8392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393# The cast to long int works around a bug in the HP C Compiler
8394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8396# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8398$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008399if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008401else
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 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 +00008403
Martin v. Löwis11437992002-04-12 09:54:03 +00008404else
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 if test "$ac_cv_type_short" = yes; then
8406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008408as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008409See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410 else
8411 ac_cv_sizeof_short=0
8412 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8417$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418
8419
8420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008422#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008423_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008424
8425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426# The cast to long int works around a bug in the HP C Compiler
8427# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8428# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8429# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8431$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008432if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008434else
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 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 +00008436
Martin v. Löwis11437992002-04-12 09:54:03 +00008437else
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 if test "$ac_cv_type_float" = yes; then
8439 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008441as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008442See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443 else
8444 ac_cv_sizeof_float=0
8445 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008447
Martin v. Löwis11437992002-04-12 09:54:03 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8450$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451
8452
8453
Martin v. Löwis11437992002-04-12 09:54:03 +00008454cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008455#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008456_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008457
8458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459# The cast to long int works around a bug in the HP C Compiler
8460# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8461# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8462# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8464$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008465if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 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 +00008469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470else
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 if test "$ac_cv_type_double" = yes; then
8472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008474as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008475See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476 else
8477 ac_cv_sizeof_double=0
8478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8483$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484
8485
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008488#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008489_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008490
8491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492# The cast to long int works around a bug in the HP C Compiler
8493# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8494# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8495# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8497$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008498if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008500else
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 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 +00008502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503else
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 if test "$ac_cv_type_fpos_t" = yes; then
8505 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008507as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008508See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 else
8510 ac_cv_sizeof_fpos_t=0
8511 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8516$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517
8518
8519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008521#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008522_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008523
Michael W. Hudson54241132001-12-07 15:38:26 +00008524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525# The cast to long int works around a bug in the HP C Compiler
8526# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8527# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8528# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8530$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008531if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 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 +00008535
Martin v. Löwis18e16552006-02-15 17:27:45 +00008536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 if test "$ac_cv_type_size_t" = yes; then
8538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008540as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008541See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542 else
8543 ac_cv_sizeof_size_t=0
8544 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546
Martin v. Löwis18e16552006-02-15 17:27:45 +00008547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8549$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008550
8551
8552
Martin v. Löwis18e16552006-02-15 17:27:45 +00008553cat >>confdefs.h <<_ACEOF
8554#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8555_ACEOF
8556
8557
Christian Heimes400adb02008-02-01 08:12:03 +00008558# The cast to long int works around a bug in the HP C Compiler
8559# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8560# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8561# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8563$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008564if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008566else
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 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 +00008568
Christian Heimes400adb02008-02-01 08:12:03 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 if test "$ac_cv_type_pid_t" = yes; then
8571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008573as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008574See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008575 else
8576 ac_cv_sizeof_pid_t=0
8577 fi
8578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579
Christian Heimes400adb02008-02-01 08:12:03 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8582$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008583
8584
8585
8586cat >>confdefs.h <<_ACEOF
8587#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8588_ACEOF
8589
8590
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008591# The cast to long int works around a bug in the HP C Compiler
8592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8594# This bug is HP SR number 8606223364.
8595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8596$as_echo_n "checking size of uintptr_t... " >&6; }
8597if ${ac_cv_sizeof_uintptr_t+:} false; then :
8598 $as_echo_n "(cached) " >&6
8599else
8600 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8601
8602else
8603 if test "$ac_cv_type_uintptr_t" = yes; then
8604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8606as_fn_error 77 "cannot compute sizeof (uintptr_t)
8607See \`config.log' for more details" "$LINENO" 5; }
8608 else
8609 ac_cv_sizeof_uintptr_t=0
8610 fi
8611fi
8612
8613fi
8614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8615$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8616
8617
8618
8619cat >>confdefs.h <<_ACEOF
8620#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8621_ACEOF
8622
8623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8626$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008627have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008629/* end confdefs.h. */
8630
8631int
8632main ()
8633{
8634long double x; x = (long double)0;
8635 ;
8636 return 0;
8637}
8638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008639if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008640
8641
Matthias Kloseb9621712010-04-24 17:59:49 +00008642$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008643
8644 have_long_double=yes
8645
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008646fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8649$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008650if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008651# The cast to long int works around a bug in the HP C Compiler
8652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8654# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8656$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008657if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 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 +00008661
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 if test "$ac_cv_type_long_double" = yes; then
8664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008666as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008667See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008668 else
8669 ac_cv_sizeof_long_double=0
8670 fi
8671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8675$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008676
8677
8678
8679cat >>confdefs.h <<_ACEOF
8680#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8681_ACEOF
8682
8683
8684fi
8685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8691$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 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 +00008696
Thomas Woutersb2137042007-02-01 18:02:27 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 if test "$ac_cv_type__Bool" = yes; then
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703 else
8704 ac_cv_sizeof__Bool=0
8705 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707
Thomas Woutersb2137042007-02-01 18:02:27 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8710$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711
8712
8713
Thomas Woutersb2137042007-02-01 18:02:27 +00008714cat >>confdefs.h <<_ACEOF
8715#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8716_ACEOF
8717
8718
Thomas Woutersb2137042007-02-01 18:02:27 +00008719
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8725$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008726if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008730#ifdef HAVE_SYS_TYPES_H
8731#include <sys/types.h>
8732#endif
8733
Matthias Kloseb9621712010-04-24 17:59:49 +00008734"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 if test "$ac_cv_type_off_t" = yes; then
8738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008740as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008741See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008742 else
8743 ac_cv_sizeof_off_t=0
8744 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008746
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8749$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008750
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008751
8752
Martin v. Löwis11437992002-04-12 09:54:03 +00008753cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008754#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008755_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008756
Michael W. Hudson54241132001-12-07 15:38:26 +00008757
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8760$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008761if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008762 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008763
Matthias Kloseb9621712010-04-24 17:59:49 +00008764$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008765
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8767$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008768else
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8770$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008771fi
8772
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773# The cast to long int works around a bug in the HP C Compiler
8774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8778$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008779if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783#ifdef HAVE_SYS_TYPES_H
8784#include <sys/types.h>
8785#endif
8786#ifdef HAVE_TIME_H
8787#include <time.h>
8788#endif
8789
Matthias Kloseb9621712010-04-24 17:59:49 +00008790"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008791
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 if test "$ac_cv_type_time_t" = yes; then
8794 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008796as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008797See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008798 else
8799 ac_cv_sizeof_time_t=0
8800 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8805$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008807
8808
Martin v. Löwis11437992002-04-12 09:54:03 +00008809cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008810#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008811_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008812
Michael W. Hudson54241132001-12-07 15:38:26 +00008813
8814
Trent Mick635f6fb2000-08-23 21:33:05 +00008815# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008816ac_save_cc="$CC"
8817if test "$ac_cv_kpthread" = "yes"
8818then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008819elif test "$ac_cv_kthread" = "yes"
8820then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008821elif test "$ac_cv_pthread" = "yes"
8822then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008823fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008824
Matthias Kloseb9621712010-04-24 17:59:49 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8826$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008827have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008829/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008830
8831 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008832int
8833main ()
8834{
Guido van Rossum12580492000-09-24 16:47:19 +00008835pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 ;
8837 return 0;
8838}
Matthias Kloseb159a552010-04-25 21:00:44 +00008839
Martin v. Löwis11437992002-04-12 09:54:03 +00008840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008841if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008842 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8846$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008847if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8851# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8853$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008854if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858#ifdef HAVE_PTHREAD_H
8859#include <pthread.h>
8860#endif
8861
Matthias Kloseb9621712010-04-24 17:59:49 +00008862"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008864else
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 if test "$ac_cv_type_pthread_t" = yes; then
8866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008868as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008869See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870 else
8871 ac_cv_sizeof_pthread_t=0
8872 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874
Trent Mick635f6fb2000-08-23 21:33:05 +00008875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8877$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008879
8880
Martin v. Löwis11437992002-04-12 09:54:03 +00008881cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008882#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008883_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008884
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885
Trent Mick635f6fb2000-08-23 21:33:05 +00008886fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008887CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008888
Michael W. Hudson54241132001-12-07 15:38:26 +00008889
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008890case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008891 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008892 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8893 ;;
8894 Darwin/*)
8895 OTHER_LIBTOOL_OPT=""
8896 ;;
8897esac
8898
8899
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008900
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008901case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008902 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008903 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8904 if test "${enable_universalsdk}"; then
8905 :
8906 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008907 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008908 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008909 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008910 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008911 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008912 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008913 if test ${gcc_version} '<' 4.0
8914 then
8915 LIBTOOL_CRUFT="-lcc_dynamic"
8916 else
8917 LIBTOOL_CRUFT=""
8918 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008920 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008921else
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008923/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008924
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008925 #include <unistd.h>
8926 int main(int argc, char*argv[])
8927 {
8928 if (sizeof(long) == 4) {
8929 return 0;
8930 } else {
8931 return 1;
8932 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008933 }
8934
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008936if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008937 ac_osx_32bit=yes
8938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008943fi
8944
8945
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008946 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008947 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008948 i386)
8949 MACOSX_DEFAULT_ARCH="i386"
8950 ;;
8951 ppc)
8952 MACOSX_DEFAULT_ARCH="ppc"
8953 ;;
8954 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008955 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008956 ;;
8957 esac
8958 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008959 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008960 i386)
8961 MACOSX_DEFAULT_ARCH="x86_64"
8962 ;;
8963 ppc)
8964 MACOSX_DEFAULT_ARCH="ppc64"
8965 ;;
8966 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008967 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008968 ;;
8969 esac
8970
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008971 fi
8972
8973 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008974 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008975 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008976esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8978$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008979if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008980then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008981 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008983 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008984
Matthias Kloseb9621712010-04-24 17:59:49 +00008985$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008986
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8988$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008989 if test $enable_shared = "yes"
8990 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008991 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 +00008992 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008993else
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8995$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008996fi
8997
Matthias Kloseb9621712010-04-24 17:59:49 +00008998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8999$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009000case $ac_sys_system/$ac_sys_release in
9001 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009004
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9006$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009007 ;;
9008 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9010$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009011 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009012esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009013
Guido van Rossum0a516c91994-09-12 10:58:40 +00009014# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009015
Michael W. Hudson54241132001-12-07 15:38:26 +00009016
9017
9018
9019
Benjamin Peterson99f03762010-04-11 22:15:28 +00009020
Thomas Wouters477c8d52006-05-27 19:21:47 +00009021
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009022# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9023# -- usually .so, .sl on HP-UX, .dll on Cygwin
9024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9025$as_echo_n "checking the extension of shared libraries... " >&6; }
9026if test -z "$SHLIB_SUFFIX"; then
9027 case $ac_sys_system in
9028 hp*|HP*)
9029 case `uname -m` in
9030 ia64) SHLIB_SUFFIX=.so;;
9031 *) SHLIB_SUFFIX=.sl;;
9032 esac
9033 ;;
9034 CYGWIN*) SHLIB_SUFFIX=.dll;;
9035 *) SHLIB_SUFFIX=.so;;
9036 esac
9037fi
9038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9039$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009040
Guido van Rossum0a516c91994-09-12 10:58:40 +00009041# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009042# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043# (Shared libraries in this instance are shared modules to be loaded into
9044# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9046$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009047if test -z "$LDSHARED"
9048then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009049 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009050 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009051 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009052 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009053 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009055 if test "$GCC" = "yes" ; then
9056 LDSHARED='$(CC) -shared'
9057 LDCXXSHARED='$(CXX) -shared'
9058 else
9059 LDSHARED='$(CC) -G'
9060 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009061 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009062 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009063 if test "$GCC" = "yes" ; then
9064 LDSHARED='$(CC) -shared'
9065 LDCXXSHARED='$(CXX) -shared'
9066 else
9067 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009068 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009069 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009070 LDSHARED='$(CC) -bundle'
9071 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009072 if test "$enable_framework" ; then
9073 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009074 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9075 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009076 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009077 else
9078 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009079 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009080 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009081 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009082 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009083 LDSHARED='$(CC) -bundle'
9084 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009085 if test "$enable_framework" ; then
9086 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009087 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9088 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009089 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009090 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009091 # No framework, use the Python app as bundle-loader
9092 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009093 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009094 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009095 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009096 Darwin/*)
9097 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9098 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009099
Ned Deily36820b62014-06-25 13:44:22 -07009100 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9101 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9102 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9103 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9104 if test ${dep_target_major} -eq 10 && \
9105 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009106 then
Ned Deily36820b62014-06-25 13:44:22 -07009107 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009108 LDSHARED='$(CC) -bundle'
9109 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009110 if test "$enable_framework" ; then
9111 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009112 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9113 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009114 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009115 else
9116 # No framework, use the Python app as bundle-loader
9117 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9118 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009119 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009120 fi
Ned Deily36820b62014-06-25 13:44:22 -07009121 else
9122 # building for OS X 10.3 and later
9123 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9124 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9125 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009126 fi
9127 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009128 Linux*|GNU*|QNX*)
9129 LDSHARED='$(CC) -shared'
9130 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009131 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009132 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009133 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009134 LDSHARED='$(CC) -shared'
9135 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009136 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009137 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009138 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009139 OpenBSD*)
9140 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9141 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009142 LDSHARED='$(CC) -shared $(CCSHARED)'
9143 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009144 else
9145 case `uname -r` in
9146 [01].* | 2.[0-7] | 2.[0-7].*)
9147 LDSHARED="ld -Bshareable ${LDFLAGS}"
9148 ;;
9149 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009150 LDSHARED='$(CC) -shared $(CCSHARED)'
9151 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009152 ;;
9153 esac
9154 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009155 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009156 LDSHARED='$(CC) -shared'
9157 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009158 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009159 if test "$GCC" = "yes" ; then
9160 LDSHARED='$(CC) -shared'
9161 LDCXXSHARED='$(CXX) -shared'
9162 else
9163 LDSHARED='$(CC) -G'
9164 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009165 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009166 SCO_SV*)
9167 LDSHARED='$(CC) -Wl,-G,-Bexport'
9168 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9169 CYGWIN*)
9170 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9171 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009172 *) LDSHARED="ld";;
9173 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9176$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009177LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009178BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009179# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009180# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9182$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009183if test -z "$CCSHARED"
9184then
Guido van Rossum07397971997-04-29 21:49:50 +00009185 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009186 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009187 then CCSHARED="-fPIC";
9188 elif test `uname -p` = sparc;
9189 then CCSHARED="-xcode=pic32";
9190 else CCSHARED="-Kpic";
9191 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009192 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009193 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009194 else CCSHARED="+z";
9195 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009196 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009197 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009198 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009199 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009200 if test "$GCC" = "yes"
9201 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009202 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009203 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009204 SCO_SV*)
9205 if test "$GCC" = "yes"
9206 then CCSHARED="-fPIC"
9207 else CCSHARED="-Kpic -belf"
9208 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009209 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9212$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009213# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009214# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9216$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009217if test -z "$LINKFORSHARED"
9218then
Guido van Rossum07397971997-04-29 21:49:50 +00009219 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009220 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009221 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009222 LINKFORSHARED="-Wl,-E -Wl,+s";;
9223# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009224 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009225 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009226 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009228 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009229
9230 # Issue #18075: the default maximum stack size (8MBytes) is too
9231 # small for the default recursion limit. Increase the stack size
9232 # to ensure that tests don't crash
9233 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9234
Jack Jansene578a632001-08-15 01:27:14 +00009235 if test "$enable_framework"
9236 then
Jack Jansenda49e192005-01-07 13:08:22 +00009237 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009238 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009239 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009240 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009241 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009242 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009243 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009244 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9245 then
9246 LINKFORSHARED="-Wl,--export-dynamic"
9247 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009248 SunOS/5*) case $CC in
9249 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009250 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009251 then
9252 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009253 fi;;
9254 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009255 CYGWIN*)
9256 if test $enable_shared = "no"
9257 then
9258 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9259 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009260 QNX*)
9261 # -Wl,-E causes the symbols to be added to the dynamic
9262 # symbol table so that they can be found when a module
9263 # is loaded. -N 2048K causes the stack size to be set
9264 # to 2048 kilobytes so that the stack doesn't overflow
9265 # when running test_compile.py.
9266 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9270$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271
Michael W. Hudson54241132001-12-07 15:38:26 +00009272
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009273
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9275$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009276if test ! "$LIBRARY" = "$LDLIBRARY"
9277then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009278 case $ac_sys_system in
9279 CYGWIN*)
9280 # Cygwin needs CCSHARED when building extension DLLs
9281 # but not when building the interpreter DLL.
9282 CFLAGSFORSHARED='';;
9283 *)
9284 CFLAGSFORSHARED='$(CCSHARED)'
9285 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9288$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009289
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009290# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9291# library (with --enable-shared).
9292# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009293# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9294# if it is not required, since it creates a dependency of the shared library
9295# to LIBS. This, in turn, means that applications linking the shared libpython
9296# don't need to link LIBS explicitly. The default should be only changed
9297# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9300$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009301case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009302 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009303 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009304esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9306$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009307
9308
Guido van Rossum627b2d71993-12-24 10:39:16 +00009309# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9311$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009312if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009313 $as_echo_n "(cached) " >&6
9314else
9315 ac_check_lib_save_LIBS=$LIBS
9316LIBS="-lsendfile $LIBS"
9317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9318/* end confdefs.h. */
9319
9320/* Override any GCC internal prototype to avoid an error.
9321 Use char because int might match the return type of a GCC
9322 builtin and then its argument prototype would still apply. */
9323#ifdef __cplusplus
9324extern "C"
9325#endif
9326char sendfile ();
9327int
9328main ()
9329{
9330return sendfile ();
9331 ;
9332 return 0;
9333}
9334_ACEOF
9335if ac_fn_c_try_link "$LINENO"; then :
9336 ac_cv_lib_sendfile_sendfile=yes
9337else
9338 ac_cv_lib_sendfile_sendfile=no
9339fi
9340rm -f core conftest.err conftest.$ac_objext \
9341 conftest$ac_exeext conftest.$ac_ext
9342LIBS=$ac_check_lib_save_LIBS
9343fi
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9345$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009346if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009347 cat >>confdefs.h <<_ACEOF
9348#define HAVE_LIBSENDFILE 1
9349_ACEOF
9350
9351 LIBS="-lsendfile $LIBS"
9352
9353fi
9354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9356$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009357if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009359else
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009361LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365/* Override any GCC internal prototype to avoid an error.
9366 Use char because int might match the return type of a GCC
9367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009368#ifdef __cplusplus
9369extern "C"
9370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009371char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009372int
9373main ()
9374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ;
9377 return 0;
9378}
9379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009382else
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009385rm -f core conftest.err conftest.$ac_objext \
9386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9390$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009391if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 cat >>confdefs.h <<_ACEOF
9393#define HAVE_LIBDL 1
9394_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009395
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009396 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009397
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009398fi
9399 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9401$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009402if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009403 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009404else
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009406LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410/* Override any GCC internal prototype to avoid an error.
9411 Use char because int might match the return type of a GCC
9412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009413#ifdef __cplusplus
9414extern "C"
9415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009416char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009417int
9418main ()
9419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 ;
9422 return 0;
9423}
9424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009427else
Matthias Kloseb9621712010-04-24 17:59:49 +00009428 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430rm -f core conftest.err conftest.$ac_objext \
9431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009432LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9435$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009436if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 cat >>confdefs.h <<_ACEOF
9438#define HAVE_LIBDLD 1
9439_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009441 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443fi
9444 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009445
Georg Brandlb1441c72009-01-03 22:33:39 +00009446# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009447if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9449$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009452else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009453 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460#ifdef __cplusplus
9461extern "C"
9462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009463char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472for ac_lib in '' pthread rt posix4; do
9473 if test -z "$ac_lib"; then
9474 ac_res="none required"
9475 else
9476 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009477 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009482rm -f core conftest.err conftest.$ac_objext \
9483 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009484 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487done
Victor Stinnere0be4232011-10-25 13:06:09 +02009488if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490else
9491 ac_cv_search_sem_init=no
9492fi
9493rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009494LIBS=$ac_func_search_save_LIBS
9495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9497$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009499if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009501
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009502fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009503 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009504 # posix4 on Solaris 2.6
9505 # pthread (first!) on Linux
9506fi
9507
Martin v. Löwis19d17342003-06-14 21:03:05 +00009508# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9510$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009511if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009513else
9514 ac_check_lib_save_LIBS=$LIBS
9515LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009517/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519/* Override any GCC internal prototype to avoid an error.
9520 Use char because int might match the return type of a GCC
9521 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009522#ifdef __cplusplus
9523extern "C"
9524#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009525char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009526int
9527main ()
9528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009530 ;
9531 return 0;
9532}
9533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009535 ac_cv_lib_intl_textdomain=yes
9536else
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009539rm -f core conftest.err conftest.$ac_objext \
9540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009541LIBS=$ac_check_lib_save_LIBS
9542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9544$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009545if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009546
Matthias Kloseb9621712010-04-24 17:59:49 +00009547$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009548
Brett Cannonc6d936e2009-06-07 20:09:53 +00009549 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009550fi
9551
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009552
9553# checks for system dependent C++ extensions support
9554case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9556$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009558/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009559
Georg Brandl59e87bd2011-02-15 19:48:59 +00009560 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009561int
9562main ()
9563{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009564loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ;
9566 return 0;
9567}
Matthias Kloseb159a552010-04-25 21:00:44 +00009568
Martin v. Löwis11437992002-04-12 09:54:03 +00009569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009571
Matthias Kloseb159a552010-04-25 21:00:44 +00009572
Matthias Kloseb9621712010-04-24 17:59:49 +00009573$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009574
Matthias Kloseb159a552010-04-25 21:00:44 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009576$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009577
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009578else
Matthias Kloseb159a552010-04-25 21:00:44 +00009579
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009581$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009582
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584rm -f core conftest.err conftest.$ac_objext \
9585 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009586 *) ;;
9587esac
9588
Christian Heimes985ecdc2013-11-20 11:46:18 +01009589# check for systems that require aligned memory access
9590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9591$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009592if ${ac_cv_aligned_required+:} false; then :
9593 $as_echo_n "(cached) " >&6
9594else
9595 if test "$cross_compiling" = yes; then :
9596 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009597else
9598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9599/* end confdefs.h. */
9600
9601int main()
9602{
9603 char s[16];
9604 int i, *p1, *p2;
9605 for (i=0; i < 16; i++)
9606 s[i] = i;
9607 p1 = (int*)(s+1);
9608 p2 = (int*)(s+2);
9609 if (*p1 == *p2)
9610 return 1;
9611 return 0;
9612}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009613_ACEOF
9614if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009615 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009616else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009617 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009618fi
9619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9620 conftest.$ac_objext conftest.beam conftest.$ac_ext
9621fi
9622
9623
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009624fi
9625
9626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9627$as_echo "$ac_cv_aligned_required" >&6; }
9628if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009629
9630$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9631
9632fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009633
9634# str, bytes and memoryview hash algorithm
9635
9636
9637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9638$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9639
9640# Check whether --with-hash_algorithm was given.
9641if test "${with_hash_algorithm+set}" = set; then :
9642 withval=$with_hash_algorithm;
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9644$as_echo "$withval" >&6; }
9645case "$withval" in
9646 siphash24)
9647 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9648
9649 ;;
9650 fnv)
9651 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9652
9653 ;;
9654 *)
9655 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9656 ;;
9657esac
9658
9659else
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9661$as_echo "default" >&6; }
9662fi
9663
9664
Charles-François Natalid30b0222014-05-08 23:08:51 +01009665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9666$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9667
9668# Check whether --with-address_sanitizer was given.
9669if test "${with_address_sanitizer+set}" = set; then :
9670 withval=$with_address_sanitizer;
9671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9672$as_echo "$withval" >&6; }
9673BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9674LDFLAGS="-fsanitize=address $LDFLAGS"
9675
9676else
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9678$as_echo "no" >&6; }
9679fi
9680
9681
Guido van Rossum70c7f481998-03-26 18:44:10 +00009682# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9684$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696#ifdef __cplusplus
9697extern "C"
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009710else
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009715LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9718$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009720 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009721fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009722 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9724$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009725if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009727else
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009729LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733/* Override any GCC internal prototype to avoid an error.
9734 Use char because int might match the return type of a GCC
9735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736#ifdef __cplusplus
9737extern "C"
9738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009739char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009740int
9741main ()
9742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009743return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ;
9745 return 0;
9746}
9747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009748if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009750else
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009753rm -f core conftest.err conftest.$ac_objext \
9754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009755LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9758$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009759if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009760 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009761fi
9762 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009763
Matthias Kloseb9621712010-04-24 17:59:49 +00009764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9765$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009768if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9771$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009772LIBS="$withval $LIBS"
9773
9774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777fi
9778
Guido van Rossum7f43da71994-08-01 12:15:30 +00009779
Victor Stinner8291b5e2015-03-20 16:03:14 +01009780
9781
9782
9783
9784
9785
9786
9787if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9788 if test -n "$ac_tool_prefix"; then
9789 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9790set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9792$as_echo_n "checking for $ac_word... " >&6; }
9793if ${ac_cv_path_PKG_CONFIG+:} false; then :
9794 $as_echo_n "(cached) " >&6
9795else
9796 case $PKG_CONFIG in
9797 [\\/]* | ?:[\\/]*)
9798 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9799 ;;
9800 *)
9801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9802for as_dir in $PATH
9803do
9804 IFS=$as_save_IFS
9805 test -z "$as_dir" && as_dir=.
9806 for ac_exec_ext in '' $ac_executable_extensions; do
9807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9808 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9810 break 2
9811 fi
9812done
9813 done
9814IFS=$as_save_IFS
9815
9816 ;;
9817esac
9818fi
9819PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9820if test -n "$PKG_CONFIG"; then
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9822$as_echo "$PKG_CONFIG" >&6; }
9823else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
9826fi
9827
9828
9829fi
9830if test -z "$ac_cv_path_PKG_CONFIG"; then
9831 ac_pt_PKG_CONFIG=$PKG_CONFIG
9832 # Extract the first word of "pkg-config", so it can be a program name with args.
9833set dummy pkg-config; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9837 $as_echo_n "(cached) " >&6
9838else
9839 case $ac_pt_PKG_CONFIG in
9840 [\\/]* | ?:[\\/]*)
9841 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9842 ;;
9843 *)
9844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847 IFS=$as_save_IFS
9848 test -z "$as_dir" && as_dir=.
9849 for ac_exec_ext in '' $ac_executable_extensions; do
9850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853 break 2
9854 fi
9855done
9856 done
9857IFS=$as_save_IFS
9858
9859 ;;
9860esac
9861fi
9862ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9863if test -n "$ac_pt_PKG_CONFIG"; then
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9865$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9866else
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871 if test "x$ac_pt_PKG_CONFIG" = x; then
9872 PKG_CONFIG=""
9873 else
9874 case $cross_compiling:$ac_tool_warned in
9875yes:)
9876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9878ac_tool_warned=yes ;;
9879esac
9880 PKG_CONFIG=$ac_pt_PKG_CONFIG
9881 fi
9882else
9883 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9884fi
9885
9886fi
9887if test -n "$PKG_CONFIG"; then
9888 _pkg_min_version=0.9.0
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9890$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9891 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9893$as_echo "yes" >&6; }
9894 else
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896$as_echo "no" >&6; }
9897 PKG_CONFIG=""
9898 fi
9899fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009900
9901# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9903$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009904
9905# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009906if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009907 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009908else
9909 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009910fi
9911
9912
Matthias Kloseb9621712010-04-24 17:59:49 +00009913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9914$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009915
9916# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9918$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009919
9920# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009921if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009922 withval=$with_system_ffi;
9923fi
9924
9925
Zachary Waref40d4dd2016-09-17 01:25:24 -05009926if test "$ac_sys_system" = "Darwin"
9927then
9928 case "$with_system_ffi" in
9929 "")
9930 with_system_ffi="no"
9931 ;;
9932 yes|no)
9933 ;;
9934 *)
9935 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
9936 ;;
9937 esac
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9939$as_echo "$with_system_ffi" >&6; }
9940else
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9942$as_echo "yes" >&6; }
9943 if test "$with_system_ffi" != ""
9944 then
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
9946$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
9947 fi
9948 with_system_ffi="yes"
9949fi
Zachary Ware935043d2016-09-09 17:01:21 -07009950
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009951if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009952 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9953else
9954 LIBFFI_INCLUDEDIR=""
9955fi
9956
9957
Stefan Krah60187b52012-03-23 19:06:27 +01009958# Check for use of the system libmpdec library
9959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9960$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9961
9962# Check whether --with-system_libmpdec was given.
9963if test "${with_system_libmpdec+set}" = set; then :
9964 withval=$with_system_libmpdec;
9965else
9966 with_system_libmpdec="no"
9967fi
9968
9969
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9971$as_echo "$with_system_libmpdec" >&6; }
9972
Benjamin Peterson076ed002010-10-31 17:11:02 +00009973# Check for support for loadable sqlite extensions
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9975$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9976# Check whether --enable-loadable-sqlite-extensions was given.
9977if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9978 enableval=$enable_loadable_sqlite_extensions;
9979else
9980 enable_loadable_sqlite_extensions="no"
9981fi
9982
9983
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9985$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9986
Ned Deilyd819b932013-09-06 01:07:05 -07009987# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9988
9989
9990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9991$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9992
9993# Check whether --with-tcltk-includes was given.
9994if test "${with_tcltk_includes+set}" = set; then :
9995 withval=$with_tcltk_includes;
9996else
9997 with_tcltk_includes="default"
9998fi
9999
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10001$as_echo "$with_tcltk_includes" >&6; }
10002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10003$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10004
10005# Check whether --with-tcltk-libs was given.
10006if test "${with_tcltk_libs+set}" = set; then :
10007 withval=$with_tcltk_libs;
10008else
10009 with_tcltk_libs="default"
10010fi
10011
10012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10013$as_echo "$with_tcltk_libs" >&6; }
10014if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10015then
10016 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10017 then
10018 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10019 fi
10020 TCLTK_INCLUDES=""
10021 TCLTK_LIBS=""
10022else
10023 TCLTK_INCLUDES="$with_tcltk_includes"
10024 TCLTK_LIBS="$with_tcltk_libs"
10025fi
10026
Matthias Klose55708cc2009-04-30 08:06:49 +000010027# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10029$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010030
10031# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010032if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010033 withval=$with_dbmliborder;
10034if test x$with_dbmliborder = xyes
10035then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010036as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010037else
10038 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10039 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10040 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010041 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010042 fi
10043 done
10044fi
10045fi
10046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10048$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
10052# Templates for things AC_DEFINEd more than once.
10053# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010054
10055
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010056if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010057then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010058 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010060
10061 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010062elif test "$ac_cv_kpthread" = "yes"
10063then
10064 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010065 if test "$ac_cv_cxx_thread" = "yes"; then
10066 CXX="$CXX -Kpthread"
10067 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010068 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010069elif test "$ac_cv_kthread" = "yes"
10070then
10071 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010072 if test "$ac_cv_cxx_thread" = "yes"; then
10073 CXX="$CXX -Kthread"
10074 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010075 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010076elif test "$ac_cv_pthread" = "yes"
10077then
10078 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010079 if test "$ac_cv_cxx_thread" = "yes"; then
10080 CXX="$CXX -pthread"
10081 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010082 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010083else
10084 if test ! -z "$with_threads" -a -d "$with_threads"
10085 then LDFLAGS="$LDFLAGS -L$with_threads"
10086 fi
10087 if test ! -z "$withval" -a -d "$withval"
10088 then LDFLAGS="$LDFLAGS -L$withval"
10089 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010090
10091 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010092 # define _POSIX_THREADS in unistd.h. Some apparently don't
10093 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10095$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010097/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010098
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010099#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010100#ifdef _POSIX_THREADS
10101yes
10102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010103
10104_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010107 unistd_defines_pthreads=yes
10108else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010109 unistd_defines_pthreads=no
10110fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010111rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010112
Matthias Kloseb9621712010-04-24 17:59:49 +000010113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10114$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010115
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010117
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010118 # Just looking for pthread_create in libpthread is not enough:
10119 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10120 # So we really have to include pthread.h, and then link.
10121 _libs=$LIBS
10122 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10124$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010127
10128#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010129#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010130
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010131void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010132int
10133main ()
10134{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010135
10136pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ;
10138 return 0;
10139}
10140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010141if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010142
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10144$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010145 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010146
Guido van Rossum02a1c402000-02-25 19:26:31 +000010147else
Martin v. Löwis11437992002-04-12 09:54:03 +000010148
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010149 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010151if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010152
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010153 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010154
Guido van Rossumad678af1998-10-02 14:42:15 +000010155else
Guido van Rossumad678af1998-10-02 14:42:15 +000010156
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10158$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010159if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010163LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167/* Override any GCC internal prototype to avoid an error.
10168 Use char because int might match the return type of a GCC
10169 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010170#ifdef __cplusplus
10171extern "C"
10172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010173char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010174int
10175main ()
10176{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ;
10179 return 0;
10180}
10181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010182if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010184else
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010187rm -f core conftest.err conftest.$ac_objext \
10188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010189LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10192$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010193if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010194
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010195 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010196 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010197
Greg Steinadf63d62000-07-05 10:38:09 +000010198else
Greg Steinadf63d62000-07-05 10:38:09 +000010199
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10201$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010202if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010204else
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010206LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210/* Override any GCC internal prototype to avoid an error.
10211 Use char because int might match the return type of a GCC
10212 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010213#ifdef __cplusplus
10214extern "C"
10215#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010216char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ;
10222 return 0;
10223}
10224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010225if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010227else
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010230rm -f core conftest.err conftest.$ac_objext \
10231 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010232LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10235$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010236if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010237
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010238 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010239 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010240
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010241else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010242
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10244$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010245if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010247else
Martin v. Löwis11437992002-04-12 09:54:03 +000010248 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010249LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253/* Override any GCC internal prototype to avoid an error.
10254 Use char because int might match the return type of a GCC
10255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010256#ifdef __cplusplus
10257extern "C"
10258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010259char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260int
10261main ()
10262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010263return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 ;
10265 return 0;
10266}
10267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010270else
Matthias Kloseb9621712010-04-24 17:59:49 +000010271 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273rm -f core conftest.err conftest.$ac_objext \
10274 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010275LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10278$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010279if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010280
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010281 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010282 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010283
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010284else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10287$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010288if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010289 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010290else
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010292LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296/* Override any GCC internal prototype to avoid an error.
10297 Use char because int might match the return type of a GCC
10298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010299#ifdef __cplusplus
10300extern "C"
10301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010302char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010303int
10304main ()
10305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010306return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ;
10308 return 0;
10309}
10310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010313else
Matthias Kloseb9621712010-04-24 17:59:49 +000010314 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010316rm -f core conftest.err conftest.$ac_objext \
10317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010318LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10321$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010322if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010324 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010325 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010326
Guido van Rossumb93a8621998-05-07 13:27:32 +000010327else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010328
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010329 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10330
Guido van Rossum2d38f911996-06-26 19:47:01 +000010331fi
10332
Guido van Rossum627b2d71993-12-24 10:39:16 +000010333
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010334fi
10335
Guido van Rossum0be3e491997-05-22 20:33:33 +000010336fi
10337
Guido van Rossum49545951997-12-02 19:28:29 +000010338fi
10339
Guido van Rossumb93a8621998-05-07 13:27:32 +000010340fi
10341
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010343rm -f core conftest.err conftest.$ac_objext \
10344 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010345
Matthias Kloseb9621712010-04-24 17:59:49 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10347$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010348if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010350else
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010352LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010356/* Override any GCC internal prototype to avoid an error.
10357 Use char because int might match the return type of a GCC
10358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010359#ifdef __cplusplus
10360extern "C"
10361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010362char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010363int
10364main ()
10365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010373else
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010376rm -f core conftest.err conftest.$ac_objext \
10377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010378LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10381$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010382if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010383
Martin v. Löwis130fb172001-07-19 11:00:41 +000010384 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010385
Guido van Rossum627b2d71993-12-24 10:39:16 +000010386fi
10387
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010388
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010389fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010390
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010391if test "$posix_threads" = "yes"; then
10392 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010395
10396 fi
10397
10398 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10399 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010400 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010401$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010402
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010403 ;;
10404 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010405$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010406
10407 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010408 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010409$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010410
10411 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010412 esac
10413
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10415$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010416 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010418else
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010420 ac_cv_pthread_system_supported=no
10421else
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010423/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010424
10425 #include <stdio.h>
10426 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010427 void *foo(void *parm) {
10428 return NULL;
10429 }
10430 main() {
10431 pthread_attr_t attr;
10432 pthread_t id;
10433 if (pthread_attr_init(&attr)) exit(-1);
10434 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10435 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10436 exit(0);
10437 }
10438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010440 ac_cv_pthread_system_supported=yes
10441else
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010446fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448
Guido van Rossum627b2d71993-12-24 10:39:16 +000010449fi
10450
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10452$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010453 if test "$ac_cv_pthread_system_supported" = "yes"; then
10454
Matthias Kloseb9621712010-04-24 17:59:49 +000010455$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010456
10457 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 for ac_func in pthread_sigmask
10459do :
10460 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010461if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010462 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010464_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010465 case $ac_sys_system in
10466 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010467
Matthias Kloseb9621712010-04-24 17:59:49 +000010468$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010469
10470 ;;
10471 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010472fi
10473done
10474
Christian Heimesf77b4b22013-08-21 13:26:05 +020010475 for ac_func in pthread_atfork
10476do :
10477 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10478if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10479 cat >>confdefs.h <<_ACEOF
10480#define HAVE_PTHREAD_ATFORK 1
10481_ACEOF
10482
10483fi
10484done
10485
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010486fi
10487
10488
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010489# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010490
Matthias Kloseb9621712010-04-24 17:59:49 +000010491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10492$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010494if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010496 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10498$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010499 ipv6=no
10500 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10502$as_echo "yes" >&6; }
10503 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010504
10505 ipv6=yes
10506 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010508else
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010512 /* AF_INET6 available check */
10513#include <sys/types.h>
10514#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010515int
10516main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010517{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010518int domain = AF_INET6;
10519 ;
10520 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010521}
Martin v. Löwis11437992002-04-12 09:54:03 +000010522_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010523if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010524
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10526$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010527 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010528
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010529else
Matthias Kloseb159a552010-04-25 21:00:44 +000010530
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010534
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010535fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010538if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10540$as_echo_n "checking if RFC2553 API is available... " >&6; }
10541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010542/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010543
10544 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010545#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010546int
10547main ()
10548{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010549struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010550 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ;
10552 return 0;
10553}
Matthias Kloseb159a552010-04-25 21:00:44 +000010554
Martin v. Löwis11437992002-04-12 09:54:03 +000010555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010556if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010557
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010559$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010560 ipv6=yes
10561
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010562else
Matthias Kloseb159a552010-04-25 21:00:44 +000010563
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010565$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010566 ipv6=no
10567
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010570fi
10571
10572if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010574
10575fi
10576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577fi
10578
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010579
10580ipv6type=unknown
10581ipv6lib=none
10582ipv6trylibc=no
10583
10584if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10586$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010587 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10588 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589 case $i in
10590 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010592/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010593
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594#include <netinet/in.h>
10595#ifdef IPV6_INRIA_VERSION
10596yes
10597#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010598_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010601 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010602fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010603rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010604
10605 ;;
10606 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010608/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010609
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010610#include <netinet/in.h>
10611#ifdef __KAME__
10612yes
10613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010614_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617 ipv6type=$i;
10618 ipv6lib=inet6
10619 ipv6libdir=/usr/local/v6/lib
10620 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010621fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010622rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010623
10624 ;;
10625 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010627/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010628
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010629#include <features.h>
10630#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10631yes
10632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010633_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636 ipv6type=$i;
10637 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010639rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640
10641 ;;
10642 linux-inet6)
10643 if test -d /usr/inet6; then
10644 ipv6type=$i
10645 ipv6lib=inet6
10646 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010647 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648 fi
10649 ;;
10650 solaris)
10651 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010652 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010653 ipv6type=$i
10654 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655 fi
10656 fi
10657 ;;
10658 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010660/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010661
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662#include <sys/param.h>
10663#ifdef _TOSHIBA_INET6
10664yes
10665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010666_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669 ipv6type=$i;
10670 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010671 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010672fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010673rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010674
10675 ;;
10676 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010678/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010679
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680#include </usr/local/v6/include/sys/v6config.h>
10681#ifdef __V6D__
10682yes
10683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010684_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687 ipv6type=$i;
10688 ipv6lib=v6;
10689 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010690 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010692rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693
10694 ;;
10695 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010698
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699#include <sys/param.h>
10700#ifdef _ZETA_MINAMI_INET6
10701yes
10702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010703_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706 ipv6type=$i;
10707 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010708 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010709fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010710rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711
10712 ;;
10713 esac
10714 if test "$ipv6type" != "unknown"; then
10715 break
10716 fi
10717 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10719$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720fi
10721
10722if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10723 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10724 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10725 echo "using lib$ipv6lib"
10726 else
10727 if test $ipv6trylibc = "yes"; then
10728 echo "using libc"
10729 else
10730 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10731 echo "You need to fetch lib$ipv6lib.a from appropriate"
10732 echo 'ipv6 kit and compile beforehand.'
10733 exit 1
10734 fi
10735 fi
10736fi
10737
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10739$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10741/* end confdefs.h. */
10742 /* CAN_RAW_FD_FRAMES available check */
10743#include <linux/can/raw.h>
10744int
10745main ()
10746{
10747int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10748 ;
10749 return 0;
10750}
10751_ACEOF
10752if ac_fn_c_try_compile "$LINENO"; then :
10753
10754
10755$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10758$as_echo "yes" >&6; }
10759
10760else
10761
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
10764
10765fi
10766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10767
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010768# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10770$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010773if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774 withval=$with_doc_strings;
10775fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010776
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010777
10778if test -z "$with_doc_strings"
10779then with_doc_strings="yes"
10780fi
10781if test "$with_doc_strings" != "no"
10782then
10783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010785
10786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10788$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010789
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010790# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10792$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010794# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010795if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010796 withval=$with_pymalloc;
10797fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010798
Neil Schemenauera35c6882001-02-27 04:45:05 +000010799
Neil Schemenauer16c22972002-03-22 15:34:49 +000010800if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010801then
10802 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010803fi
10804if test "$with_pymalloc" != "no"
10805then
Martin v. Löwis11437992002-04-12 09:54:03 +000010806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010808
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010809 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10812$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010813
Nick Coghlan6ea41862017-06-11 13:16:15 +100010814# Check for --with-c-locale-coercion
10815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10816$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10817
10818# Check whether --with-c-locale-coercion was given.
10819if test "${with_c_locale_coercion+set}" = set; then :
10820 withval=$with_c_locale_coercion;
10821fi
10822
10823
10824if test -z "$with_c_locale_coercion"
10825then
10826 with_c_locale_coercion="yes"
10827fi
10828if test "$with_c_locale_coercion" != "no"
10829then
10830
10831$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10832
10833fi
10834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10835$as_echo "$with_c_locale_coercion" >&6; }
10836
10837# Check for --with-c-locale-warning
10838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10839$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10840
10841# Check whether --with-c-locale-warning was given.
10842if test "${with_c_locale_warning+set}" = set; then :
10843 withval=$with_c_locale_warning;
10844fi
10845
10846
10847if test -z "$with_c_locale_warning"
10848then
10849 with_c_locale_warning="yes"
10850fi
10851if test "$with_c_locale_warning" != "no"
10852then
10853
10854$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10855
10856fi
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10858$as_echo "$with_c_locale_warning" >&6; }
10859
Benjamin Peterson05159c42009-12-03 03:01:27 +000010860# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10862$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010863
10864# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010865if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010866 withval=$with_valgrind;
10867else
10868 with_valgrind=no
10869fi
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10872$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010873if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 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 +020010875if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010878
10879else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010880 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010881
10882fi
10883
10884
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010885 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010886fi
10887
Łukasz Langaa785c872016-09-09 17:37:37 -070010888# Check for DTrace support
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10890$as_echo_n "checking for --with-dtrace... " >&6; }
10891
10892# Check whether --with-dtrace was given.
10893if test "${with_dtrace+set}" = set; then :
10894 withval=$with_dtrace;
10895else
10896 with_dtrace=no
10897fi
10898
10899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
10900$as_echo "$with_dtrace" >&6; }
10901
10902
10903
10904
10905
10906DTRACE=
10907DFLAGS=
10908DTRACE_HEADERS=
10909DTRACE_OBJS=
10910
10911if test "$with_dtrace" = "yes"
10912then
10913 # Extract the first word of "dtrace", so it can be a program name with args.
10914set dummy dtrace; ac_word=$2
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10916$as_echo_n "checking for $ac_word... " >&6; }
10917if ${ac_cv_path_DTRACE+:} false; then :
10918 $as_echo_n "(cached) " >&6
10919else
10920 case $DTRACE in
10921 [\\/]* | ?:[\\/]*)
10922 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
10923 ;;
10924 *)
10925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10926for as_dir in $PATH
10927do
10928 IFS=$as_save_IFS
10929 test -z "$as_dir" && as_dir=.
10930 for ac_exec_ext in '' $ac_executable_extensions; do
10931 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10932 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
10933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10934 break 2
10935 fi
10936done
10937 done
10938IFS=$as_save_IFS
10939
10940 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
10941 ;;
10942esac
10943fi
10944DTRACE=$ac_cv_path_DTRACE
10945if test -n "$DTRACE"; then
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
10947$as_echo "$DTRACE" >&6; }
10948else
10949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950$as_echo "no" >&6; }
10951fi
10952
10953
10954 if test "$DTRACE" = "not found"; then
10955 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
10956 fi
10957
10958$as_echo "#define WITH_DTRACE 1" >>confdefs.h
10959
10960 DTRACE_HEADERS="Include/pydtrace_probes.h"
10961
10962 # On OS X, DTrace providers do not need to be explicitly compiled and
10963 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
10964 # generation flag '-G'. We check for presence of this flag, rather than
10965 # hardcoding support by OS, in the interest of robustness.
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
10967$as_echo_n "checking whether DTrace probes require linking... " >&6; }
10968if ${ac_cv_dtrace_link+:} false; then :
10969 $as_echo_n "(cached) " >&6
10970else
10971 ac_cv_dtrace_link=no
10972 echo 'BEGIN' > conftest.d
10973 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
10974 ac_cv_dtrace_link=yes
10975
10976fi
10977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
10978$as_echo "$ac_cv_dtrace_link" >&6; }
10979 if test "$ac_cv_dtrace_link" = "yes"; then
10980 DTRACE_OBJS="Python/pydtrace.o"
10981 fi
10982fi
10983
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010984# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010985
Guido van Rossum98935bf2001-09-05 19:13:16 +000010986DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010987
Guido van Rossume97ee181999-12-20 21:27:22 +000010988# the dlopen() function means we might want to use dynload_shlib.o. some
10989# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010990for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010991do :
10992 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010993if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010995#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010996_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010997
Guido van Rossume97ee181999-12-20 21:27:22 +000010998fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010999done
Guido van Rossume97ee181999-12-20 21:27:22 +000011000
Michael W. Hudson54241132001-12-07 15:38:26 +000011001
Guido van Rossume97ee181999-12-20 21:27:22 +000011002# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11003# loading of modules.
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11006$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011007if test -z "$DYNLOADFILE"
11008then
11009 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011010 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11011 if test "$ac_cv_func_dlopen" = yes
11012 then DYNLOADFILE="dynload_shlib.o"
11013 else DYNLOADFILE="dynload_aix.o"
11014 fi
11015 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011016 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011017 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11018 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011019 *)
11020 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11021 # out any dynamic loading
11022 if test "$ac_cv_func_dlopen" = yes
11023 then DYNLOADFILE="dynload_shlib.o"
11024 else DYNLOADFILE="dynload_stub.o"
11025 fi
11026 ;;
11027 esac
11028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11030$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011031if test "$DYNLOADFILE" != "dynload_stub.o"
11032then
Martin v. Löwis11437992002-04-12 09:54:03 +000011033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011035
11036fi
11037
Neil Schemenauer4e425612001-06-19 15:44:15 +000011038# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11039
Michael W. Hudson54241132001-12-07 15:38:26 +000011040
Matthias Kloseb9621712010-04-24 17:59:49 +000011041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11042$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011043if test -z "$MACHDEP_OBJS"
11044then
Jack Jansene578a632001-08-15 01:27:14 +000011045 MACHDEP_OBJS=$extra_machdep_objs
11046else
11047 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011048fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011049if test -z "$MACHDEP_OBJS"; then
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11051$as_echo "none" >&6; }
11052else
11053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11054$as_echo "$MACHDEP_OBJS" >&6; }
11055fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011056
Guido van Rossum627b2d71993-12-24 10:39:16 +000011057# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011058for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011059 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011060 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011061 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011062 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011063 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011064 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011065 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011066 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011067 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011068 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011069 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011070 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011071 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011072 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11073 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011074 sigaction sigaltstack siginterrupt sigpending sigrelse \
11075 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011076 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011077 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011078 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011079do :
11080 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11081ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011082if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011085_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011086
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011087fi
11088done
11089
Michael W. Hudson54241132001-12-07 15:38:26 +000011090
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011091ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11092 #include <dirent.h>
11093"
11094if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11095
11096$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11097
11098fi
11099
11100
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011101# For some functions, having a definition is not sufficient, since
11102# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11104$as_echo_n "checking for chroot... " >&6; }
11105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011107#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011108int
11109main ()
11110{
11111void *x=chroot
11112 ;
11113 return 0;
11114}
11115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011119
Matthias Kloseb159a552010-04-25 21:00:44 +000011120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011122else
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011125
11126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11129$as_echo_n "checking for link... " >&6; }
11130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011131/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011132#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011133int
11134main ()
11135{
11136void *x=link
11137 ;
11138 return 0;
11139}
11140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011142
Matthias Kloseb9621712010-04-24 17:59:49 +000011143$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011144
Matthias Kloseb159a552010-04-25 21:00:44 +000011145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011146$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011147else
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011150
11151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11154$as_echo_n "checking for symlink... " >&6; }
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011156/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011157#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011158int
11159main ()
11160{
11161void *x=symlink
11162 ;
11163 return 0;
11164}
11165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011169
Matthias Kloseb159a552010-04-25 21:00:44 +000011170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172else
Matthias Kloseb9621712010-04-24 17:59:49 +000011173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011175
11176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11179$as_echo_n "checking for fchdir... " >&6; }
11180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011181/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011182#include <unistd.h>
11183int
11184main ()
11185{
11186void *x=fchdir
11187 ;
11188 return 0;
11189}
11190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011194
Matthias Kloseb159a552010-04-25 21:00:44 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011197else
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011200
11201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11204$as_echo_n "checking for fsync... " >&6; }
11205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011207#include <unistd.h>
11208int
11209main ()
11210{
11211void *x=fsync
11212 ;
11213 return 0;
11214}
11215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011219
Matthias Kloseb159a552010-04-25 21:00:44 +000011220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011222else
Matthias Kloseb9621712010-04-24 17:59:49 +000011223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11224$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011225
11226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11229$as_echo_n "checking for fdatasync... " >&6; }
11230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011231/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011232#include <unistd.h>
11233int
11234main ()
11235{
11236void *x=fdatasync
11237 ;
11238 return 0;
11239}
11240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011242
Matthias Kloseb9621712010-04-24 17:59:49 +000011243$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011244
Matthias Kloseb159a552010-04-25 21:00:44 +000011245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011247else
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11249$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011250
11251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11254$as_echo_n "checking for epoll... " >&6; }
11255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011256/* end confdefs.h. */
11257#include <sys/epoll.h>
11258int
11259main ()
11260{
11261void *x=epoll_create
11262 ;
11263 return 0;
11264}
11265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011269
Matthias Kloseb159a552010-04-25 21:00:44 +000011270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011272else
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11274$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011275
11276fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11279$as_echo_n "checking for epoll_create1... " >&6; }
11280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11281/* end confdefs.h. */
11282#include <sys/epoll.h>
11283int
11284main ()
11285{
11286void *x=epoll_create1
11287 ;
11288 return 0;
11289}
11290_ACEOF
11291if ac_fn_c_try_compile "$LINENO"; then :
11292
11293$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11294
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11296$as_echo "yes" >&6; }
11297else
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
11300
11301fi
11302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11304$as_echo_n "checking for kqueue... " >&6; }
11305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011306/* end confdefs.h. */
11307
11308#include <sys/types.h>
11309#include <sys/event.h>
11310
11311int
11312main ()
11313{
11314int x=kqueue()
11315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011322
Matthias Kloseb159a552010-04-25 21:00:44 +000011323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011325else
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011328
11329fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11332$as_echo_n "checking for prlimit... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334/* end confdefs.h. */
11335
11336#include <sys/time.h>
11337#include <sys/resource.h>
11338
11339int
11340main ()
11341{
11342void *x=prlimit
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347if ac_fn_c_try_compile "$LINENO"; then :
11348
11349$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11350
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11352$as_echo "yes" >&6; }
11353else
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
11356
11357fi
11358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11359
Martin v. Löwisd5843682002-11-21 20:41:28 +000011360# On some systems (eg. FreeBSD 5), we would find a definition of the
11361# functions ctermid_r, setgroups in the library, but no prototype
11362# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11363# address to avoid compiler warnings and potential miscompilations
11364# because of the missing prototypes.
11365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11367$as_echo_n "checking for ctermid_r... " >&6; }
11368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011370
Martin v. Löwisd5843682002-11-21 20:41:28 +000011371#include <stdio.h>
11372
Martin v. Löwisd5843682002-11-21 20:41:28 +000011373int
11374main ()
11375{
11376void* p = ctermid_r
11377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011384
Matthias Kloseb159a552010-04-25 21:00:44 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387else
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11389$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390
11391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11393
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11395$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011396if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011397 $as_echo_n "(cached) " >&6
11398else
11399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011401#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011402int
11403main ()
11404{
11405void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011406
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011407 ;
11408 return 0;
11409}
11410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011412 ac_cv_flock_decl=yes
11413else
11414 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011415
11416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011418
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011419fi
11420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11421$as_echo "$ac_cv_flock_decl" >&6; }
11422if test "x${ac_cv_flock_decl}" = xyes; then
11423 for ac_func in flock
11424do :
11425 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011426if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011427 cat >>confdefs.h <<_ACEOF
11428#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011429_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011430
Antoine Pitroua3000072010-09-07 14:52:42 +000011431else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011433$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011434if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011435 $as_echo_n "(cached) " >&6
11436else
11437 ac_check_lib_save_LIBS=$LIBS
11438LIBS="-lbsd $LIBS"
11439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11440/* end confdefs.h. */
11441
11442/* Override any GCC internal prototype to avoid an error.
11443 Use char because int might match the return type of a GCC
11444 builtin and then its argument prototype would still apply. */
11445#ifdef __cplusplus
11446extern "C"
11447#endif
11448char flock ();
11449int
11450main ()
11451{
11452return flock ();
11453 ;
11454 return 0;
11455}
11456_ACEOF
11457if ac_fn_c_try_link "$LINENO"; then :
11458 ac_cv_lib_bsd_flock=yes
11459else
11460 ac_cv_lib_bsd_flock=no
11461fi
11462rm -f core conftest.err conftest.$ac_objext \
11463 conftest$ac_exeext conftest.$ac_ext
11464LIBS=$ac_check_lib_save_LIBS
11465fi
11466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11467$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011468if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011469 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011470
11471
11472$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11473
11474
11475fi
11476
11477
11478fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011479done
11480
Antoine Pitroua3000072010-09-07 14:52:42 +000011481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11484$as_echo_n "checking for getpagesize... " >&6; }
11485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011487
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011488#include <unistd.h>
11489
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011490int
11491main ()
11492{
11493void* p = getpagesize
11494 ;
11495 return 0;
11496}
11497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011498if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011499
Matthias Kloseb9621712010-04-24 17:59:49 +000011500$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011501
Matthias Kloseb159a552010-04-25 21:00:44 +000011502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011503$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011504else
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11506$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011507
11508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011510
Victor Stinner984890f2011-11-24 13:53:38 +010011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11512$as_echo_n "checking for broken unsetenv... " >&6; }
11513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514/* end confdefs.h. */
11515
11516#include <stdlib.h>
11517
11518int
11519main ()
11520{
11521int res = unsetenv("DUMMY")
11522 ;
11523 return 0;
11524}
11525_ACEOF
11526if ac_fn_c_try_compile "$LINENO"; then :
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
11529else
11530
11531$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11532
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11534$as_echo "yes" >&6; }
11535
11536fi
11537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11538
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011539for ac_prog in true
11540do
11541 # Extract the first word of "$ac_prog", so it can be a program name with args.
11542set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11544$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011545if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011547else
11548 if test -n "$TRUE"; then
11549 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11550else
11551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11552for as_dir in $PATH
11553do
11554 IFS=$as_save_IFS
11555 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011558 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 $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 +000011560 break 2
11561 fi
11562done
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011564IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011565
11566fi
11567fi
11568TRUE=$ac_cv_prog_TRUE
11569if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11571$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011572else
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11574$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011575fi
11576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011578 test -n "$TRUE" && break
11579done
11580test -n "$TRUE" || TRUE="/bin/true"
11581
11582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11584$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011585if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011587else
11588 ac_check_lib_save_LIBS=$LIBS
11589LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011591/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011593/* Override any GCC internal prototype to avoid an error.
11594 Use char because int might match the return type of a GCC
11595 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011596#ifdef __cplusplus
11597extern "C"
11598#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011599char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011600int
11601main ()
11602{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011604 ;
11605 return 0;
11606}
11607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011608if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011609 ac_cv_lib_c_inet_aton=yes
11610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011613rm -f core conftest.err conftest.$ac_objext \
11614 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011615LIBS=$ac_check_lib_save_LIBS
11616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11618$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011619if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011620 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011621else
Matthias Kloseb9621712010-04-24 17:59:49 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11623$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011624if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011626else
11627 ac_check_lib_save_LIBS=$LIBS
11628LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011630/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011632/* Override any GCC internal prototype to avoid an error.
11633 Use char because int might match the return type of a GCC
11634 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011635#ifdef __cplusplus
11636extern "C"
11637#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011638char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011639int
11640main ()
11641{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011643 ;
11644 return 0;
11645}
11646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011647if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011648 ac_cv_lib_resolv_inet_aton=yes
11649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011652rm -f core conftest.err conftest.$ac_objext \
11653 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654LIBS=$ac_check_lib_save_LIBS
11655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11657$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011658if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011659 cat >>confdefs.h <<_ACEOF
11660#define HAVE_LIBRESOLV 1
11661_ACEOF
11662
11663 LIBS="-lresolv $LIBS"
11664
11665fi
11666
11667
11668fi
11669
11670
Christian Heimesd0764e22007-12-04 15:00:33 +000011671# On Tru64, chflags seems to be present, but calling it will
11672# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11674$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011675if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011676 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011679 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011682/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011683
Christian Heimesd0764e22007-12-04 15:00:33 +000011684#include <sys/stat.h>
11685#include <unistd.h>
11686int main(int argc, char*argv[])
11687{
11688 if(chflags(argv[0], 0) != 0)
11689 return 1;
11690 return 0;
11691}
Ned Deily3eb67d52011-06-28 00:00:28 -070011692
Christian Heimesd0764e22007-12-04 15:00:33 +000011693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011695 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011701fi
11702
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011703
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11706$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011707if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011709if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011710 ac_cv_have_chflags="yes"
11711else
11712 ac_cv_have_chflags="no"
11713fi
11714
11715fi
11716if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011719
11720fi
11721
Matthias Kloseb9621712010-04-24 17:59:49 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11723$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011724if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011728 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011731/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011732
Christian Heimesd0764e22007-12-04 15:00:33 +000011733#include <sys/stat.h>
11734#include <unistd.h>
11735int main(int argc, char*argv[])
11736{
11737 if(lchflags(argv[0], 0) != 0)
11738 return 1;
11739 return 0;
11740}
Ned Deily3eb67d52011-06-28 00:00:28 -070011741
Christian Heimesd0764e22007-12-04 15:00:33 +000011742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011743if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011744 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011745else
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011750fi
11751
11752
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11755$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011756if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011759 ac_cv_have_lchflags="yes"
11760else
11761 ac_cv_have_lchflags="no"
11762fi
11763
11764fi
11765if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011766
Matthias Kloseb9621712010-04-24 17:59:49 +000011767$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011768
11769fi
11770
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011771case $ac_sys_system/$ac_sys_release in
11772Darwin/*)
11773 _CUR_CFLAGS="${CFLAGS}"
11774 _CUR_LDFLAGS="${LDFLAGS}"
11775 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11776 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11777 ;;
11778esac
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11781$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011782if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011784else
11785 ac_check_lib_save_LIBS=$LIBS
11786LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011788/* end confdefs.h. */
11789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790/* Override any GCC internal prototype to avoid an error.
11791 Use char because int might match the return type of a GCC
11792 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011793#ifdef __cplusplus
11794extern "C"
11795#endif
11796char inflateCopy ();
11797int
11798main ()
11799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011800return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011801 ;
11802 return 0;
11803}
11804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011805if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011806 ac_cv_lib_z_inflateCopy=yes
11807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011810rm -f core conftest.err conftest.$ac_objext \
11811 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011812LIBS=$ac_check_lib_save_LIBS
11813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11815$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011816if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011817
Matthias Kloseb9621712010-04-24 17:59:49 +000011818$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011819
11820fi
11821
11822
11823case $ac_sys_system/$ac_sys_release in
11824Darwin/*)
11825 CFLAGS="${_CUR_CFLAGS}"
11826 LDFLAGS="${_CUR_LDFLAGS}"
11827 ;;
11828esac
11829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11831$as_echo_n "checking for hstrerror... " >&6; }
11832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011833/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011834
Martin v. Löwise9416172003-05-03 10:12:45 +000011835#include <netdb.h>
11836
Martin v. Löwise9416172003-05-03 10:12:45 +000011837int
11838main ()
11839{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011846
Matthias Kloseb9621712010-04-24 17:59:49 +000011847$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011848
Matthias Kloseb159a552010-04-25 21:00:44 +000011849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011854
11855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011856rm -f core conftest.err conftest.$ac_objext \
11857 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11860$as_echo_n "checking for inet_aton... " >&6; }
11861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011862/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011863
Martin v. Löwis86d66262006-02-17 08:40:11 +000011864#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011865#include <sys/socket.h>
11866#include <netinet/in.h>
11867#include <arpa/inet.h>
11868
Martin v. Löwise9416172003-05-03 10:12:45 +000011869int
11870main ()
11871{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011872void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011873 ;
11874 return 0;
11875}
11876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011880
Matthias Kloseb159a552010-04-25 21:00:44 +000011881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11885$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011886
11887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011888rm -f core conftest.err conftest.$ac_objext \
11889 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11892$as_echo_n "checking for inet_pton... " >&6; }
11893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011894/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011895
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011896#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011897#include <sys/socket.h>
11898#include <netinet/in.h>
11899#include <arpa/inet.h>
11900
Martin v. Löwise9416172003-05-03 10:12:45 +000011901int
11902main ()
11903{
11904void* p = inet_pton
11905 ;
11906 return 0;
11907}
11908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011912
Matthias Kloseb159a552010-04-25 21:00:44 +000011913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011915else
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11917$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011918
11919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011921
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011922# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11924$as_echo_n "checking for setgroups... " >&6; }
11925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011926/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011927
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011928#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011929#ifdef HAVE_GRP_H
11930#include <grp.h>
11931#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011932
Martin v. Löwisd5843682002-11-21 20:41:28 +000011933int
11934main ()
11935{
11936void* p = setgroups
11937 ;
11938 return 0;
11939}
11940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011944
Matthias Kloseb159a552010-04-25 21:00:44 +000011945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011946$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011950
11951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011953
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011954# check for openpty and forkpty
11955
11956for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011957do :
11958 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011959if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011960 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011961#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011962_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011963
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011964else
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11966$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011967if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011969else
Martin v. Löwis11437992002-04-12 09:54:03 +000011970 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011971LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975/* Override any GCC internal prototype to avoid an error.
11976 Use char because int might match the return type of a GCC
11977 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011978#ifdef __cplusplus
11979extern "C"
11980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011981char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011982int
11983main ()
11984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011985return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011986 ;
11987 return 0;
11988}
11989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011995rm -f core conftest.err conftest.$ac_objext \
11996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011997LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12000$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012001if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012003 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12006$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012009else
12010 ac_check_lib_save_LIBS=$LIBS
12011LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012013/* end confdefs.h. */
12014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012015/* Override any GCC internal prototype to avoid an error.
12016 Use char because int might match the return type of a GCC
12017 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012018#ifdef __cplusplus
12019extern "C"
12020#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012021char openpty ();
12022int
12023main ()
12024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012025return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012026 ;
12027 return 0;
12028}
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012031 ac_cv_lib_bsd_openpty=yes
12032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012035rm -f core conftest.err conftest.$ac_objext \
12036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012037LIBS=$ac_check_lib_save_LIBS
12038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12040$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012041if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012043 LIBS="$LIBS -lbsd"
12044fi
12045
12046
12047fi
12048
Fred Drake8cef4cf2000-06-28 16:40:38 +000012049
12050fi
12051done
12052
12053for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012054do :
12055 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012056if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012057 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012058#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012059_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012060
Fred Drake8cef4cf2000-06-28 16:40:38 +000012061else
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12063$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012064if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012066else
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012068LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072/* Override any GCC internal prototype to avoid an error.
12073 Use char because int might match the return type of a GCC
12074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012075#ifdef __cplusplus
12076extern "C"
12077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012078char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012079int
12080main ()
12081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 ;
12084 return 0;
12085}
12086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012088 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092rm -f core conftest.err conftest.$ac_objext \
12093 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012094LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12097$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012098if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012100 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12103$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012104if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012106else
12107 ac_check_lib_save_LIBS=$LIBS
12108LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012110/* end confdefs.h. */
12111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112/* Override any GCC internal prototype to avoid an error.
12113 Use char because int might match the return type of a GCC
12114 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012115#ifdef __cplusplus
12116extern "C"
12117#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012118char forkpty ();
12119int
12120main ()
12121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012122return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012123 ;
12124 return 0;
12125}
12126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012128 ac_cv_lib_bsd_forkpty=yes
12129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012134LIBS=$ac_check_lib_save_LIBS
12135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12137$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012138if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012140 LIBS="$LIBS -lbsd"
12141fi
12142
12143
12144fi
12145
Fred Drake8cef4cf2000-06-28 16:40:38 +000012146
12147fi
12148done
12149
Jack Jansendd19cf82001-12-06 22:36:17 +000012150
Michael W. Hudson54241132001-12-07 15:38:26 +000012151# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012152for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012153do :
12154 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12155ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012156if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012158#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012159_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012160
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012162done
12163
Michael W. Hudson54241132001-12-07 15:38:26 +000012164
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012165ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012166if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012167 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012168
Martin v. Löwis1142de32002-03-29 16:28:31 +000012169else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012171 *" dup2.$ac_objext "* ) ;;
12172 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012174esac
12175
Martin v. Löwis1142de32002-03-29 16:28:31 +000012176fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012177
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012178ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012179if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012180 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12181
12182else
12183 case " $LIBOBJS " in
12184 *" strdup.$ac_objext "* ) ;;
12185 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12186 ;;
12187esac
12188
12189fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012190
12191
12192for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012193do :
12194 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012195if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012197#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012200/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012202int
12203main ()
12204{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012205getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 ;
12207 return 0;
12208}
12209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012213
Guido van Rossum627b2d71993-12-24 10:39:16 +000012214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012216
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012218done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012219
Jack Jansen150753c2003-03-29 22:07:47 +000012220for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012221do :
12222 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012223if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012225#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012228/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012229#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012230int
12231main ()
12232{
12233setpgrp(0,0);
12234 ;
12235 return 0;
12236}
12237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012241
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012244
12245fi
12246done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012247
Thomas Wouters3a584202000-08-05 23:28:51 +000012248for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012249do :
12250 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012251if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012253#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012256/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012257#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012258int
12259main ()
12260{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012261gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 ;
12263 return 0;
12264}
12265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_compile "$LINENO"; then :
12267
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268else
Skip Montanaro6dead952003-09-25 14:50:04 +000012269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
Guido van Rossum627b2d71993-12-24 10:39:16 +000012273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012275
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012276fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012277done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278
Michael W. Hudson54241132001-12-07 15:38:26 +000012279
Victor Stinnere0be4232011-10-25 13:06:09 +020012280for ac_func in clock_gettime
12281do :
12282 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12283if test "x$ac_cv_func_clock_gettime" = xyes; then :
12284 cat >>confdefs.h <<_ACEOF
12285#define HAVE_CLOCK_GETTIME 1
12286_ACEOF
12287
12288else
12289
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12291$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12292if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12293 $as_echo_n "(cached) " >&6
12294else
12295 ac_check_lib_save_LIBS=$LIBS
12296LIBS="-lrt $LIBS"
12297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12298/* end confdefs.h. */
12299
12300/* Override any GCC internal prototype to avoid an error.
12301 Use char because int might match the return type of a GCC
12302 builtin and then its argument prototype would still apply. */
12303#ifdef __cplusplus
12304extern "C"
12305#endif
12306char clock_gettime ();
12307int
12308main ()
12309{
12310return clock_gettime ();
12311 ;
12312 return 0;
12313}
12314_ACEOF
12315if ac_fn_c_try_link "$LINENO"; then :
12316 ac_cv_lib_rt_clock_gettime=yes
12317else
12318 ac_cv_lib_rt_clock_gettime=no
12319fi
12320rm -f core conftest.err conftest.$ac_objext \
12321 conftest$ac_exeext conftest.$ac_ext
12322LIBS=$ac_check_lib_save_LIBS
12323fi
12324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12325$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12326if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12327
Victor Stinner7efb8332014-08-29 15:41:08 +020012328 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012329 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12330
12331
12332$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12333
12334
12335fi
12336
12337
12338fi
12339done
12340
12341
12342for ac_func in clock_getres
12343do :
12344 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12345if test "x$ac_cv_func_clock_getres" = xyes; then :
12346 cat >>confdefs.h <<_ACEOF
12347#define HAVE_CLOCK_GETRES 1
12348_ACEOF
12349
12350else
12351
12352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12353$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12354if ${ac_cv_lib_rt_clock_getres+:} false; then :
12355 $as_echo_n "(cached) " >&6
12356else
12357 ac_check_lib_save_LIBS=$LIBS
12358LIBS="-lrt $LIBS"
12359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12360/* end confdefs.h. */
12361
12362/* Override any GCC internal prototype to avoid an error.
12363 Use char because int might match the return type of a GCC
12364 builtin and then its argument prototype would still apply. */
12365#ifdef __cplusplus
12366extern "C"
12367#endif
12368char clock_getres ();
12369int
12370main ()
12371{
12372return clock_getres ();
12373 ;
12374 return 0;
12375}
12376_ACEOF
12377if ac_fn_c_try_link "$LINENO"; then :
12378 ac_cv_lib_rt_clock_getres=yes
12379else
12380 ac_cv_lib_rt_clock_getres=no
12381fi
12382rm -f core conftest.err conftest.$ac_objext \
12383 conftest$ac_exeext conftest.$ac_ext
12384LIBS=$ac_check_lib_save_LIBS
12385fi
12386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12387$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12388if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12389
12390 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12391
12392
12393fi
12394
12395
12396fi
12397done
12398
12399
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012400for ac_func in clock_settime
12401do :
12402 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12403if test "x$ac_cv_func_clock_settime" = xyes; then :
12404 cat >>confdefs.h <<_ACEOF
12405#define HAVE_CLOCK_SETTIME 1
12406_ACEOF
12407
12408else
12409
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12411$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12412if ${ac_cv_lib_rt_clock_settime+:} false; then :
12413 $as_echo_n "(cached) " >&6
12414else
12415 ac_check_lib_save_LIBS=$LIBS
12416LIBS="-lrt $LIBS"
12417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12418/* end confdefs.h. */
12419
12420/* Override any GCC internal prototype to avoid an error.
12421 Use char because int might match the return type of a GCC
12422 builtin and then its argument prototype would still apply. */
12423#ifdef __cplusplus
12424extern "C"
12425#endif
12426char clock_settime ();
12427int
12428main ()
12429{
12430return clock_settime ();
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435if ac_fn_c_try_link "$LINENO"; then :
12436 ac_cv_lib_rt_clock_settime=yes
12437else
12438 ac_cv_lib_rt_clock_settime=no
12439fi
12440rm -f core conftest.err conftest.$ac_objext \
12441 conftest$ac_exeext conftest.$ac_ext
12442LIBS=$ac_check_lib_save_LIBS
12443fi
12444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12445$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12446if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12447
12448 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12449
12450
12451fi
12452
12453
12454fi
12455done
12456
12457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12459$as_echo_n "checking for major... " >&6; }
12460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012462
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012463#if defined(MAJOR_IN_MKDEV)
12464#include <sys/mkdev.h>
12465#elif defined(MAJOR_IN_SYSMACROS)
12466#include <sys/sysmacros.h>
12467#else
12468#include <sys/types.h>
12469#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012470
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012471int
12472main ()
12473{
12474
12475 makedev(major(0),minor(0));
12476
12477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012482
12483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12487$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012488
12489else
Skip Montanaro6dead952003-09-25 14:50:04 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12492$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012493
12494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012495rm -f core conftest.err conftest.$ac_objext \
12496 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012497
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012498# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12499# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12501$as_echo_n "checking for if_nameindex... " >&6; }
12502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12503/* end confdefs.h. */
12504
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012505#include <stdio.h>
12506#ifdef STDC_HEADERS
12507# include <stdlib.h>
12508# include <stddef.h>
12509#else
12510# ifdef HAVE_STDLIB_H
12511# include <stdlib.h>
12512# endif
12513#endif
12514#ifdef HAVE_SYS_SOCKET_H
12515# include <sys/socket.h>
12516#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012517#ifdef HAVE_NET_IF_H
12518# include <net/if.h>
12519#endif
12520
12521int
12522main ()
12523{
12524struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12525 ;
12526 return 0;
12527}
12528_ACEOF
12529if ac_fn_c_try_link "$LINENO"; then :
12530
12531$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12532
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12534$as_echo "yes" >&6; }
12535else
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12537$as_echo "no" >&6; }
12538
12539fi
12540rm -f core conftest.err conftest.$ac_objext \
12541 conftest$ac_exeext conftest.$ac_ext
12542
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012543# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12544# macro is not defined in android-ndk-r13.
12545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12546$as_echo_n "checking for lockf... " >&6; }
12547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548/* end confdefs.h. */
12549#include <unistd.h>
12550int
12551main ()
12552{
12553lockf(0, F_LOCK, 0);
12554 ;
12555 return 0;
12556}
12557_ACEOF
12558if ac_fn_c_try_link "$LINENO"; then :
12559
12560$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12561
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12563$as_echo "yes" >&6; }
12564else
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12566$as_echo "no" >&6; }
12567
12568fi
12569rm -f core conftest.err conftest.$ac_objext \
12570 conftest$ac_exeext conftest.$ac_ext
12571
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012572# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012573# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12575$as_echo_n "checking for getaddrinfo... " >&6; }
12576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012578
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012579#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012580#include <sys/socket.h>
12581#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012582#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583
Martin v. Löwis11437992002-04-12 09:54:03 +000012584int
12585main ()
12586{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012587getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ;
12589 return 0;
12590}
12591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012592if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012593 have_getaddrinfo=yes
12594else
Matthias Kloseb9621712010-04-24 17:59:49 +000012595 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597rm -f core conftest.err conftest.$ac_objext \
12598 conftest$ac_exeext conftest.$ac_ext
12599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12600$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012601if test $have_getaddrinfo = yes
12602then
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12604$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012605 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012609
12610if test "${enable_ipv6+set}" = set; then
12611 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12612else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012613 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012614fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012615else
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012617/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012618
Stefan Krah19c21392012-11-22 23:47:32 +010012619#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012620#include <sys/types.h>
12621#include <netdb.h>
12622#include <string.h>
12623#include <sys/socket.h>
12624#include <netinet/in.h>
12625
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012626int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627{
12628 int passive, gaierr, inet4 = 0, inet6 = 0;
12629 struct addrinfo hints, *ai, *aitop;
12630 char straddr[INET6_ADDRSTRLEN], strport[16];
12631
12632 for (passive = 0; passive <= 1; passive++) {
12633 memset(&hints, 0, sizeof(hints));
12634 hints.ai_family = AF_UNSPEC;
12635 hints.ai_flags = passive ? AI_PASSIVE : 0;
12636 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012637 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12639 (void)gai_strerror(gaierr);
12640 goto bad;
12641 }
12642 for (ai = aitop; ai; ai = ai->ai_next) {
12643 if (ai->ai_addr == NULL ||
12644 ai->ai_addrlen == 0 ||
12645 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12646 straddr, sizeof(straddr), strport, sizeof(strport),
12647 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12648 goto bad;
12649 }
12650 switch (ai->ai_family) {
12651 case AF_INET:
12652 if (strcmp(strport, "54321") != 0) {
12653 goto bad;
12654 }
12655 if (passive) {
12656 if (strcmp(straddr, "0.0.0.0") != 0) {
12657 goto bad;
12658 }
12659 } else {
12660 if (strcmp(straddr, "127.0.0.1") != 0) {
12661 goto bad;
12662 }
12663 }
12664 inet4++;
12665 break;
12666 case AF_INET6:
12667 if (strcmp(strport, "54321") != 0) {
12668 goto bad;
12669 }
12670 if (passive) {
12671 if (strcmp(straddr, "::") != 0) {
12672 goto bad;
12673 }
12674 } else {
12675 if (strcmp(straddr, "::1") != 0) {
12676 goto bad;
12677 }
12678 }
12679 inet6++;
12680 break;
12681 case AF_UNSPEC:
12682 goto bad;
12683 break;
12684 default:
12685 /* another family support? */
12686 break;
12687 }
12688 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012689 freeaddrinfo(aitop);
12690 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012691 }
12692
12693 if (!(inet4 == 0 || inet4 == 2))
12694 goto bad;
12695 if (!(inet6 == 0 || inet6 == 2))
12696 goto bad;
12697
12698 if (aitop)
12699 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012700 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701
12702 bad:
12703 if (aitop)
12704 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012705 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012706}
12707
Martin v. Löwis11437992002-04-12 09:54:03 +000012708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012710 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012711else
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012718fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012719
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12723$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12724
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012725if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012726then
12727 if test $ipv6 = yes
12728 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729 echo 'Fatal: You must get working getaddrinfo() function.'
12730 echo ' or you can specify "--disable-ipv6"'.
12731 exit 1
12732 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012733else
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012736
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012737fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012738
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012739for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012740do :
12741 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012742if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012745_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012746
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012747fi
12748done
12749
Michael W. Hudson54241132001-12-07 15:38:26 +000012750
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12753$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012754if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012756else
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012758/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012759#include <sys/types.h>
12760#include <sys/time.h>
12761#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
Martin v. Löwis11437992002-04-12 09:54:03 +000012763int
12764main ()
12765{
12766if ((struct tm *) 0)
12767return 0;
12768 ;
12769 return 0;
12770}
12771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12780$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012781if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784
12785fi
12786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12788$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012789if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012793/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794#include <sys/types.h>
12795#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012796
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800struct tm tm;
12801 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 ;
12804 return 0;
12805}
12806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012807if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012808 ac_cv_struct_tm=time.h
12809else
Matthias Kloseb9621712010-04-24 17:59:49 +000012810 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12815$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012816if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819
12820fi
12821
Matthias Kloseb9621712010-04-24 17:59:49 +000012822ac_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 +000012823#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825"
Victor Stinnere0be4232011-10-25 13:06:09 +020012826if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
12828cat >>confdefs.h <<_ACEOF
12829#define HAVE_STRUCT_TM_TM_ZONE 1
12830_ACEOF
12831
12832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012838
12839else
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12841"
Victor Stinnere0be4232011-10-25 13:06:09 +020012842if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844else
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846fi
12847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012849#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850_ACEOF
12851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12853$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012854if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012859#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860#if !HAVE_DECL_TZNAME
12861extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012863
Martin v. Löwis11437992002-04-12 09:54:03 +000012864int
12865main ()
12866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ;
12869 return 0;
12870}
12871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873 ac_cv_var_tzname=yes
12874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012877rm -f core conftest.err conftest.$ac_objext \
12878 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12881$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012882 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012885
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012886 fi
12887fi
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889ac_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 +020012890if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012891
12892cat >>confdefs.h <<_ACEOF
12893#define HAVE_STRUCT_STAT_ST_RDEV 1
12894_ACEOF
12895
12896
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012897fi
12898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899ac_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 +020012900if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012901
Martin v. Löwis11437992002-04-12 09:54:03 +000012902cat >>confdefs.h <<_ACEOF
12903#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12904_ACEOF
12905
12906
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012907fi
12908
Matthias Kloseb9621712010-04-24 17:59:49 +000012909ac_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 +020012910if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012911
12912cat >>confdefs.h <<_ACEOF
12913#define HAVE_STRUCT_STAT_ST_FLAGS 1
12914_ACEOF
12915
12916
12917fi
12918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919ac_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 +020012920if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012921
12922cat >>confdefs.h <<_ACEOF
12923#define HAVE_STRUCT_STAT_ST_GEN 1
12924_ACEOF
12925
12926
12927fi
12928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929ac_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 +020012930if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012931
12932cat >>confdefs.h <<_ACEOF
12933#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12934_ACEOF
12935
12936
12937fi
12938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939ac_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 +020012940if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012941
Martin v. Löwis11437992002-04-12 09:54:03 +000012942cat >>confdefs.h <<_ACEOF
12943#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12944_ACEOF
12945
12946
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012947fi
12948
Stefan Krah267b6392016-04-26 01:09:18 +020012949ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12950 #include <sys/types.h>
12951 #include <pwd.h>
12952
12953"
12954if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12955
12956cat >>confdefs.h <<_ACEOF
12957#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12958_ACEOF
12959
12960
12961fi
12962ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12963 #include <sys/types.h>
12964 #include <pwd.h>
12965
12966"
12967if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12968
12969cat >>confdefs.h <<_ACEOF
12970#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12971_ACEOF
12972
12973
12974fi
12975
Zachary Ware6a6967e2016-10-01 00:47:27 -050012976# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
12977ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
12978"
12979if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
12980
12981cat >>confdefs.h <<_ACEOF
12982#define HAVE_SIGINFO_T_SI_BAND 1
12983_ACEOF
12984
12985
12986fi
12987
Michael W. Hudson54241132001-12-07 15:38:26 +000012988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12990$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012991if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993else
Matthias Kloseb159a552010-04-25 21:00:44 +000012994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012996/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012997#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012998int
12999main ()
13000{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013001return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013002 ;
13003 return 0;
13004}
13005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013006if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013007 ac_cv_header_time_altzone=yes
13008else
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013fi
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13016$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013017if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020
13021fi
13022
Guido van Rossumda88dad1995-01-26 00:46:29 +000013023was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13025$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013027/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013028
13029#include <sys/types.h>
13030#include <sys/select.h>
13031#include <sys/time.h>
13032
Martin v. Löwis11437992002-04-12 09:54:03 +000013033int
13034main ()
13035{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013036;
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ;
13038 return 0;
13039}
13040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013042
13043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013045
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013046 was_it_defined=yes
13047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13051$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13054$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013055if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013060#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013061int
13062main ()
13063{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013064struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 ;
13066 return 0;
13067}
13068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013069if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013070 ac_cv_struct_addrinfo=yes
13071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13075fi
13076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13078$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013079if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013082
13083fi
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13086$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013087if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013091/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013092
13093# include <sys/types.h>
13094# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013095int
13096main ()
13097{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013098struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 ;
13100 return 0;
13101}
13102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013104 ac_cv_struct_sockaddr_storage=yes
13105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13109fi
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13112$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013113if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013116
13117fi
13118
Christian Heimesdffa3942016-09-05 23:54:41 +020013119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13120$as_echo_n "checking for sockaddr_alg... " >&6; }
13121if ${ac_cv_struct_sockaddr_alg+:} false; then :
13122 $as_echo_n "(cached) " >&6
13123else
13124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125/* end confdefs.h. */
13126
13127# include <sys/types.h>
13128# include <sys/socket.h>
13129# include <linux/if_alg.h>
13130int
13131main ()
13132{
13133struct sockaddr_alg s
13134 ;
13135 return 0;
13136}
13137_ACEOF
13138if ac_fn_c_try_compile "$LINENO"; then :
13139 ac_cv_struct_sockaddr_alg=yes
13140else
13141 ac_cv_struct_sockaddr_alg=no
13142fi
13143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13144fi
13145
13146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13147$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13148if test $ac_cv_struct_sockaddr_alg = yes; then
13149
13150$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13151
13152fi
13153
Guido van Rossum627b2d71993-12-24 10:39:16 +000013154# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013155
Matthias Kloseb9621712010-04-24 17:59:49 +000013156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13157$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013158if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013160else
Matthias Kloseb9621712010-04-24 17:59:49 +000013161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013163$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013164int
13165main ()
13166{
13167static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013168test_array [0] = 0;
13169return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013170
13171 ;
13172 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013173}
Martin v. Löwis11437992002-04-12 09:54:03 +000013174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013175if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013176 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13183$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013184if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013186
13187fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13190$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013191if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013195/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013196
Martin v. Löwis11437992002-04-12 09:54:03 +000013197int
13198main ()
13199{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013200
Martin v. Löwis11437992002-04-12 09:54:03 +000013201#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013202 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013204 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206 char const *const *pcpcc;
13207 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 /* NEC SVR4.0.2 mips cc rejects this. */
13209 struct point {int x, y;};
13210 static struct point const zero = {0,0};
13211 /* AIX XL C 1.02.0.0 rejects this.
13212 It does not let you subtract one const X* pointer from another in
13213 an arm of an if-expression whose if-part is not a constant
13214 expression */
13215 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218 ++pcpcc;
13219 ppc = (char**) pcpcc;
13220 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013221 { /* SCO 3.2v4 cc rejects this sort of thing. */
13222 char tx;
13223 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013225
Martin v. Löwis11437992002-04-12 09:54:03 +000013226 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 }
13229 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13230 int x[] = {25, 17};
13231 const int *foo = &x[0];
13232 ++foo;
13233 }
13234 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13235 typedef const int *iptr;
13236 iptr p = 0;
13237 ++p;
13238 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013239 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013240 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013241 struct s { int j; const int *ap[3]; } bx;
13242 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 }
13244 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13245 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013247 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013249#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013250
Martin v. Löwis11437992002-04-12 09:54:03 +000013251 ;
13252 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013253}
Martin v. Löwis11437992002-04-12 09:54:03 +000013254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013255if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013256 ac_cv_c_const=yes
13257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13263$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013265
Matthias Kloseb9621712010-04-24 17:59:49 +000013266$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267
13268fi
13269
Michael W. Hudson54241132001-12-07 15:38:26 +000013270
Guido van Rossumda88dad1995-01-26 00:46:29 +000013271works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13273$as_echo_n "checking for working signed char... " >&6; }
13274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013275/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013276
Martin v. Löwis11437992002-04-12 09:54:03 +000013277int
13278main ()
13279{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 ;
13282 return 0;
13283}
13284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013285if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013286 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013287else
Skip Montanaro6dead952003-09-25 14:50:04 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013290
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013291
Guido van Rossum7f43da71994-08-01 12:15:30 +000013292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13295$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013296
Guido van Rossumda88dad1995-01-26 00:46:29 +000013297have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13299$as_echo_n "checking for prototypes... " >&6; }
13300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013301/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013302int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013303int
13304main ()
13305{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013306return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 ;
13308 return 0;
13309}
13310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Matthias Kloseb159a552010-04-25 21:00:44 +000013315 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13319$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320
Guido van Rossumda88dad1995-01-26 00:46:29 +000013321works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13323$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013325/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013326
13327#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013328int foo(int x, ...) {
13329 va_list va;
13330 va_start(va, x);
13331 va_arg(va, int);
13332 va_arg(va, char *);
13333 va_arg(va, double);
13334 return 0;
13335}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337int
13338main ()
13339{
Guido van Rossum90eea071996-08-30 20:58:57 +000013340return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013341 ;
13342 return 0;
13343}
13344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013350 works=yes
13351
Guido van Rossum627b2d71993-12-24 10:39:16 +000013352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13355$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356
Martin v. Löwisd6320502004-08-12 13:45:08 +000013357# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13359$as_echo_n "checking for socketpair... " >&6; }
13360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013361/* end confdefs.h. */
13362
13363#include <sys/types.h>
13364#include <sys/socket.h>
13365
13366int
13367main ()
13368{
13369void *x=socketpair
13370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013377
Matthias Kloseb159a552010-04-25 21:00:44 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13382$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013383
13384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013386
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013387# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13389$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013391/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013392#include <sys/types.h>
13393#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013394int
13395main ()
13396{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013397struct sockaddr x;
13398x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 ;
13400 return 0;
13401}
13402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013403if ac_fn_c_try_compile "$LINENO"; then :
13404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13405$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013408
13409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13411$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013412
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013416# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013420if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13425$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426 OLD_CFLAGS=$CFLAGS
13427 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013430
13431# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433int
13434main ()
13435{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013436
13437 char *name;
13438 struct hostent *he, *res;
13439 char buffer[2048];
13440 int buflen = 2048;
13441 int h_errnop;
13442
13443 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
13445 ;
13446 return 0;
13447}
13448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013452
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13457$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013459else
Skip Montanaro6dead952003-09-25 14:50:04 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13462$as_echo "no" >&6; }
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13464$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013466/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013468# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470int
13471main ()
13472{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013473
13474 char *name;
13475 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013476 char buffer[2048];
13477 int buflen = 2048;
13478 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013479
Matthias Kloseb159a552010-04-25 21:00:44 +000013480 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013481
13482 ;
13483 return 0;
13484}
13485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013489
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
Matthias Kloseb159a552010-04-25 21:00:44 +000013491$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13494$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013496else
Skip Montanaro6dead952003-09-25 14:50:04 +000013497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13499$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13501$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13503/* end confdefs.h. */
13504
13505# include <netdb.h>
13506
13507int
13508main ()
13509{
13510
13511 char *name;
13512 struct hostent *he;
13513 struct hostent_data data;
13514
13515 (void) gethostbyname_r(name, he, &data);
13516
13517 ;
13518 return 0;
13519}
13520_ACEOF
13521if ac_fn_c_try_compile "$LINENO"; then :
13522
13523 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13524
13525
13526$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13527
13528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13529$as_echo "yes" >&6; }
13530
13531else
13532
13533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13534$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013544 CFLAGS=$OLD_CFLAGS
13545
13546else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 for ac_func in gethostbyname
13549do :
13550 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013551if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013553#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013554_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013555
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013556fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013557done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013558
Michael W. Hudson54241132001-12-07 15:38:26 +000013559
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013560fi
13561
Michael W. Hudson54241132001-12-07 15:38:26 +000013562
13563
13564
13565
13566
13567
Guido van Rossum627b2d71993-12-24 10:39:16 +000013568# checks for system services
13569# (none yet)
13570
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013571# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013572ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013573if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013574
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013575else
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13577$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013578if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580else
Martin v. Löwis11437992002-04-12 09:54:03 +000013581 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013582LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586/* Override any GCC internal prototype to avoid an error.
13587 Use char because int might match the return type of a GCC
13588 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013589#ifdef __cplusplus
13590extern "C"
13591#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013592char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013593int
13594main ()
13595{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 ;
13598 return 0;
13599}
13600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013601if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013606rm -f core conftest.err conftest.$ac_objext \
13607 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013608LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13611$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013612if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 cat >>confdefs.h <<_ACEOF
13614#define HAVE_LIBIEEE 1
13615_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013616
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013617 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013618
Guido van Rossum627b2d71993-12-24 10:39:16 +000013619fi
13620
Michael W. Hudson54241132001-12-07 15:38:26 +000013621
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013622fi
13623
Michael W. Hudson54241132001-12-07 15:38:26 +000013624
Guido van Rossum7f253911997-05-09 02:42:48 +000013625# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13627$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013629# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013632if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013633then
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13638$as_echo "yes" >&6; }
13639else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13640$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013641fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13644$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645fi
13646
Guido van Rossum7f253911997-05-09 02:42:48 +000013647
Guido van Rossum7f43da71994-08-01 12:15:30 +000013648# check for --with-libm=...
13649
Guido van Rossum563e7081996-09-10 18:20:48 +000013650case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013651Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013652*) LIBM=-lm
13653esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13655$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013657# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013658if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013660if test "$withval" = no
13661then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13663$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013664elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013665then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13667$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013668else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013669fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013670else
Matthias Kloseb9621712010-04-24 17:59:49 +000013671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13672$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013673fi
13674
Guido van Rossum7f43da71994-08-01 12:15:30 +000013675
13676# check for --with-libc=...
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13679$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013681# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013682if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013683 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013684if test "$withval" = no
13685then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13687$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013688elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013689then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13691$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013692else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013693fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13696$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697fi
13698
Guido van Rossum7f43da71994-08-01 12:15:30 +000013699
Stefan Krah1919b7e2012-03-21 18:25:23 +010013700# **************************************
13701# * Check for gcc x64 inline assembler *
13702# **************************************
13703
13704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13705$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13707/* end confdefs.h. */
13708
13709int
13710main ()
13711{
13712
13713 __asm__ __volatile__ ("movq %rcx, %rax");
13714
13715 ;
13716 return 0;
13717}
13718_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013719if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013720 have_gcc_asm_for_x64=yes
13721else
13722 have_gcc_asm_for_x64=no
13723fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013724rm -f core conftest.err conftest.$ac_objext \
13725 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13727$as_echo "$have_gcc_asm_for_x64" >&6; }
13728if test "$have_gcc_asm_for_x64" = yes
13729then
13730
13731$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13732
13733fi
13734
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013735# **************************************************
13736# * Check for various properties of floating point *
13737# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13740$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013741if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013743else
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746 ac_cv_little_endian_double=no
13747else
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749/* end confdefs.h. */
13750
13751#include <string.h>
13752int main() {
13753 double x = 9006104071832581.0;
13754 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13755 return 0;
13756 else
13757 return 1;
13758}
13759
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013762 ac_cv_little_endian_double=yes
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013768fi
13769
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013770fi
13771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13773$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013774if test "$ac_cv_little_endian_double" = yes
13775then
13776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013778
13779fi
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13782$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013783if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785else
13786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013788 ac_cv_big_endian_double=no
13789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791/* end confdefs.h. */
13792
13793#include <string.h>
13794int main() {
13795 double x = 9006104071832581.0;
13796 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13797 return 0;
13798 else
13799 return 1;
13800}
13801
13802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013803if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804 ac_cv_big_endian_double=yes
13805else
Matthias Kloseb9621712010-04-24 17:59:49 +000013806 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810fi
13811
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812fi
13813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13815$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816if test "$ac_cv_big_endian_double" = yes
13817then
13818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013820
13821fi
13822
13823# Some ARM platforms use a mixed-endian representation for doubles.
13824# While Python doesn't currently have full support for these platforms
13825# (see e.g., issue 1762561), we can at least make sure that float <-> string
13826# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13828$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013829if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831else
13832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834 ac_cv_mixed_endian_double=no
13835else
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013837/* end confdefs.h. */
13838
13839#include <string.h>
13840int main() {
13841 double x = 9006104071832581.0;
13842 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13843 return 0;
13844 else
13845 return 1;
13846}
13847
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013850 ac_cv_mixed_endian_double=yes
13851else
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856fi
13857
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013858fi
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13861$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013862if test "$ac_cv_mixed_endian_double" = yes
13863then
13864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866
13867fi
13868
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013869# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013870# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013871# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013872# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013873# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013874# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013875
13876# This inline assembler syntax may also work for suncc and icc,
13877# so we try it on all platforms.
13878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13880$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882/* end confdefs.h. */
13883
13884int
13885main ()
13886{
13887
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013888 unsigned short cw;
13889 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13890 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013891
13892 ;
13893 return 0;
13894}
13895_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013896if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013897 have_gcc_asm_for_x87=yes
13898else
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013900fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013901rm -f core conftest.err conftest.$ac_objext \
13902 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13904$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013905if test "$have_gcc_asm_for_x87" = yes
13906then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013910fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013911
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13913$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13915/* end confdefs.h. */
13916
13917int
13918main ()
13919{
13920
13921 unsigned int fpcr;
13922 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13923 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13924
13925 ;
13926 return 0;
13927}
13928_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013929if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013930 have_gcc_asm_for_mc68881=yes
13931else
13932 have_gcc_asm_for_mc68881=no
13933fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013934rm -f core conftest.err conftest.$ac_objext \
13935 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13937$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13938if test "$have_gcc_asm_for_mc68881" = yes
13939then
13940
13941$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13942
13943fi
13944
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013945# Detect whether system arithmetic is subject to x87-style double
13946# rounding issues. The result of this test has little meaning on non
13947# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13948# mode is round-to-nearest and double rounding issues are present, and
13949# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13951$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952# $BASECFLAGS may affect the result
13953ac_save_cc="$CC"
13954CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013955if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013956 ac_cv_x87_double_rounding=no
13957else
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013959/* end confdefs.h. */
13960
13961#include <stdlib.h>
13962#include <math.h>
13963int main() {
13964 volatile double x, y, z;
13965 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13966 x = 0.99999999999999989; /* 1-2**-53 */
13967 y = 1./x;
13968 if (y != 1.)
13969 exit(0);
13970 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13971 x = 1e16;
13972 y = 2.99999;
13973 z = x + y;
13974 if (z != 1e16+4.)
13975 exit(0);
13976 /* both tests show evidence of double rounding */
13977 exit(1);
13978}
13979
13980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013981if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013982 ac_cv_x87_double_rounding=no
13983else
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13987 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013988fi
13989
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013990CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13992$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013993if test "$ac_cv_x87_double_rounding" = yes
13994then
13995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013997
13998fi
13999
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000# ************************************
14001# * Check for mathematical functions *
14002# ************************************
14003
14004LIBS_SAVE=$LIBS
14005LIBS="$LIBS $LIBM"
14006
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014007for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14008do :
14009 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14010ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014011if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014012 cat >>confdefs.h <<_ACEOF
14013#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14014_ACEOF
14015
14016fi
14017done
14018
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014019for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014020do :
14021 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14022ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014023if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014024 cat >>confdefs.h <<_ACEOF
14025#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14026_ACEOF
14027
14028fi
14029done
14030
14031ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14032"
Victor Stinnere0be4232011-10-25 13:06:09 +020014033if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014034 ac_have_decl=1
14035else
14036 ac_have_decl=0
14037fi
14038
14039cat >>confdefs.h <<_ACEOF
14040#define HAVE_DECL_ISINF $ac_have_decl
14041_ACEOF
14042ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14043"
Victor Stinnere0be4232011-10-25 13:06:09 +020014044if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014045 ac_have_decl=1
14046else
14047 ac_have_decl=0
14048fi
14049
14050cat >>confdefs.h <<_ACEOF
14051#define HAVE_DECL_ISNAN $ac_have_decl
14052_ACEOF
14053ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14054"
Victor Stinnere0be4232011-10-25 13:06:09 +020014055if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014056 ac_have_decl=1
14057else
14058 ac_have_decl=0
14059fi
14060
14061cat >>confdefs.h <<_ACEOF
14062#define HAVE_DECL_ISFINITE $ac_have_decl
14063_ACEOF
14064
14065
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014066# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14067# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14069$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014070if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014072else
14073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014075 ac_cv_tanh_preserves_zero_sign=no
14076else
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014078/* end confdefs.h. */
14079
14080#include <math.h>
14081#include <stdlib.h>
14082int main() {
14083 /* return 0 if either negative zeros don't exist
14084 on this platform or if negative zeros exist
14085 and tanh(-0.) == -0. */
14086 if (atan2(0., -1.) == atan2(-0., -1.) ||
14087 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14088 else exit(1);
14089}
14090
14091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014092if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014093 ac_cv_tanh_preserves_zero_sign=yes
14094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014099fi
14100
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014101fi
14102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14104$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014105if test "$ac_cv_tanh_preserves_zero_sign" = yes
14106then
14107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014109
14110fi
14111
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014112if test "$ac_cv_func_log1p" = yes
14113then
14114 # On some versions of AIX, log1p(-0.) returns 0. instead of
14115 # -0. See issue #9920.
14116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14117$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014118 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014119 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014120else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014121
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014122 if test "$cross_compiling" = yes; then :
14123 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014124else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14126/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014127
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014128 #include <math.h>
14129 #include <stdlib.h>
14130 int main() {
14131 /* Fail if the signs of log1p(-0.) and -0. can be
14132 distinguished. */
14133 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14134 return 0;
14135 else
14136 return 1;
14137 }
14138
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014139_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014140if ac_fn_c_try_run "$LINENO"; then :
14141 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014142else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014143 ac_cv_log1p_drops_zero_sign=yes
14144fi
14145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014147fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014148
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014149fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014150
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14152$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14153fi
14154if test "$ac_cv_log1p_drops_zero_sign" = yes
14155then
14156
14157$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14158
14159fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014160
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014161LIBS=$LIBS_SAVE
14162
Mark Dickinsona614f042009-11-28 12:48:43 +000014163# For multiprocessing module, check that sem_open
14164# actually works. For FreeBSD versions <= 7.2,
14165# the kernel module that provides POSIX semaphores
14166# isn't loaded by default, so an attempt to call
14167# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14169$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014170if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014172else
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014174 ac_cv_posix_semaphores_enabled=yes
14175else
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014177/* end confdefs.h. */
14178
14179#include <unistd.h>
14180#include <fcntl.h>
14181#include <stdio.h>
14182#include <semaphore.h>
14183#include <sys/stat.h>
14184
14185int main(void) {
14186 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14187 if (a == SEM_FAILED) {
14188 perror("sem_open");
14189 return 1;
14190 }
14191 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014192 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014193 return 0;
14194}
14195
14196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014198 ac_cv_posix_semaphores_enabled=yes
14199else
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14203 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014204fi
14205
14206
Mark Dickinsona614f042009-11-28 12:48:43 +000014207fi
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14210$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014211if test $ac_cv_posix_semaphores_enabled = no
14212then
14213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014215
14216fi
14217
Mark Dickinson10683072009-04-18 21:18:19 +000014218# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14220$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014221if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014223else
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014225 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014226else
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014228/* end confdefs.h. */
14229
14230#include <unistd.h>
14231#include <fcntl.h>
14232#include <stdio.h>
14233#include <semaphore.h>
14234#include <sys/stat.h>
14235
14236int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014237 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014238 int count;
14239 int res;
14240 if(a==SEM_FAILED){
14241 perror("sem_open");
14242 return 1;
14243
14244 }
14245 res = sem_getvalue(a, &count);
14246 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014247 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014248 return res==-1 ? 1 : 0;
14249}
14250
Mark Dickinson10683072009-04-18 21:18:19 +000014251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014252if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014253 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014254else
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14258 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014259fi
14260
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014261
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014262fi
14263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14265$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014266if test $ac_cv_broken_sem_getvalue = yes
14267then
14268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014270
14271fi
14272
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014273ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14274"
14275if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14276 ac_have_decl=1
14277else
14278 ac_have_decl=0
14279fi
14280
14281cat >>confdefs.h <<_ACEOF
14282#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14283_ACEOF
14284ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14285"
14286if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14287 ac_have_decl=1
14288else
14289 ac_have_decl=0
14290fi
14291
14292cat >>confdefs.h <<_ACEOF
14293#define HAVE_DECL_RTLD_NOW $ac_have_decl
14294_ACEOF
14295ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14296"
14297if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14298 ac_have_decl=1
14299else
14300 ac_have_decl=0
14301fi
14302
14303cat >>confdefs.h <<_ACEOF
14304#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14305_ACEOF
14306ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14307"
14308if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14309 ac_have_decl=1
14310else
14311 ac_have_decl=0
14312fi
14313
14314cat >>confdefs.h <<_ACEOF
14315#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14316_ACEOF
14317ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14318"
14319if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14320 ac_have_decl=1
14321else
14322 ac_have_decl=0
14323fi
14324
14325cat >>confdefs.h <<_ACEOF
14326#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14327_ACEOF
14328ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14329"
14330if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14331 ac_have_decl=1
14332else
14333 ac_have_decl=0
14334fi
14335
14336cat >>confdefs.h <<_ACEOF
14337#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14338_ACEOF
14339ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14340"
14341if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14342 ac_have_decl=1
14343else
14344 ac_have_decl=0
14345fi
14346
14347cat >>confdefs.h <<_ACEOF
14348#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14349_ACEOF
14350
14351
Mark Dickinsonbd792642009-03-18 20:06:12 +000014352# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14354$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014355# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014356if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014357 enableval=$enable_big_digits; case $enable_big_digits in
14358yes)
14359 enable_big_digits=30 ;;
14360no)
14361 enable_big_digits=15 ;;
1436215|30)
14363 ;;
14364*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014365 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 +000014366esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14368$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014369
14370cat >>confdefs.h <<_ACEOF
14371#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14372_ACEOF
14373
14374
14375else
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14377$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014378fi
14379
14380
Guido van Rossumef2255b2000-03-10 22:30:29 +000014381# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014382ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014383if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014384
14385
Matthias Kloseb9621712010-04-24 17:59:49 +000014386$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014387
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014388 wchar_h="yes"
14389
Guido van Rossumef2255b2000-03-10 22:30:29 +000014390else
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014392
14393fi
14394
Michael W. Hudson54241132001-12-07 15:38:26 +000014395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014397# determine wchar_t size
14398if test "$wchar_h" = yes
14399then
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14403# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14405$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014406if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014408else
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14410"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 if test "$ac_cv_type_wchar_t" = yes; then
14414 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014416as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014417See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418 else
14419 ac_cv_sizeof_wchar_t=0
14420 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014422
Martin v. Löwis11437992002-04-12 09:54:03 +000014423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14425$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426
14427
14428
Martin v. Löwis11437992002-04-12 09:54:03 +000014429cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014430#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014431_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014432
Michael W. Hudson54241132001-12-07 15:38:26 +000014433
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014434fi
14435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14437$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014438have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014440/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014441
14442#include <tcl.h>
14443#if TCL_UTF_MAX != 6
14444# error "NOT UCS4_TCL"
14445#endif
14446int
14447main ()
14448{
14449
14450 ;
14451 return 0;
14452}
14453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014455
14456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014458
14459 have_ucs4_tcl=yes
14460
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14464$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014465
Skip Montanaro6dead952003-09-25 14:50:04 +000014466# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014467if test "$wchar_h" = yes
14468then
14469 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14471$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014472 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014474else
14475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014477 ac_cv_wchar_t_signed=yes
14478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014480/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014481
14482 #include <wchar.h>
14483 int main()
14484 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014485 /* Success: exit code 0 */
14486 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014487 }
14488
14489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014490if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014491 ac_cv_wchar_t_signed=yes
14492else
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014497fi
14498
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014499fi
14500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14502$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503fi
14504
Georg Brandl52d168a2008-01-07 18:10:24 +000014505# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014506if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014507 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014508then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014509 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
Georg Brandl52d168a2008-01-07 18:10:24 +000014513else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014514 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014515fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14517$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014518
14519# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14521$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014522if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014524else
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 ac_cv_c_bigendian=unknown
14526 # See if we're dealing with a universal compiler.
14527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14528/* end confdefs.h. */
14529#ifndef __APPLE_CC__
14530 not a universal capable compiler
14531 #endif
14532 typedef int dummy;
14533
Skip Montanaro6dead952003-09-25 14:50:04 +000014534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014535if ac_fn_c_try_compile "$LINENO"; then :
14536
14537 # Check for potential -arch flags. It is not universal unless
14538 # there are at least two -arch flags with different values.
14539 ac_arch=
14540 ac_prev=
14541 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14542 if test -n "$ac_prev"; then
14543 case $ac_word in
14544 i?86 | x86_64 | ppc | ppc64)
14545 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14546 ac_arch=$ac_word
14547 else
14548 ac_cv_c_bigendian=universal
14549 break
14550 fi
14551 ;;
14552 esac
14553 ac_prev=
14554 elif test "x$ac_word" = "x-arch"; then
14555 ac_prev=arch
14556 fi
14557 done
14558fi
14559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14560 if test $ac_cv_c_bigendian = unknown; then
14561 # See if sys/param.h defines the BYTE_ORDER macro.
14562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014563/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014564#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014566
Martin v. Löwis11437992002-04-12 09:54:03 +000014567int
14568main ()
14569{
Matthias Kloseb9621712010-04-24 17:59:49 +000014570#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14571 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14572 && LITTLE_ENDIAN)
14573 bogus endian macros
14574 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
14576 ;
14577 return 0;
14578}
14579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014580if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014581 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014583/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014584#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014586
Martin v. Löwis11437992002-04-12 09:54:03 +000014587int
14588main ()
14589{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014590#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 not big endian
14592 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
14594 ;
14595 return 0;
14596}
14597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014598if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014599 ac_cv_c_bigendian=yes
14600else
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014604fi
14605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14606 fi
14607 if test $ac_cv_c_bigendian = unknown; then
14608 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014610/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014611#include <limits.h>
14612
Martin v. Löwis11437992002-04-12 09:54:03 +000014613int
14614main ()
14615{
Matthias Kloseb9621712010-04-24 17:59:49 +000014616#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14617 bogus endian macros
14618 #endif
14619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 ;
14621 return 0;
14622}
14623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014624if ac_fn_c_try_compile "$LINENO"; then :
14625 # It does; now see whether it defined to _BIG_ENDIAN or not.
14626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14627/* end confdefs.h. */
14628#include <limits.h>
14629
14630int
14631main ()
14632{
14633#ifndef _BIG_ENDIAN
14634 not big endian
14635 #endif
14636
14637 ;
14638 return 0;
14639}
14640_ACEOF
14641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014643else
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14647fi
14648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14649 fi
14650 if test $ac_cv_c_bigendian = unknown; then
14651 # Compile a test program.
14652 if test "$cross_compiling" = yes; then :
14653 # Try to guess by grepping values from an object file.
14654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655/* end confdefs.h. */
14656short int ascii_mm[] =
14657 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14658 short int ascii_ii[] =
14659 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14660 int use_ascii (int i) {
14661 return ascii_mm[i] + ascii_ii[i];
14662 }
14663 short int ebcdic_ii[] =
14664 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14665 short int ebcdic_mm[] =
14666 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14667 int use_ebcdic (int i) {
14668 return ebcdic_mm[i] + ebcdic_ii[i];
14669 }
14670 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671
Matthias Kloseb9621712010-04-24 17:59:49 +000014672int
14673main ()
14674{
14675return use_ascii (foo) == use_ebcdic (foo);
14676 ;
14677 return 0;
14678}
14679_ACEOF
14680if ac_fn_c_try_compile "$LINENO"; then :
14681 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14682 ac_cv_c_bigendian=yes
14683 fi
14684 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14685 if test "$ac_cv_c_bigendian" = unknown; then
14686 ac_cv_c_bigendian=no
14687 else
14688 # finding both strings is unlikely to happen, but who knows?
14689 ac_cv_c_bigendian=unknown
14690 fi
14691 fi
14692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014694else
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014696/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014698int
14699main ()
14700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 /* Are we little or big endian? From Harbison&Steele. */
14703 union
14704 {
14705 long int l;
14706 char c[sizeof (long int)];
14707 } u;
14708 u.l = 1;
14709 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710
14711 ;
14712 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014713}
Martin v. Löwis11437992002-04-12 09:54:03 +000014714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014716 ac_cv_c_bigendian=no
14717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14727$as_echo "$ac_cv_c_bigendian" >&6; }
14728 case $ac_cv_c_bigendian in #(
14729 yes)
14730 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14731;; #(
14732 no)
14733 ;; #(
14734 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014737
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 ;; #(
14739 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014740 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014741 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014743
Michael W. Hudson54241132001-12-07 15:38:26 +000014744
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014745# ABI version string for Python extension modules. This appears between the
14746# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14747# from the following attributes which affect the ABI of this Python build (in
14748# this order):
14749#
14750# * The Python implementation (always 'cpython-' for us)
14751# * The major and minor version numbers
14752# * --with-pydebug (adds a 'd')
14753# * --with-pymalloc (adds a 'm')
14754# * --with-wide-unicode (adds a 'u')
14755#
14756# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014757# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14758# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014759
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14761$as_echo_n "checking ABIFLAGS... " >&6; }
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14763$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14765$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014766SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14768$as_echo "$SOABI" >&6; }
14769
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014770
14771case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014772 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014773 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14774 *)
14775 EXT_SUFFIX=${SHLIB_SUFFIX};;
14776esac
14777
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14779$as_echo_n "checking LDVERSION... " >&6; }
14780LDVERSION='$(VERSION)$(ABIFLAGS)'
14781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14782$as_echo "$LDVERSION" >&6; }
14783
doko@python.org87421192013-01-26 11:39:31 +010014784
doko@ubuntu.com55532312016-06-14 08:55:19 +020014785if test x$PLATFORM_TRIPLET = x; then
14786 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14787else
14788 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14789fi
doko@python.org87421192013-01-26 11:39:31 +010014790
14791
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014792# Check whether right shifting a negative integer extends the sign bit
14793# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14795$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014796if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014798else
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014801 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014802else
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014805
14806int main()
14807{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014808 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014809}
14810
Martin v. Löwis11437992002-04-12 09:54:03 +000014811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014812if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014813 ac_cv_rshift_extends_sign=yes
14814else
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014819fi
14820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821fi
14822
Matthias Kloseb9621712010-04-24 17:59:49 +000014823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14824$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014825if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014826then
Martin v. Löwis11437992002-04-12 09:54:03 +000014827
Matthias Kloseb9621712010-04-24 17:59:49 +000014828$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014829
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014830fi
14831
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014832# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14834$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014835if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014837else
Martin v. Löwis11437992002-04-12 09:54:03 +000014838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014840/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014841#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014842int
14843main ()
14844{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014845
14846 FILE *f = fopen("/dev/null", "r");
14847 flockfile(f);
14848 getc_unlocked(f);
14849 funlockfile(f);
14850
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 ;
14852 return 0;
14853}
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014856 ac_cv_have_getc_unlocked=yes
14857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 ac_cv_have_getc_unlocked=no
14859fi
14860rm -f core conftest.err conftest.$ac_objext \
14861 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863
Matthias Kloseb9621712010-04-24 17:59:49 +000014864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14865$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014866if test "$ac_cv_have_getc_unlocked" = yes
14867then
Martin v. Löwis11437992002-04-12 09:54:03 +000014868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014870
14871fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014872
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014873# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014874# save the value of LIBS so we don't actually link Python with readline
14875LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014876
Gregory P. Smith18820942008-09-07 06:24:49 +000014877# On some systems we need to link readline to a termcap compatible
14878# library. NOTE: Keep the precedence of listed libraries synchronised
14879# with setup.py.
14880py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14882$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014883for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014884 if test -z "$py_libtermcap"; then
14885 READLINE_LIBS="-lreadline"
14886 else
14887 READLINE_LIBS="-lreadline -l$py_libtermcap"
14888 fi
14889 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014891/* end confdefs.h. */
14892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893/* Override any GCC internal prototype to avoid an error.
14894 Use char because int might match the return type of a GCC
14895 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014896#ifdef __cplusplus
14897extern "C"
14898#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014899char readline ();
14900int
14901main ()
14902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014904 ;
14905 return 0;
14906}
14907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014908if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014909 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014911rm -f core conftest.err conftest.$ac_objext \
14912 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014913 if test $py_cv_lib_readline = yes; then
14914 break
14915 fi
14916done
14917# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14918#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014919if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14921$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014922else
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14924$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014925
Matthias Kloseb9621712010-04-24 17:59:49 +000014926$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014927
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014928fi
14929
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014930# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014932/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014933#include <readline/readline.h>
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014936 have_readline=yes
14937else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014938 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014939
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014940fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014941rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014942if test $have_readline = yes
14943then
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014946#include <readline/readline.h>
14947
14948_ACEOF
14949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014951
Matthias Kloseb9621712010-04-24 17:59:49 +000014952$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014953
14954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014955rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014958/* end confdefs.h. */
14959#include <readline/readline.h>
14960
14961_ACEOF
14962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014966
14967fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014968rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014969
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014970fi
14971
Martin v. Löwis0daad592001-09-30 21:09:59 +000014972# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14974$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014975if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014977else
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014979LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983/* Override any GCC internal prototype to avoid an error.
14984 Use char because int might match the return type of a GCC
14985 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014986#ifdef __cplusplus
14987extern "C"
14988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014989char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014990int
14991main ()
14992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 ;
14995 return 0;
14996}
14997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015000else
Matthias Kloseb9621712010-04-24 17:59:49 +000015001 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015003rm -f core conftest.err conftest.$ac_objext \
15004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015005LIBS=$ac_check_lib_save_LIBS
15006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15008$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015009if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015012
Martin v. Löwis0daad592001-09-30 21:09:59 +000015013fi
15014
Michael W. Hudson54241132001-12-07 15:38:26 +000015015
Thomas Wouters89d996e2007-09-08 17:39:28 +000015016# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15018$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015019if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015021else
15022 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015023LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015025/* end confdefs.h. */
15026
15027/* Override any GCC internal prototype to avoid an error.
15028 Use char because int might match the return type of a GCC
15029 builtin and then its argument prototype would still apply. */
15030#ifdef __cplusplus
15031extern "C"
15032#endif
15033char rl_completion_display_matches_hook ();
15034int
15035main ()
15036{
15037return rl_completion_display_matches_hook ();
15038 ;
15039 return 0;
15040}
15041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015042if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015043 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047rm -f core conftest.err conftest.$ac_objext \
15048 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015049LIBS=$ac_check_lib_save_LIBS
15050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15052$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015053if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015054
Matthias Kloseb9621712010-04-24 17:59:49 +000015055$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015056
15057fi
15058
15059
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015060# also in 4.0, but not in editline
15061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15062$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15063if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15064 $as_echo_n "(cached) " >&6
15065else
15066 ac_check_lib_save_LIBS=$LIBS
15067LIBS="-lreadline $READLINE_LIBS $LIBS"
15068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15069/* end confdefs.h. */
15070
15071/* Override any GCC internal prototype to avoid an error.
15072 Use char because int might match the return type of a GCC
15073 builtin and then its argument prototype would still apply. */
15074#ifdef __cplusplus
15075extern "C"
15076#endif
15077char rl_resize_terminal ();
15078int
15079main ()
15080{
15081return rl_resize_terminal ();
15082 ;
15083 return 0;
15084}
15085_ACEOF
15086if ac_fn_c_try_link "$LINENO"; then :
15087 ac_cv_lib_readline_rl_resize_terminal=yes
15088else
15089 ac_cv_lib_readline_rl_resize_terminal=no
15090fi
15091rm -f core conftest.err conftest.$ac_objext \
15092 conftest$ac_exeext conftest.$ac_ext
15093LIBS=$ac_check_lib_save_LIBS
15094fi
15095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15096$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15097if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15098
15099$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15100
15101fi
15102
15103
Martin v. Löwis0daad592001-09-30 21:09:59 +000015104# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15106$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015107if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015109else
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015111LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115/* Override any GCC internal prototype to avoid an error.
15116 Use char because int might match the return type of a GCC
15117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015118#ifdef __cplusplus
15119extern "C"
15120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015121char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015122int
15123main ()
15124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 ;
15127 return 0;
15128}
15129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015132else
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015135rm -f core conftest.err conftest.$ac_objext \
15136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015137LIBS=$ac_check_lib_save_LIBS
15138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15140$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015141if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015144
Guido van Rossum353ae582001-07-10 16:45:32 +000015145fi
15146
Jack Jansendd19cf82001-12-06 22:36:17 +000015147
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015148# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015150/* end confdefs.h. */
15151#include <readline/readline.h>
15152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015153if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015154 have_readline=yes
15155else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015156 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015157
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015158fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015159rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015160if test $have_readline = yes
15161then
Matthias Kloseb9621712010-04-24 17:59:49 +000015162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163/* end confdefs.h. */
15164#include <readline/readline.h>
15165
15166_ACEOF
15167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171
15172fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015173rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015174
15175fi
15176
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15178$as_echo_n "checking for append_history in -lreadline... " >&6; }
15179if ${ac_cv_lib_readline_append_history+:} false; then :
15180 $as_echo_n "(cached) " >&6
15181else
15182 ac_check_lib_save_LIBS=$LIBS
15183LIBS="-lreadline $READLINE_LIBS $LIBS"
15184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15185/* end confdefs.h. */
15186
15187/* Override any GCC internal prototype to avoid an error.
15188 Use char because int might match the return type of a GCC
15189 builtin and then its argument prototype would still apply. */
15190#ifdef __cplusplus
15191extern "C"
15192#endif
15193char append_history ();
15194int
15195main ()
15196{
15197return append_history ();
15198 ;
15199 return 0;
15200}
15201_ACEOF
15202if ac_fn_c_try_link "$LINENO"; then :
15203 ac_cv_lib_readline_append_history=yes
15204else
15205 ac_cv_lib_readline_append_history=no
15206fi
15207rm -f core conftest.err conftest.$ac_objext \
15208 conftest$ac_exeext conftest.$ac_ext
15209LIBS=$ac_check_lib_save_LIBS
15210fi
15211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15212$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15213if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15214
15215$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15216
15217fi
15218
15219
Martin v. Löwis82bca632006-02-10 20:49:30 +000015220# End of readline checks: restore LIBS
15221LIBS=$LIBS_no_readline
15222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15224$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015225if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015227else
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Matthias Kloseb9621712010-04-24 17:59:49 +000015229if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015230 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015231else
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015233/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015234
15235int main()
15236{
15237 int val1 = nice(1);
15238 if (val1 != -1 && val1 == nice(2))
15239 exit(0);
15240 exit(1);
15241}
15242
Martin v. Löwis11437992002-04-12 09:54:03 +000015243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015244if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015245 ac_cv_broken_nice=yes
15246else
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15250 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015251fi
15252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253fi
15254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15256$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015257if test "$ac_cv_broken_nice" = yes
15258then
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Matthias Kloseb9621712010-04-24 17:59:49 +000015260$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015261
15262fi
15263
Matthias Kloseb9621712010-04-24 17:59:49 +000015264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15265$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015266if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015268else
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015270 ac_cv_broken_poll=no
15271else
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015273/* end confdefs.h. */
15274
15275#include <poll.h>
15276
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015277int main()
15278{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015279 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015280 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015281
15282 close (42);
15283
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015284 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015285 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015286 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015287 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015288 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015289 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015290 return 1;
15291}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015292
15293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015294if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015295 ac_cv_broken_poll=yes
15296else
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15300 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015303fi
15304
Matthias Kloseb9621712010-04-24 17:59:49 +000015305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15306$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015307if test "$ac_cv_broken_poll" = yes
15308then
15309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015311
15312fi
15313
Brett Cannon43802422005-02-10 20:48:03 +000015314# 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 +000015315# (which is not required by ISO C or UNIX spec) and/or if we support
15316# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015317ac_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 +000015318#include <$ac_cv_struct_tm>
15319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320"
Victor Stinnere0be4232011-10-25 13:06:09 +020015321if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015322
15323cat >>confdefs.h <<_ACEOF
15324#define HAVE_STRUCT_TM_TM_ZONE 1
15325_ACEOF
15326
15327
15328fi
15329
15330if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15331
Matthias Kloseb9621712010-04-24 17:59:49 +000015332$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015333
15334else
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15336"
Victor Stinnere0be4232011-10-25 13:06:09 +020015337if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015338 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339else
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015341fi
15342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015344#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345_ACEOF
15346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15348$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015349if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015353/* end confdefs.h. */
15354#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355#if !HAVE_DECL_TZNAME
15356extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015357#endif
15358
15359int
15360main ()
15361{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015363 ;
15364 return 0;
15365}
15366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015367if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015368 ac_cv_var_tzname=yes
15369else
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015372rm -f core conftest.err conftest.$ac_objext \
15373 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15376$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015377 if test $ac_cv_var_tzname = yes; then
15378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015380
15381 fi
15382fi
15383
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015384
Martin v. Löwis1d459062005-03-14 21:23:33 +000015385# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15387$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015388if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015390else
15391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015393 ac_cv_working_tzset=no
15394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015396/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015397
15398#include <stdlib.h>
15399#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015400#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015401
15402#if HAVE_TZNAME
15403extern char *tzname[];
15404#endif
15405
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015406int main()
15407{
Brett Cannon18367812003-09-19 00:59:16 +000015408 /* Note that we need to ensure that not only does tzset(3)
15409 do 'something' with localtime, but it works as documented
15410 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015411 This includes making sure that tzname is set properly if
15412 tm->tm_zone does not exist since it is the alternative way
15413 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015414
15415 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015416 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015417 */
15418
Martin v. Löwis1d459062005-03-14 21:23:33 +000015419 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015420 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15421
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015422 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015423 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015424 if (localtime(&groundhogday)->tm_hour != 0)
15425 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015426#if HAVE_TZNAME
15427 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15428 if (strcmp(tzname[0], "UTC") ||
15429 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15430 exit(1);
15431#endif
Brett Cannon18367812003-09-19 00:59:16 +000015432
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015433 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015434 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015435 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015436 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015437#if HAVE_TZNAME
15438 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15439 exit(1);
15440#endif
Brett Cannon18367812003-09-19 00:59:16 +000015441
15442 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15443 tzset();
15444 if (localtime(&groundhogday)->tm_hour != 11)
15445 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015446#if HAVE_TZNAME
15447 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15448 exit(1);
15449#endif
15450
15451#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015452 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15453 exit(1);
15454 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15455 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015456#endif
Brett Cannon18367812003-09-19 00:59:16 +000015457
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015458 exit(0);
15459}
15460
15461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015462if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015463 ac_cv_working_tzset=yes
15464else
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15468 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015469fi
15470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015471fi
15472
Matthias Kloseb9621712010-04-24 17:59:49 +000015473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15474$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015475if test "$ac_cv_working_tzset" = yes
15476then
15477
Matthias Kloseb9621712010-04-24 17:59:49 +000015478$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015479
15480fi
15481
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015482# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15484$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015485if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015486 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015487else
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015489/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015490#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015491int
15492main ()
15493{
15494
15495struct stat st;
15496st.st_mtim.tv_nsec = 1;
15497
15498 ;
15499 return 0;
15500}
15501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015503 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15508fi
15509
Matthias Kloseb9621712010-04-24 17:59:49 +000015510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15511$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015512if test "$ac_cv_stat_tv_nsec" = yes
15513then
15514
Matthias Kloseb9621712010-04-24 17:59:49 +000015515$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015516
15517fi
15518
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015519# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15521$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015522if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015523 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015524else
Matthias Kloseb9621712010-04-24 17:59:49 +000015525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015526/* end confdefs.h. */
15527#include <sys/stat.h>
15528int
15529main ()
15530{
15531
15532struct stat st;
15533st.st_mtimespec.tv_nsec = 1;
15534
15535 ;
15536 return 0;
15537}
15538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015540 ac_cv_stat_tv_nsec2=yes
15541else
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15545fi
15546
Matthias Kloseb9621712010-04-24 17:59:49 +000015547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15548$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015549if test "$ac_cv_stat_tv_nsec2" = yes
15550then
15551
Matthias Kloseb9621712010-04-24 17:59:49 +000015552$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015553
15554fi
15555
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015556# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015557ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015558if test "$cross_compiling" = no; then
15559 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15560fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015561
15562for ac_header in curses.h ncurses.h
15563do :
15564 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15565ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15566if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15567 cat >>confdefs.h <<_ACEOF
15568#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15569_ACEOF
15570
15571fi
15572
15573done
15574
15575
15576# On Solaris, term.h requires curses.h
15577for ac_header in term.h
15578do :
15579 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15580#ifdef HAVE_CURSES_H
15581#include <curses.h>
15582#endif
15583
15584"
15585if test "x$ac_cv_header_term_h" = xyes; then :
15586 cat >>confdefs.h <<_ACEOF
15587#define HAVE_TERM_H 1
15588_ACEOF
15589
15590fi
15591
15592done
15593
15594
Jack Jansen666b1e72001-10-31 12:11:48 +000015595# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15597$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015598if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015600else
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015602/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015603#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015604int
15605main ()
15606{
Jack Jansen666b1e72001-10-31 12:11:48 +000015607
15608 int rtn;
15609 rtn = mvwdelch(0,0,0);
15610
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 ;
15612 return 0;
15613}
15614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015615if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015616 ac_cv_mvwdelch_is_expression=yes
15617else
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15621fi
15622
Matthias Kloseb9621712010-04-24 17:59:49 +000015623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15624$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015625
15626if test "$ac_cv_mvwdelch_is_expression" = yes
15627then
Martin v. Löwis11437992002-04-12 09:54:03 +000015628
Matthias Kloseb9621712010-04-24 17:59:49 +000015629$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015630
15631fi
15632
Matthias Kloseb9621712010-04-24 17:59:49 +000015633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15634$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015635if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015637else
Matthias Kloseb9621712010-04-24 17:59:49 +000015638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015639/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015640#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015641int
15642main ()
15643{
Jack Jansen666b1e72001-10-31 12:11:48 +000015644
15645 WINDOW *w;
15646 w->_flags = 0;
15647
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 ;
15649 return 0;
15650}
15651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015652if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015653 ac_cv_window_has_flags=yes
15654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15658fi
15659
Matthias Kloseb9621712010-04-24 17:59:49 +000015660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15661$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015662
Jack Jansen666b1e72001-10-31 12:11:48 +000015663
15664if test "$ac_cv_window_has_flags" = yes
15665then
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
Matthias Kloseb9621712010-04-24 17:59:49 +000015667$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015668
15669fi
15670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15672$as_echo_n "checking for is_term_resized... " >&6; }
15673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015674/* end confdefs.h. */
15675#include <curses.h>
15676int
15677main ()
15678{
15679void *x=is_term_resized
15680 ;
15681 return 0;
15682}
15683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015687
Matthias Kloseb159a552010-04-25 21:00:44 +000015688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015689$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15692$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015693
15694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15698$as_echo_n "checking for resize_term... " >&6; }
15699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015700/* end confdefs.h. */
15701#include <curses.h>
15702int
15703main ()
15704{
15705void *x=resize_term
15706 ;
15707 return 0;
15708}
15709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015710if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015711
Matthias Kloseb9621712010-04-24 17:59:49 +000015712$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015713
Matthias Kloseb159a552010-04-25 21:00:44 +000015714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015715$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015716else
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15718$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015719
15720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15724$as_echo_n "checking for resizeterm... " >&6; }
15725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015726/* end confdefs.h. */
15727#include <curses.h>
15728int
15729main ()
15730{
15731void *x=resizeterm
15732 ;
15733 return 0;
15734}
15735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015736if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015737
Matthias Kloseb9621712010-04-24 17:59:49 +000015738$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015739
Matthias Kloseb159a552010-04-25 21:00:44 +000015740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015741$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015742else
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15744$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015745
15746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015748# last curses configure check
15749CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15752$as_echo "$as_me: checking for device files" >&6;}
15753
15754if test "x$cross_compiling" = xyes; then
15755 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15757$as_echo_n "checking for /dev/ptmx... " >&6; }
15758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15759$as_echo "not set" >&6; }
15760 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15761 fi
15762 if test "${ac_cv_file__dev_ptc+set}" != set; then
15763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15764$as_echo_n "checking for /dev/ptc... " >&6; }
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15766$as_echo "not set" >&6; }
15767 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15768 fi
15769fi
15770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15772$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015773if ${ac_cv_file__dev_ptmx+:} false; then :
15774 $as_echo_n "(cached) " >&6
15775else
15776 test "$cross_compiling" = yes &&
15777 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15778if test -r "/dev/ptmx"; then
15779 ac_cv_file__dev_ptmx=yes
15780else
15781 ac_cv_file__dev_ptmx=no
15782fi
15783fi
15784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15785$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15786if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015787
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015788fi
15789
15790if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015791
Matthias Kloseb9621712010-04-24 17:59:49 +000015792$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015793
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15796$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015797if ${ac_cv_file__dev_ptc+:} false; then :
15798 $as_echo_n "(cached) " >&6
15799else
15800 test "$cross_compiling" = yes &&
15801 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15802if test -r "/dev/ptc"; then
15803 ac_cv_file__dev_ptc=yes
15804else
15805 ac_cv_file__dev_ptc=no
15806fi
15807fi
15808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15809$as_echo "$ac_cv_file__dev_ptc" >&6; }
15810if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015811
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015812fi
15813
15814if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015815
Matthias Kloseb9621712010-04-24 17:59:49 +000015816$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015817
Neal Norwitz865400f2003-03-21 01:42:58 +000015818fi
15819
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015820if test $ac_sys_system = Darwin
15821then
15822 LIBS="$LIBS -framework CoreFoundation"
15823fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15826$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015827if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015829else
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015831 ac_cv_have_size_t_format="cross -- assuming yes"
15832
Thomas Wouters477c8d52006-05-27 19:21:47 +000015833else
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015835/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015836
Thomas Wouters477c8d52006-05-27 19:21:47 +000015837#include <stdio.h>
15838#include <stddef.h>
15839#include <string.h>
15840
Christian Heimes2c181612007-12-17 20:04:13 +000015841#ifdef HAVE_SYS_TYPES_H
15842#include <sys/types.h>
15843#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015844
15845#ifdef HAVE_SSIZE_T
15846typedef ssize_t Py_ssize_t;
15847#elif SIZEOF_VOID_P == SIZEOF_LONG
15848typedef long Py_ssize_t;
15849#else
15850typedef int Py_ssize_t;
15851#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015852
Christian Heimes2c181612007-12-17 20:04:13 +000015853int main()
15854{
15855 char buffer[256];
15856
Thomas Wouters477c8d52006-05-27 19:21:47 +000015857 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15858 return 1;
15859
Thomas Wouters89f507f2006-12-13 04:49:30 +000015860 if (strcmp(buffer, "123"))
15861 return 1;
15862
15863 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15864 return 1;
15865
15866 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015867 return 1;
15868
15869 return 0;
15870}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015871
Thomas Wouters477c8d52006-05-27 19:21:47 +000015872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015873if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015874 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015875else
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015880fi
15881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15884$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015885if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015886
Matthias Kloseb9621712010-04-24 17:59:49 +000015887$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015888
15889fi
15890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015892#ifdef HAVE_SYS_TYPES_H
15893#include <sys/types.h>
15894#endif
15895#ifdef HAVE_SYS_SOCKET_H
15896#include <sys/socket.h>
15897#endif
15898
Matthias Kloseb9621712010-04-24 17:59:49 +000015899"
Victor Stinnere0be4232011-10-25 13:06:09 +020015900if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015905
15906fi
15907
Michael W. Hudson54241132001-12-07 15:38:26 +000015908
Matthias Kloseb9621712010-04-24 17:59:49 +000015909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15910$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015911if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015913else
Matthias Kloseb9621712010-04-24 17:59:49 +000015914 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015915 ac_cv_broken_mbstowcs=no
15916else
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015918/* end confdefs.h. */
15919
Stefan Krah19c21392012-11-22 23:47:32 +010015920#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015921#include<stdlib.h>
15922int main() {
15923 size_t len = -1;
15924 const char *str = "text";
15925 len = mbstowcs(NULL, str, 0);
15926 return (len != 4);
15927}
15928
15929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015930if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015931 ac_cv_broken_mbstowcs=no
15932else
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015937fi
15938
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015939fi
15940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15942$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015943if test "$ac_cv_broken_mbstowcs" = yes
15944then
15945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015947
15948fi
15949
Antoine Pitroub52ec782009-01-25 16:34:23 +000015950# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15952$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015953
15954# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015955if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015956 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015957if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015958then
15959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015961
Matthias Kloseb9621712010-04-24 17:59:49 +000015962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15963$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015964fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015965if test "$withval" = no
15966then
15967
15968$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15971$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015972fi
15973
Antoine Pitrou042b1282010-08-13 21:15:58 +000015974else
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15976$as_echo "no value specified" >&6; }
15977fi
15978
Antoine Pitroub52ec782009-01-25 16:34:23 +000015979
Matthias Kloseb17289e2012-03-15 19:51:34 +010015980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15981$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15982if ${ac_cv_computed_gotos+:} false; then :
15983 $as_echo_n "(cached) " >&6
15984else
15985 if test "$cross_compiling" = yes; then :
15986 if test "${with_computed_gotos+set}" = set; then
15987 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15988 else
15989 ac_cv_computed_gotos=no
15990 fi
15991else
15992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15993/* end confdefs.h. */
15994
15995int main(int argc, char **argv)
15996{
15997 static void *targets[1] = { &&LABEL1 };
15998 goto LABEL2;
15999LABEL1:
16000 return 0;
16001LABEL2:
16002 goto *targets[0];
16003 return 1;
16004}
16005
16006_ACEOF
16007if ac_fn_c_try_run "$LINENO"; then :
16008 ac_cv_computed_gotos=yes
16009else
16010 ac_cv_computed_gotos=no
16011fi
16012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16013 conftest.$ac_objext conftest.beam conftest.$ac_ext
16014fi
16015
16016fi
16017
16018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16019$as_echo "$ac_cv_computed_gotos" >&6; }
16020case "$ac_cv_computed_gotos" in yes*)
16021
16022$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16023
16024esac
16025
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016026case $ac_sys_system in
16027AIX*)
16028
16029$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16030 ;;
16031esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016032
Michael W. Hudson54241132001-12-07 15:38:26 +000016033
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016034
16035
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016036for h in `(cd $srcdir;echo Python/thread_*.h)`
16037do
16038 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16039done
16040
Michael W. Hudson54241132001-12-07 15:38:26 +000016041
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016042SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16044$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016045for dir in $SRCDIRS; do
16046 if test ! -d $dir; then
16047 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016048 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016049done
Matthias Kloseb9621712010-04-24 17:59:49 +000016050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16051$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016052
Stefan Krah1919b7e2012-03-21 18:25:23 +010016053# Availability of -O2:
16054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16055$as_echo_n "checking for -O2... " >&6; }
16056saved_cflags="$CFLAGS"
16057CFLAGS="-O2"
16058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16059/* end confdefs.h. */
16060
16061int
16062main ()
16063{
16064
16065
16066 ;
16067 return 0;
16068}
16069_ACEOF
16070if ac_fn_c_try_compile "$LINENO"; then :
16071 have_O2=yes
16072else
16073 have_O2=no
16074fi
16075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16077$as_echo "$have_O2" >&6; }
16078CFLAGS="$saved_cflags"
16079
16080# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16081# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16083$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16084saved_cflags="$CFLAGS"
16085CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16086if test "$have_O2" = no; then
16087 CFLAGS=""
16088fi
16089if test "$cross_compiling" = yes; then :
16090 have_glibc_memmove_bug=undefined
16091else
16092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093/* end confdefs.h. */
16094
16095#include <stdio.h>
16096#include <stdlib.h>
16097#include <string.h>
16098void foo(void *p, void *q) { memmove(p, q, 19); }
16099int main() {
16100 char a[32] = "123456789000000000";
16101 foo(&a[9], a);
16102 if (strcmp(a, "123456789123456789000000000") != 0)
16103 return 1;
16104 foo(a, &a[9]);
16105 if (strcmp(a, "123456789000000000") != 0)
16106 return 1;
16107 return 0;
16108}
16109
16110_ACEOF
16111if ac_fn_c_try_run "$LINENO"; then :
16112 have_glibc_memmove_bug=no
16113else
16114 have_glibc_memmove_bug=yes
16115fi
16116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16117 conftest.$ac_objext conftest.beam conftest.$ac_ext
16118fi
16119
16120CFLAGS="$saved_cflags"
16121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16122$as_echo "$have_glibc_memmove_bug" >&6; }
16123if test "$have_glibc_memmove_bug" = yes; then
16124
16125$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16126
16127fi
16128
16129if test "$have_gcc_asm_for_x87" = yes; then
16130 # Some versions of gcc miscompile inline asm:
16131 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16132 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16133 case $CC in
16134 *gcc*)
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16136$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16137 saved_cflags="$CFLAGS"
16138 CFLAGS="-O2"
16139 if test "$cross_compiling" = yes; then :
16140 have_ipa_pure_const_bug=undefined
16141else
16142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16143/* end confdefs.h. */
16144
16145 __attribute__((noinline)) int
16146 foo(int *p) {
16147 int r;
16148 asm ( "movl \$6, (%1)\n\t"
16149 "xorl %0, %0\n\t"
16150 : "=r" (r) : "r" (p) : "memory"
16151 );
16152 return r;
16153 }
16154 int main() {
16155 int p = 8;
16156 if ((foo(&p) ? : p) != 6)
16157 return 1;
16158 return 0;
16159 }
16160
16161_ACEOF
16162if ac_fn_c_try_run "$LINENO"; then :
16163 have_ipa_pure_const_bug=no
16164else
16165 have_ipa_pure_const_bug=yes
16166fi
16167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16168 conftest.$ac_objext conftest.beam conftest.$ac_ext
16169fi
16170
16171 CFLAGS="$saved_cflags"
16172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16173$as_echo "$have_ipa_pure_const_bug" >&6; }
16174 if test "$have_ipa_pure_const_bug" = yes; then
16175
16176$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16177
16178 fi
16179 ;;
16180 esac
16181fi
16182
Victor Stinner4f5366e2015-01-09 02:13:19 +010016183# Check for stdatomic.h
16184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16185$as_echo_n "checking for stdatomic.h... " >&6; }
16186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16187/* end confdefs.h. */
16188
16189
16190 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016191 atomic_int value = ATOMIC_VAR_INIT(1);
16192 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016193 int main() {
16194 int loaded_value = atomic_load(&value);
16195 return 0;
16196 }
16197
16198
16199_ACEOF
16200if ac_fn_c_try_link "$LINENO"; then :
16201 have_stdatomic_h=yes
16202else
16203 have_stdatomic_h=no
16204fi
16205rm -f core conftest.err conftest.$ac_objext \
16206 conftest$ac_exeext conftest.$ac_ext
16207
16208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16209$as_echo "$have_stdatomic_h" >&6; }
16210
16211if test "$have_stdatomic_h" = yes; then
16212
16213$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16214
16215fi
16216
16217# Check for GCC >= 4.7 __atomic builtins
16218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16219$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16221/* end confdefs.h. */
16222
16223
16224 volatile int val = 1;
16225 int main() {
16226 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16227 return 0;
16228 }
16229
16230
16231_ACEOF
16232if ac_fn_c_try_link "$LINENO"; then :
16233 have_builtin_atomic=yes
16234else
16235 have_builtin_atomic=no
16236fi
16237rm -f core conftest.err conftest.$ac_objext \
16238 conftest$ac_exeext conftest.$ac_ext
16239
16240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16241$as_echo "$have_builtin_atomic" >&6; }
16242
16243if test "$have_builtin_atomic" = yes; then
16244
16245$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16246
16247fi
16248
Ned Deily322f5ba2013-11-21 23:01:59 -080016249# ensurepip option
16250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16251$as_echo_n "checking for ensurepip... " >&6; }
16252
16253# Check whether --with-ensurepip was given.
16254if test "${with_ensurepip+set}" = set; then :
16255 withval=$with_ensurepip;
16256else
16257 with_ensurepip=upgrade
16258fi
16259
16260case $with_ensurepip in #(
16261 yes|upgrade) :
16262 ENSUREPIP=upgrade ;; #(
16263 install) :
16264 ENSUREPIP=install ;; #(
16265 no) :
16266 ENSUREPIP=no ;; #(
16267 *) :
16268 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16269esac
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16271$as_echo "$ENSUREPIP" >&6; }
16272
16273
Victor Stinner35a97c02015-03-08 02:59:09 +010016274# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16276$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278/* end confdefs.h. */
16279
16280
16281 #include <dirent.h>
16282
16283 int main() {
16284 struct dirent entry;
16285 return entry.d_type == DT_UNKNOWN;
16286 }
16287
16288
16289_ACEOF
16290if ac_fn_c_try_link "$LINENO"; then :
16291 have_dirent_d_type=yes
16292else
16293 have_dirent_d_type=no
16294fi
16295rm -f core conftest.err conftest.$ac_objext \
16296 conftest$ac_exeext conftest.$ac_ext
16297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16298$as_echo "$have_dirent_d_type" >&6; }
16299
16300if test "$have_dirent_d_type" = yes; then
16301
16302$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16303
16304fi
16305
Victor Stinner9eb57c52015-03-19 22:21:49 +010016306# check if the Linux getrandom() syscall is available
16307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16308$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16310/* end confdefs.h. */
16311
16312
Victor Stinner1b80b242016-04-12 22:34:58 +020016313 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016314 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016315 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016316
16317 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016318 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016319 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016320 const int flags = GRND_NONBLOCK;
16321 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016322 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016323 return 0;
16324 }
16325
16326
16327_ACEOF
16328if ac_fn_c_try_link "$LINENO"; then :
16329 have_getrandom_syscall=yes
16330else
16331 have_getrandom_syscall=no
16332fi
16333rm -f core conftest.err conftest.$ac_objext \
16334 conftest$ac_exeext conftest.$ac_ext
16335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16336$as_echo "$have_getrandom_syscall" >&6; }
16337
16338if test "$have_getrandom_syscall" = yes; then
16339
16340$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16341
16342fi
16343
Victor Stinner3abf44e2015-09-18 15:38:37 +020016344# check if the getrandom() function is available
16345# the test was written for the Solaris function of <sys/random.h>
16346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16347$as_echo_n "checking for the getrandom() function... " >&6; }
16348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349/* end confdefs.h. */
16350
16351
16352 #include <sys/random.h>
16353
16354 int main() {
16355 char buffer[1];
16356 const size_t buflen = sizeof(buffer);
16357 const int flags = 0;
16358 /* ignore the result, Python checks for ENOSYS at runtime */
16359 (void)getrandom(buffer, buflen, flags);
16360 return 0;
16361 }
16362
16363
16364_ACEOF
16365if ac_fn_c_try_link "$LINENO"; then :
16366 have_getrandom=yes
16367else
16368 have_getrandom=no
16369fi
16370rm -f core conftest.err conftest.$ac_objext \
16371 conftest$ac_exeext conftest.$ac_ext
16372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16373$as_echo "$have_getrandom" >&6; }
16374
16375if test "$have_getrandom" = yes; then
16376
16377$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16378
16379fi
16380
Guido van Rossum627b2d71993-12-24 10:39:16 +000016381# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016382ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016383
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016384ac_config_files="$ac_config_files Modules/ld_so_aix"
16385
Martin v. Löwis11437992002-04-12 09:54:03 +000016386cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016387# This file is a shell script that caches the results of configure
16388# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016389# scripts and configure runs, see configure's option --config-cache.
16390# It is not useful on other systems. If it contains results you don't
16391# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016392#
Martin v. Löwis11437992002-04-12 09:54:03 +000016393# config.status only pays attention to the cache file if you give it
16394# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016395#
Skip Montanaro6dead952003-09-25 14:50:04 +000016396# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016397# loading this file, other *unset* `ac_cv_foo' will be assigned the
16398# following values.
16399
16400_ACEOF
16401
Guido van Rossumf78abae1997-01-21 22:02:36 +000016402# The following way of writing the cache mishandles newlines in values,
16403# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016405# Ultrix sh set writes to stderr and can't be redirected directly,
16406# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407(
16408 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16409 eval ac_val=\$$ac_var
16410 case $ac_val in #(
16411 *${as_nl}*)
16412 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016413 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16414$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415 esac
16416 case $ac_var in #(
16417 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016418 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16419 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420 esac ;;
16421 esac
16422 done
16423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16426 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016427 # `set' does not quote correctly, so add quotes: double-quote
16428 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016430 "s/'/'\\\\''/g;
16431 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016432 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 *)
16434 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016436 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437 esac |
16438 sort
16439) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016441 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016442 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016443 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16445 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16447 :end' >>confcache
16448if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16449 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016450 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016451 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16452$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016453 if test ! -f "$cache_file" || test -h "$cache_file"; then
16454 cat confcache >"$cache_file"
16455 else
16456 case $cache_file in #(
16457 */* | ?:*)
16458 mv -f confcache "$cache_file"$$ &&
16459 mv -f "$cache_file"$$ "$cache_file" ;; #(
16460 *)
16461 mv -f confcache "$cache_file" ;;
16462 esac
16463 fi
16464 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016465 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016466 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16467$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016468 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016469fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016470rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016471
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016472test "x$prefix" = xNONE && prefix=$ac_default_prefix
16473# Let make expand exec_prefix.
16474test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016476DEFS=-DHAVE_CONFIG_H
16477
Skip Montanaro6dead952003-09-25 14:50:04 +000016478ac_libobjs=
16479ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016480U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016481for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16482 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016483 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016484 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16486 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016487 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16488 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016489done
16490LIBOBJS=$ac_libobjs
16491
16492LTLIBOBJS=$ac_ltlibobjs
16493
16494
Martin v. Löwis11437992002-04-12 09:54:03 +000016495
Matthias Kloseb9621712010-04-24 17:59:49 +000016496
Victor Stinnere0be4232011-10-25 13:06:09 +020016497: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016498ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016499ac_clean_files_save=$ac_clean_files
16500ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016501{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16502$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16503as_write_fail=0
16504cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016505#! $SHELL
16506# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016507# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016508# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016509# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016510
Martin v. Löwis11437992002-04-12 09:54:03 +000016511debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016512ac_cs_recheck=false
16513ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016514
Matthias Kloseb9621712010-04-24 17:59:49 +000016515SHELL=\${CONFIG_SHELL-$SHELL}
16516export SHELL
16517_ASEOF
16518cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16519## -------------------- ##
16520## M4sh Initialization. ##
16521## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523# Be more Bourne compatible
16524DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016525if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 emulate sh
16527 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016528 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016529 # is contrary to our usage. Disable this feature.
16530 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016532else
Matthias Kloseb9621712010-04-24 17:59:49 +000016533 case `(set -o) 2>/dev/null` in #(
16534 *posix*) :
16535 set -o posix ;; #(
16536 *) :
16537 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016539fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016540
16541
Matthias Kloseb9621712010-04-24 17:59:49 +000016542as_nl='
16543'
16544export as_nl
16545# Printing a long string crashes Solaris 7 /usr/bin/printf.
16546as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16547as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16548as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16549# Prefer a ksh shell builtin over an external printf program on Solaris,
16550# but without wasting forks for bash or zsh.
16551if test -z "$BASH_VERSION$ZSH_VERSION" \
16552 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16553 as_echo='print -r --'
16554 as_echo_n='print -rn --'
16555elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16556 as_echo='printf %s\n'
16557 as_echo_n='printf %s'
16558else
16559 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16560 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16561 as_echo_n='/usr/ucb/echo -n'
16562 else
16563 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16564 as_echo_n_body='eval
16565 arg=$1;
16566 case $arg in #(
16567 *"$as_nl"*)
16568 expr "X$arg" : "X\\(.*\\)$as_nl";
16569 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16570 esac;
16571 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16572 '
16573 export as_echo_n_body
16574 as_echo_n='sh -c $as_echo_n_body as_echo'
16575 fi
16576 export as_echo_body
16577 as_echo='sh -c $as_echo_body as_echo'
16578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016579
16580# The user is always right.
16581if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016582 PATH_SEPARATOR=:
16583 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16584 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16585 PATH_SEPARATOR=';'
16586 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589
16590# IFS
16591# We need space, tab and new line, in precisely that order. Quoting is
16592# there to prevent editors from complaining about space-tab.
16593# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16594# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595IFS=" "" $as_nl"
16596
16597# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016598as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016599case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600 *[\\/]* ) as_myself=$0 ;;
16601 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016602for as_dir in $PATH
16603do
16604 IFS=$as_save_IFS
16605 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016606 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16607 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016608IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610 ;;
16611esac
16612# We did not find ourselves, most probably we were run as `sh COMMAND'
16613# in which case we are not to be found in the path.
16614if test "x$as_myself" = x; then
16615 as_myself=$0
16616fi
16617if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016618 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16619 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620fi
16621
Matthias Kloseb9621712010-04-24 17:59:49 +000016622# Unset variables that we do not need and which cause bugs (e.g. in
16623# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16624# suppresses any "Segmentation fault" message there. '((' could
16625# trigger a bug in pdksh 5.2.14.
16626for as_var in BASH_ENV ENV MAIL MAILPATH
16627do eval test x\${$as_var+set} = xset \
16628 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016629done
16630PS1='$ '
16631PS2='> '
16632PS4='+ '
16633
16634# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016635LC_ALL=C
16636export LC_ALL
16637LANGUAGE=C
16638export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639
Matthias Kloseb9621712010-04-24 17:59:49 +000016640# CDPATH.
16641(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16642
16643
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016644# as_fn_error STATUS ERROR [LINENO LOG_FD]
16645# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016646# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16647# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016648# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016649as_fn_error ()
16650{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016651 as_status=$1; test $as_status -eq 0 && as_status=1
16652 if test "$4"; then
16653 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16654 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016655 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016656 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016657 as_fn_exit $as_status
16658} # as_fn_error
16659
16660
16661# as_fn_set_status STATUS
16662# -----------------------
16663# Set $? to STATUS, without forking.
16664as_fn_set_status ()
16665{
16666 return $1
16667} # as_fn_set_status
16668
16669# as_fn_exit STATUS
16670# -----------------
16671# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16672as_fn_exit ()
16673{
16674 set +e
16675 as_fn_set_status $1
16676 exit $1
16677} # as_fn_exit
16678
16679# as_fn_unset VAR
16680# ---------------
16681# Portably unset VAR.
16682as_fn_unset ()
16683{
16684 { eval $1=; unset $1;}
16685}
16686as_unset=as_fn_unset
16687# as_fn_append VAR VALUE
16688# ----------------------
16689# Append the text in VALUE to the end of the definition contained in VAR. Take
16690# advantage of any shell optimizations that allow amortized linear growth over
16691# repeated appends, instead of the typical quadratic growth present in naive
16692# implementations.
16693if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16694 eval 'as_fn_append ()
16695 {
16696 eval $1+=\$2
16697 }'
16698else
16699 as_fn_append ()
16700 {
16701 eval $1=\$$1\$2
16702 }
16703fi # as_fn_append
16704
16705# as_fn_arith ARG...
16706# ------------------
16707# Perform arithmetic evaluation on the ARGs, and store the result in the
16708# global $as_val. Take advantage of shells that can avoid forks. The arguments
16709# must be portable across $(()) and expr.
16710if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16711 eval 'as_fn_arith ()
16712 {
16713 as_val=$(( $* ))
16714 }'
16715else
16716 as_fn_arith ()
16717 {
16718 as_val=`expr "$@" || test $? -eq 1`
16719 }
16720fi # as_fn_arith
16721
16722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723if expr a : '\(a\)' >/dev/null 2>&1 &&
16724 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16725 as_expr=expr
16726else
16727 as_expr=false
16728fi
16729
16730if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16731 as_basename=basename
16732else
16733 as_basename=false
16734fi
16735
Matthias Kloseb9621712010-04-24 17:59:49 +000016736if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16737 as_dirname=dirname
16738else
16739 as_dirname=false
16740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016742as_me=`$as_basename -- "$0" ||
16743$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16744 X"$0" : 'X\(//\)$' \| \
16745 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016746$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747 sed '/^.*\/\([^/][^/]*\)\/*$/{
16748 s//\1/
16749 q
16750 }
16751 /^X\/\(\/\/\)$/{
16752 s//\1/
16753 q
16754 }
16755 /^X\/\(\/\).*/{
16756 s//\1/
16757 q
16758 }
16759 s/.*/./; q'`
16760
Matthias Kloseb9621712010-04-24 17:59:49 +000016761# Avoid depending upon Character Ranges.
16762as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16763as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16764as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16765as_cr_digits='0123456789'
16766as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016767
16768ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016769case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016771 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016772 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016773 xy) ECHO_C='\c';;
16774 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16775 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776 esac;;
16777*)
16778 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016780
Martin v. Löwis11437992002-04-12 09:54:03 +000016781rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016782if test -d conf$$.dir; then
16783 rm -f conf$$.dir/conf$$.file
16784else
16785 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016786 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016788if (echo >conf$$.file) 2>/dev/null; then
16789 if ln -s conf$$.file conf$$ 2>/dev/null; then
16790 as_ln_s='ln -s'
16791 # ... but there are two gotchas:
16792 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16793 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016794 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016795 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016796 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016797 elif ln conf$$.file conf$$ 2>/dev/null; then
16798 as_ln_s=ln
16799 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016800 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016802else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016803 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016805rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16806rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016807
Matthias Kloseb9621712010-04-24 17:59:49 +000016808
16809# as_fn_mkdir_p
16810# -------------
16811# Create "$as_dir" as a directory, including parents if necessary.
16812as_fn_mkdir_p ()
16813{
16814
16815 case $as_dir in #(
16816 -*) as_dir=./$as_dir;;
16817 esac
16818 test -d "$as_dir" || eval $as_mkdir_p || {
16819 as_dirs=
16820 while :; do
16821 case $as_dir in #(
16822 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16823 *) as_qdir=$as_dir;;
16824 esac
16825 as_dirs="'$as_qdir' $as_dirs"
16826 as_dir=`$as_dirname -- "$as_dir" ||
16827$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16828 X"$as_dir" : 'X\(//\)[^/]' \| \
16829 X"$as_dir" : 'X\(//\)$' \| \
16830 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16831$as_echo X"$as_dir" |
16832 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16833 s//\1/
16834 q
16835 }
16836 /^X\(\/\/\)[^/].*/{
16837 s//\1/
16838 q
16839 }
16840 /^X\(\/\/\)$/{
16841 s//\1/
16842 q
16843 }
16844 /^X\(\/\).*/{
16845 s//\1/
16846 q
16847 }
16848 s/.*/./; q'`
16849 test -d "$as_dir" && break
16850 done
16851 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016852 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016853
16854
16855} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016856if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016857 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016858else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016859 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016860 as_mkdir_p=false
16861fi
16862
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016863
16864# as_fn_executable_p FILE
16865# -----------------------
16866# Test if FILE is an executable regular file.
16867as_fn_executable_p ()
16868{
16869 test -f "$1" && test -x "$1"
16870} # as_fn_executable_p
16871as_test_x='test -x'
16872as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016873
16874# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016875as_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 +000016876
16877# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016878as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016879
16880
Martin v. Löwis11437992002-04-12 09:54:03 +000016881exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016882## ----------------------------------- ##
16883## Main body of $CONFIG_STATUS script. ##
16884## ----------------------------------- ##
16885_ASEOF
16886test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016887
Matthias Kloseb9621712010-04-24 17:59:49 +000016888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16889# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016890# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891# values after options handling.
16892ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040016893This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016894generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016895
16896 CONFIG_FILES = $CONFIG_FILES
16897 CONFIG_HEADERS = $CONFIG_HEADERS
16898 CONFIG_LINKS = $CONFIG_LINKS
16899 CONFIG_COMMANDS = $CONFIG_COMMANDS
16900 $ $0 $@
16901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902on `(hostname || uname -n) 2>/dev/null | sed 1q`
16903"
16904
Martin v. Löwis11437992002-04-12 09:54:03 +000016905_ACEOF
16906
Matthias Kloseb9621712010-04-24 17:59:49 +000016907case $ac_config_files in *"
16908"*) set x $ac_config_files; shift; ac_config_files=$*;;
16909esac
16910
16911case $ac_config_headers in *"
16912"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16913esac
16914
16915
16916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016917# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016918config_files="$ac_config_files"
16919config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016921_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016922
Matthias Kloseb9621712010-04-24 17:59:49 +000016923cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016924ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016925\`$as_me' instantiates files and other configuration actions
16926from templates according to the current configuration. Unless the files
16927and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016928
Matthias Kloseb9621712010-04-24 17:59:49 +000016929Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016930
16931 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016933 --config print configuration, then exit
16934 -q, --quiet, --silent
16935 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 -d, --debug don't remove temporary files
16937 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016938 --file=FILE[:TEMPLATE]
16939 instantiate the configuration file FILE
16940 --header=FILE[:TEMPLATE]
16941 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016942
16943Configuration files:
16944$config_files
16945
16946Configuration headers:
16947$config_headers
16948
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016949Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16953ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016954ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040016955python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016956configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016957 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016958
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016959Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016960This config.status script is free software; the Free Software Foundation
16961gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016962
16963ac_pwd='$ac_pwd'
16964srcdir='$srcdir'
16965INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016966MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016967test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016968_ACEOF
16969
Matthias Kloseb9621712010-04-24 17:59:49 +000016970cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16971# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016972ac_need_defaults=:
16973while test $# != 0
16974do
16975 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016976 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016977 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16978 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016979 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016980 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016981 --*=)
16982 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16983 ac_optarg=
16984 ac_shift=:
16985 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016987 ac_option=$1
16988 ac_optarg=$2
16989 ac_shift=shift
16990 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016991 esac
16992
Skip Montanaro6dead952003-09-25 14:50:04 +000016993 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016995 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16996 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016998 $as_echo "$ac_cs_version"; exit ;;
16999 --config | --confi | --conf | --con | --co | --c )
17000 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017001 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 debug=: ;;
17003 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017004 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017005 case $ac_optarg in
17006 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017007 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017008 esac
17009 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017010 ac_need_defaults=false;;
17011 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017012 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017013 case $ac_optarg in
17014 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17015 esac
17016 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018 --he | --h)
17019 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017020 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017021Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017024 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17025 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17026 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017027
17028 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017029 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017030Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017031
Matthias Kloseb9621712010-04-24 17:59:49 +000017032 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017034
17035 esac
17036 shift
17037done
17038
Skip Montanaro6dead952003-09-25 14:50:04 +000017039ac_configure_extra_args=
17040
17041if $ac_cs_silent; then
17042 exec 6>/dev/null
17043 ac_configure_extra_args="$ac_configure_extra_args --silent"
17044fi
17045
17046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017047cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017048if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017049 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017050 shift
17051 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17052 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017054 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017055fi
17056
Martin v. Löwis11437992002-04-12 09:54:03 +000017057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017058cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059exec 5>>config.log
17060{
17061 echo
17062 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17063## Running $as_me. ##
17064_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017071
Matthias Kloseb9621712010-04-24 17:59:49 +000017072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073
17074# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017075for ac_config_target in $ac_config_targets
17076do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 case $ac_config_target in
17078 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17079 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17080 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017081 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17082 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017084 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017085 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017086 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087
Victor Stinnere0be4232011-10-25 13:06:09 +020017088 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 esac
17090done
17091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092
Martin v. Löwis11437992002-04-12 09:54:03 +000017093# If the user did not use the arguments to specify the items to instantiate,
17094# then the envvar interface is used. Set only those that are not.
17095# We use the long form for the default assignment because of an extremely
17096# bizarre bug on SunOS 4.1.3.
17097if $ac_need_defaults; then
17098 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17099 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17100fi
17101
Skip Montanaro6dead952003-09-25 14:50:04 +000017102# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017104# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105# Hook for its removal unless debugging.
17106# Note that there is a small window in which the directory will not be cleaned:
17107# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017108$debug ||
17109{
Victor Stinnere0be4232011-10-25 13:06:09 +020017110 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017112 : "${ac_tmp:=$tmp}"
17113 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017114' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017115 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017116}
Martin v. Löwis11437992002-04-12 09:54:03 +000017117# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017118
Martin v. Löwis11437992002-04-12 09:54:03 +000017119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017121 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017122} ||
17123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124 tmp=./conf$$-$RANDOM
17125 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017126} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017127ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017128
Matthias Kloseb9621712010-04-24 17:59:49 +000017129# Set up the scripts for CONFIG_FILES section.
17130# No need to generate them if there are no CONFIG_FILES.
17131# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017133
Matthias Kloseb9621712010-04-24 17:59:49 +000017134
17135ac_cr=`echo X | tr X '\015'`
17136# On cygwin, bash can eat \r inside `` if the user requested igncr.
17137# But we know of no other shell where ac_cr would be empty at this
17138# point, so we can use a bashism as a fallback.
17139if test "x$ac_cr" = x; then
17140 eval ac_cr=\$\'\\r\'
17141fi
17142ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17143if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017144 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017145else
17146 ac_cs_awk_cr=$ac_cr
17147fi
17148
Victor Stinnere0be4232011-10-25 13:06:09 +020017149echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017150_ACEOF
17151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017152
Matthias Kloseb9621712010-04-24 17:59:49 +000017153{
17154 echo "cat >conf$$subs.awk <<_ACEOF" &&
17155 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17156 echo "_ACEOF"
17157} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017158 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17159ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160ac_delim='%!_!# '
17161for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017162 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017163 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017164
Matthias Kloseb9621712010-04-24 17:59:49 +000017165 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17166 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017167 break
17168 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017169 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170 else
17171 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173done
Matthias Kloseb9621712010-04-24 17:59:49 +000017174rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017177cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017179sed -n '
17180h
17181s/^/S["/; s/!.*/"]=/
17182p
17183g
17184s/^[^!]*!//
17185:repl
17186t repl
17187s/'"$ac_delim"'$//
17188t delim
17189:nl
17190h
17191s/\(.\{148\}\)..*/\1/
17192t more1
17193s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17194p
17195n
17196b repl
17197:more1
17198s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17199p
17200g
17201s/.\{148\}//
17202t nl
17203:delim
17204h
17205s/\(.\{148\}\)..*/\1/
17206t more2
17207s/["\\]/\\&/g; s/^/"/; s/$/"/
17208p
17209b
17210:more2
17211s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17212p
17213g
17214s/.\{148\}//
17215t delim
17216' <conf$$subs.awk | sed '
17217/^[^""]/{
17218 N
17219 s/\n//
17220}
17221' >>$CONFIG_STATUS || ac_write_fail=1
17222rm -f conf$$subs.awk
17223cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17224_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017225cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017226 for (key in S) S_is_set[key] = 1
17227 FS = ""
17228
17229}
17230{
17231 line = $ 0
17232 nfields = split(line, field, "@")
17233 substed = 0
17234 len = length(field[1])
17235 for (i = 2; i < nfields; i++) {
17236 key = field[i]
17237 keylen = length(key)
17238 if (S_is_set[key]) {
17239 value = S[key]
17240 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17241 len += length(value) + length(field[++i])
17242 substed = 1
17243 } else
17244 len += 1 + keylen
17245 }
17246
17247 print line
17248}
17249
17250_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17253if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17254 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17255else
17256 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017257fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017258 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017259_ACEOF
17260
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017261# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17262# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017263# trailing colons and then remove the whole line if VPATH becomes empty
17264# (actually we leave an empty line to preserve line numbers).
17265if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017266 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17267h
17268s///
17269s/^/:/
17270s/[ ]*$/:/
17271s/:\$(srcdir):/:/g
17272s/:\${srcdir}:/:/g
17273s/:@srcdir@:/:/g
17274s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017275s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017276x
17277s/\(=[ ]*\).*/\1/
17278G
17279s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280s/^[^=]*=[ ]*$//
17281}'
17282fi
17283
Matthias Kloseb9621712010-04-24 17:59:49 +000017284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017285fi # test -n "$CONFIG_FILES"
17286
Matthias Kloseb9621712010-04-24 17:59:49 +000017287# Set up the scripts for CONFIG_HEADERS section.
17288# No need to generate them if there are no CONFIG_HEADERS.
17289# This happens for instance with `./config.status Makefile'.
17290if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017291cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017292BEGIN {
17293_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294
Matthias Kloseb9621712010-04-24 17:59:49 +000017295# Transform confdefs.h into an awk script `defines.awk', embedded as
17296# here-document in config.status, that substitutes the proper values into
17297# config.h.in to produce config.h.
17298
17299# Create a delimiter string that does not exist in confdefs.h, to ease
17300# handling of long lines.
17301ac_delim='%!_!# '
17302for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017303 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17304 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017305 break
17306 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017307 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 else
17309 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17310 fi
17311done
17312
17313# For the awk script, D is an array of macro values keyed by name,
17314# likewise P contains macro parameters if any. Preserve backslash
17315# newline sequences.
17316
17317ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17318sed -n '
17319s/.\{148\}/&'"$ac_delim"'/g
17320t rset
17321:rset
17322s/^[ ]*#[ ]*define[ ][ ]*/ /
17323t def
17324d
17325:def
17326s/\\$//
17327t bsnl
17328s/["\\]/\\&/g
17329s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17330D["\1"]=" \3"/p
17331s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17332d
17333:bsnl
17334s/["\\]/\\&/g
17335s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17336D["\1"]=" \3\\\\\\n"\\/p
17337t cont
17338s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17339t cont
17340d
17341:cont
17342n
17343s/.\{148\}/&'"$ac_delim"'/g
17344t clear
17345:clear
17346s/\\$//
17347t bsnlc
17348s/["\\]/\\&/g; s/^/"/; s/$/"/p
17349d
17350:bsnlc
17351s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17352b cont
17353' <confdefs.h | sed '
17354s/'"$ac_delim"'/"\\\
17355"/g' >>$CONFIG_STATUS || ac_write_fail=1
17356
17357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17358 for (key in D) D_is_set[key] = 1
17359 FS = ""
17360}
17361/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17362 line = \$ 0
17363 split(line, arg, " ")
17364 if (arg[1] == "#") {
17365 defundef = arg[2]
17366 mac1 = arg[3]
17367 } else {
17368 defundef = substr(arg[1], 2)
17369 mac1 = arg[2]
17370 }
17371 split(mac1, mac2, "(") #)
17372 macro = mac2[1]
17373 prefix = substr(line, 1, index(line, defundef) - 1)
17374 if (D_is_set[macro]) {
17375 # Preserve the white space surrounding the "#".
17376 print prefix "define", macro P[macro] D[macro]
17377 next
17378 } else {
17379 # Replace #undef with comments. This is necessary, for example,
17380 # in the case of _POSIX_SOURCE, which is predefined and required
17381 # on some systems where configure will not decide to define it.
17382 if (defundef == "undef") {
17383 print "/*", prefix defundef, macro, "*/"
17384 next
17385 }
17386 }
17387}
17388{ print }
17389_ACAWK
17390_ACEOF
17391cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017392 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017393fi # test -n "$CONFIG_HEADERS"
17394
17395
17396eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17397shift
17398for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399do
17400 case $ac_tag in
17401 :[FHLC]) ac_mode=$ac_tag; continue;;
17402 esac
17403 case $ac_mode$ac_tag in
17404 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017405 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 :[FH]-) ac_tag=-:-;;
17407 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17408 esac
17409 ac_save_IFS=$IFS
17410 IFS=:
17411 set x $ac_tag
17412 IFS=$ac_save_IFS
17413 shift
17414 ac_file=$1
17415 shift
17416
17417 case $ac_mode in
17418 :L) ac_source=$1;;
17419 :[FH])
17420 ac_file_inputs=
17421 for ac_f
17422 do
17423 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017424 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 *) # Look for the file first in the build tree, then in the source tree
17426 # (if the path is not absolute). The absolute path cannot be DOS-style,
17427 # because $ac_f cannot contain `:'.
17428 test -f "$ac_f" ||
17429 case $ac_f in
17430 [\\/$]*) false;;
17431 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17432 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017433 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017435 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17436 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 done
17438
17439 # Let's still pretend it is `configure' which instantiates (i.e., don't
17440 # use $as_me), people would be surprised to read:
17441 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017442 configure_input='Generated from '`
17443 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17444 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445 if test x"$ac_file" != x-; then
17446 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017447 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17448$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017450 # Neutralize special characters interpreted by sed in replacement strings.
17451 case $configure_input in #(
17452 *\&* | *\|* | *\\* )
17453 ac_sed_conf_input=`$as_echo "$configure_input" |
17454 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17455 *) ac_sed_conf_input=$configure_input;;
17456 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457
17458 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017459 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17460 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 esac
17462 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017463 esac
17464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017466$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017467 X"$ac_file" : 'X\(//\)[^/]' \| \
17468 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017470$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17472 s//\1/
17473 q
17474 }
17475 /^X\(\/\/\)[^/].*/{
17476 s//\1/
17477 q
17478 }
17479 /^X\(\/\/\)$/{
17480 s//\1/
17481 q
17482 }
17483 /^X\(\/\).*/{
17484 s//\1/
17485 q
17486 }
17487 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017488 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 ac_builddir=.
17490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491case "$ac_dir" in
17492.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17493*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017494 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017496 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497 case $ac_top_builddir_sub in
17498 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17499 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17500 esac ;;
17501esac
17502ac_abs_top_builddir=$ac_pwd
17503ac_abs_builddir=$ac_pwd$ac_dir_suffix
17504# for backward compatibility:
17505ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017506
17507case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017509 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510 ac_top_srcdir=$ac_top_builddir_sub
17511 ac_abs_top_srcdir=$ac_pwd ;;
17512 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017513 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514 ac_top_srcdir=$srcdir
17515 ac_abs_top_srcdir=$srcdir ;;
17516 *) # Relative name.
17517 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17518 ac_top_srcdir=$ac_top_build_prefix$srcdir
17519 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017520esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017522
Martin v. Löwis11437992002-04-12 09:54:03 +000017523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524 case $ac_mode in
17525 :F)
17526 #
17527 # CONFIG_FILE
17528 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017529
17530 case $INSTALL in
17531 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017534 ac_MKDIR_P=$MKDIR_P
17535 case $MKDIR_P in
17536 [\\/$]* | ?:[\\/]* ) ;;
17537 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17538 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017539_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540
Matthias Kloseb9621712010-04-24 17:59:49 +000017541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542# If the template does not know about datarootdir, expand it.
17543# FIXME: This hack should be removed a few years after 2.60.
17544ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017545ac_sed_dataroot='
17546/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547 p
17548 q
17549}
17550/@datadir@/p
17551/@docdir@/p
17552/@infodir@/p
17553/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017554/@mandir@/p'
17555case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556*datarootdir*) ac_datarootdir_seen=yes;;
17557*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17559$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017561cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 ac_datarootdir_hack='
17563 s&@datadir@&$datadir&g
17564 s&@docdir@&$docdir&g
17565 s&@infodir@&$infodir&g
17566 s&@localedir@&$localedir&g
17567 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569esac
17570_ACEOF
17571
17572# Neutralize VPATH when `$srcdir' = `.'.
17573# Shell code in configure.ac might set extrasub.
17574# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17576ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017577$extrasub
17578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017580:t
17581/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017582s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017584s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585s&@srcdir@&$ac_srcdir&;t t
17586s&@abs_srcdir@&$ac_abs_srcdir&;t t
17587s&@top_srcdir@&$ac_top_srcdir&;t t
17588s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17589s&@builddir@&$ac_builddir&;t t
17590s&@abs_builddir@&$ac_abs_builddir&;t t
17591s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17592s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017593s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017595"
Victor Stinnere0be4232011-10-25 13:06:09 +020017596eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17597 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017600 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17601 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17602 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017603 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017604which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017605$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017606which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017607
Victor Stinnere0be4232011-10-25 13:06:09 +020017608 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017610 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17611 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017612 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017613 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614 ;;
17615 :H)
17616 #
17617 # CONFIG_HEADER
17618 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017620 {
17621 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017622 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17623 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017624 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017625 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017626 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17627$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017628 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017629 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017630 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017631 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017632 fi
17633 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017634 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017635 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017636 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640
17641 esac
17642
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017643
17644 case $ac_file$ac_mode in
17645 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17646
17647 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648done # for ac_tag
17649
Guido van Rossum627b2d71993-12-24 10:39:16 +000017650
Matthias Kloseb9621712010-04-24 17:59:49 +000017651as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017652_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017653ac_clean_files=$ac_clean_files_save
17654
Matthias Kloseb9621712010-04-24 17:59:49 +000017655test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017656 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017657
Martin v. Löwis11437992002-04-12 09:54:03 +000017658
17659# configure is writing to config.log, and then calls config.status.
17660# config.status does its own redirection, appending to config.log.
17661# Unfortunately, on DOS this fails, as config.log is still kept open
17662# by configure, so config.status won't be able to write to it; its
17663# output is simply discarded. So we exec the FD to /dev/null,
17664# effectively closing config.log, so it can be properly (re)opened and
17665# appended to by config.status. When coming back to configure, we
17666# need to make the FD available again.
17667if test "$no_create" != yes; then
17668 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017669 ac_config_status_args=
17670 test "$silent" = yes &&
17671 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017673 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017674 exec 5>>config.log
17675 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17676 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017677 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017678fi
17679if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17681$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017682fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017683
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017684
Christian Heimes75ed8902013-11-20 01:11:18 +010017685echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017686if test ! -f Modules/Setup
17687then
17688 cp $srcdir/Modules/Setup.dist Modules/Setup
17689fi
17690
Christian Heimes75ed8902013-11-20 01:11:18 +010017691echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017692if test ! -f Modules/Setup.local
17693then
17694 echo "# Edit this file for local setup changes" >Modules/Setup.local
17695fi
17696
Christian Heimes75ed8902013-11-20 01:11:18 +010017697echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017698$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017699 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017700 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017701mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017702
17703if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17704 echo "" >&6
17705 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017706 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 +000017707 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017708 echo "" >&6
17709 echo "" >&6
17710fi
17711