blob: 00dd1f0514a69cb26b98a305cd52a241a99e01bd [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
695RANLIB
696GNULD
697LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000698LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000699RUNSHARED
700INSTSONAME
701LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000702PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000703BLDLIBRARY
704DLLLIBRARY
705LDLIBRARY
706LIBRARY
707BUILDEXEEXT
708EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200709NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200710MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711PLATFORM_TRIPLET
712MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200713ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MAINCC
715CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700716SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717GREP
718CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000719OBJEXT
720EXEEXT
721ac_ct_CC
722CPPFLAGS
723LDFLAGS
724CFLAGS
725CC
726EXPORT_MACOSX_DEPLOYMENT_TARGET
727CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000729MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000730FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800732FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKALTINSTALLLAST
734FRAMEWORKALTINSTALLFIRST
735FRAMEWORKINSTALLLAST
736FRAMEWORKINSTALLFIRST
737PYTHONFRAMEWORKINSTALLDIR
738PYTHONFRAMEWORKPREFIX
739PYTHONFRAMEWORKDIR
740PYTHONFRAMEWORKIDENTIFIER
741PYTHONFRAMEWORK
742LIPO_32BIT_FLAGS
743ARCH_RUN_32BIT
744UNIVERSALSDK
745CONFIG_ARGS
746SOVERSION
747VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200748PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200749PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100750host_os
751host_vendor
752host_cpu
753host
754build_os
755build_vendor
756build_cpu
757build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500758HAS_GIT
759GITBRANCH
760GITTAG
761GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400762BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000763target_alias
764host_alias
765build_alias
766LIBS
767ECHO_T
768ECHO_N
769ECHO_C
770DEFS
771mandir
772localedir
773libdir
774psdir
775pdfdir
776dvidir
777htmldir
778infodir
779docdir
780oldincludedir
781includedir
Antoine Pitroua6a4dc82017-09-07 18:56:24 +0200782runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000783localstatedir
784sharedstatedir
785sysconfdir
786datadir
787datarootdir
788libexecdir
789sbindir
790bindir
791program_transform_name
792prefix
793exec_prefix
794PACKAGE_URL
795PACKAGE_BUGREPORT
796PACKAGE_STRING
797PACKAGE_VERSION
798PACKAGE_TARNAME
799PACKAGE_NAME
800PATH_SEPARATOR
801SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000802ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000803ac_user_opts='
804enable_option_checking
805enable_universalsdk
806with_universal_archs
807with_framework_name
808enable_framework
809with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600810with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200816with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000817enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700818with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100819with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100820with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_libs
822with_system_expat
823with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100824with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000825enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700826with_tcltk_includes
827with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000829enable_ipv6
830with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000832with_c_locale_coercion
833with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700835with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_fpectl
837with_libm
838with_libc
839enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800841with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000842'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 ac_precious_vars='build_alias
844host_alias
845target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100846MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100852CPP
853PKG_CONFIG
854PKG_CONFIG_PATH
855PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859ac_init_help=
860ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000861ac_unrecognized_opts=
862ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# The variables have the same names as the options, with
864# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877x_includes=NONE
878x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
Antoine Pitroua6a4dc82017-09-07 18:56:24 +0200894runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895includedir='${prefix}/include'
896oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898infodir='${datarootdir}/info'
899htmldir='${docdir}'
900dvidir='${docdir}'
901pdfdir='${docdir}'
902psdir='${docdir}'
903libdir='${exec_prefix}/lib'
904localedir='${datarootdir}/locale'
905mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 # If the previous option needs an argument, assign it.
912 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 ac_prev=
915 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200919 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920 *=) ac_optarg= ;;
921 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Accept the important Cygnus configure options, so we can diagnose typos.
925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 case $ac_dashdash$ac_option in
927 --)
928 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -bindir | --bindir | --bindi | --bind | --bin | --bi)
931 ac_prev=bindir ;;
932 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
935 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 -cache-file | --cache-file | --cache-fil | --cache-fi \
941 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942 ac_prev=cache_file ;;
943 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 cache_file=$ac_optarg ;;
946
947 --config-cache | -C)
948 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956 | --dataroo | --dataro | --datar)
957 ac_prev=datarootdir ;;
958 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960 datarootdir=$ac_optarg ;;
961
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200966 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977
978 -docdir | --docdir | --docdi | --doc | --do)
979 ac_prev=docdir ;;
980 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981 docdir=$ac_optarg ;;
982
983 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984 ac_prev=dvidir ;;
985 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200992 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt_orig=$ac_useropt
994 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995 case $ac_user_opts in
996 *"
997"enable_$ac_useropt"
998"*) ;;
999 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000 ac_unrecognized_sep=', ';;
1001 esac
1002 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006 | --exec | --exe | --ex)
1007 ac_prev=exec_prefix ;;
1008 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Obsolete; use --with-gas.
1015 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 -help | --help | --hel | --he | -h)
1018 ac_init_help=long ;;
1019 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020 ac_init_help=recursive ;;
1021 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030 ac_prev=htmldir ;;
1031 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032 | --ht=*)
1033 htmldir=$ac_optarg ;;
1034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -includedir | --includedir | --includedi | --included | --include \
1036 | --includ | --inclu | --incl | --inc)
1037 ac_prev=includedir ;;
1038 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -infodir | --infodir | --infodi | --infod | --info | --inf)
1043 ac_prev=infodir ;;
1044 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libdir | --libdir | --libdi | --libd)
1048 ac_prev=libdir ;;
1049 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053 | --libexe | --libex | --libe)
1054 ac_prev=libexecdir ;;
1055 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 -localedir | --localedir | --localedi | --localed | --locale)
1060 ac_prev=localedir ;;
1061 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062 localedir=$ac_optarg ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 ac_prev=localstatedir ;;
1067 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
1071 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072 ac_prev=mandir ;;
1073 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Obsolete; use --without-fp.
1078 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 no_create=yes ;;
1083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090 | --oldin | --oldi | --old | --ol | --o)
1091 ac_prev=oldincludedir ;;
1092 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098 ac_prev=prefix ;;
1099 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103 | --program-pre | --program-pr | --program-p)
1104 ac_prev=program_prefix ;;
1105 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110 | --program-suf | --program-su | --program-s)
1111 ac_prev=program_suffix ;;
1112 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-transform-name | --program-transform-name \
1117 | --program-transform-nam | --program-transform-na \
1118 | --program-transform-n | --program-transform- \
1119 | --program-transform | --program-transfor \
1120 | --program-transfo | --program-transf \
1121 | --program-trans | --program-tran \
1122 | --progr-tra | --program-tr | --program-t)
1123 ac_prev=program_transform_name ;;
1124 -program-transform-name=* | --program-transform-name=* \
1125 | --program-transform-nam=* | --program-transform-na=* \
1126 | --program-transform-n=* | --program-transform-=* \
1127 | --program-transform=* | --program-transfor=* \
1128 | --program-transfo=* | --program-transf=* \
1129 | --program-trans=* | --program-tran=* \
1130 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134 ac_prev=pdfdir ;;
1135 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136 pdfdir=$ac_optarg ;;
1137
1138 -psdir | --psdir | --psdi | --psd | --ps)
1139 ac_prev=psdir ;;
1140 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141 psdir=$ac_optarg ;;
1142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144 | -silent | --silent | --silen | --sile | --sil)
1145 silent=yes ;;
1146
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001147 -runstatedir | --runstatedir | --runstatedi | --runstated \
1148 | --runstate | --runstat | --runsta | --runst | --runs \
1149 | --run | --ru | --r)
1150 ac_prev=runstatedir ;;
1151 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1152 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1153 | --run=* | --ru=* | --r=*)
1154 runstatedir=$ac_optarg ;;
1155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1157 ac_prev=sbindir ;;
1158 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1159 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
1162 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1163 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1164 | --sharedst | --shareds | --shared | --share | --shar \
1165 | --sha | --sh)
1166 ac_prev=sharedstatedir ;;
1167 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1168 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1169 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1170 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 -site | --site | --sit)
1174 ac_prev=site ;;
1175 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1179 ac_prev=srcdir ;;
1180 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1184 | --syscon | --sysco | --sysc | --sys | --sy)
1185 ac_prev=sysconfdir ;;
1186 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1187 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1196 verbose=yes ;;
1197
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 -version | --version | --versio | --versi | --vers | -V)
1199 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt_orig=$ac_useropt
1223 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224 case $ac_user_opts in
1225 *"
1226"with_$ac_useropt"
1227"*) ;;
1228 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1229 ac_unrecognized_sep=', ';;
1230 esac
1231 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 --x)
1234 # Obsolete; use --with-x.
1235 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1238 | --x-incl | --x-inc | --x-in | --x-i)
1239 ac_prev=x_includes ;;
1240 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1241 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
1244 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1245 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1246 ac_prev=x_libraries ;;
1247 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1248 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1252Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253 ;;
1254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 *=*)
1256 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1257 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 case $ac_envvar in #(
1259 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 export $ac_envvar ;;
1264
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001265 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001270 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 ;;
1272
1273 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274done
1275
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279fi
1280
Matthias Kloseb9621712010-04-24 17:59:49 +00001281if test -n "$ac_unrecognized_opts"; then
1282 case $enable_option_checking in
1283 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1286 esac
1287fi
1288
1289# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1291 datadir sysconfdir sharedstatedir localstatedir includedir \
1292 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001293 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 # Remove trailing slashes.
1297 case $ac_val in
1298 */ )
1299 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1300 eval $ac_var=\$ac_val;;
1301 esac
1302 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001303 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 [\\/$]* | ?:[\\/]* ) continue;;
1305 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001306 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001308done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# There might be people who depend on the old broken behavior: `$host'
1311# used to hold the argument of --host etc.
1312# FIXME: To remove some day.
1313build=$build_alias
1314host=$host_alias
1315target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317# FIXME: To remove some day.
1318if test "x$host_alias" != x; then
1319 if test "x$build_alias" = x; then
1320 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001321 elif test "x$build_alias" != "x$host_alias"; then
1322 cross_compiling=yes
1323 fi
1324fi
1325
1326ac_tool_prefix=
1327test -n "$host_alias" && ac_tool_prefix=$host_alias-
1328
1329test "$silent" = yes && exec 6>/dev/null
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332ac_pwd=`pwd` && test -n "$ac_pwd" &&
1333ac_ls_di=`ls -di .` &&
1334ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338
1339
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340# Find the source files, if location was not specified.
1341if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 ac_confdir=`$as_dirname -- "$as_myself" ||
1345$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1346 X"$as_myself" : 'X\(//\)[^/]' \| \
1347 X"$as_myself" : 'X\(//\)$' \| \
1348 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1349$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)[^/].*/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)$/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\).*/{
1363 s//\1/
1364 q
1365 }
1366 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001367 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369 srcdir=..
1370 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371else
1372 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374if test ! -r "$srcdir/$ac_unique_file"; then
1375 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1379ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381 pwd)`
1382# When building in place, set srcdir=.
1383if test "$ac_abs_confdir" = "$ac_pwd"; then
1384 srcdir=.
1385fi
1386# Remove unnecessary trailing slashes from srcdir.
1387# Double slashes in file names in object file debugging info
1388# mess up M-x gdb in Emacs.
1389case $srcdir in
1390*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1391esac
1392for ac_var in $ac_precious_vars; do
1393 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_env_${ac_var}_value=\$${ac_var}
1395 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1397done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399#
1400# Report the --help message.
1401#
1402if test "$ac_init_help" = "long"; then
1403 # Omit some internal or obsolete options to make the list less imposing.
1404 # This message is too long to be a string in the A/UX 3.1 sh.
1405 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001406\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408Usage: $0 [OPTION]... [VAR=VALUE]...
1409
1410To assign environment variables (e.g., CC, CFLAGS...), specify them as
1411VAR=VALUE. See below for descriptions of some of the useful variables.
1412
1413Defaults for the options are specified in brackets.
1414
1415Configuration:
1416 -h, --help display this help and exit
1417 --help=short display options specific to this package
1418 --help=recursive display the short help of all the included packages
1419 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001420 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --cache-file=FILE cache test results in FILE [disabled]
1422 -C, --config-cache alias for \`--cache-file=config.cache'
1423 -n, --no-create do not create output files
1424 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426Installation directories:
1427 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431
1432By default, \`make install' will install all the files in
1433\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1434an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1435for instance \`--prefix=\$HOME'.
1436
1437For better control, use the options below.
1438
1439Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 --bindir=DIR user executables [EPREFIX/bin]
1441 --sbindir=DIR system admin executables [EPREFIX/sbin]
1442 --libexecdir=DIR program executables [EPREFIX/libexec]
1443 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1444 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1445 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Antoine Pitroua6a4dc82017-09-07 18:56:24 +02001446 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --libdir=DIR object code libraries [EPREFIX/lib]
1448 --includedir=DIR C header files [PREFIX/include]
1449 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1450 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1451 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1452 --infodir=DIR info documentation [DATAROOTDIR/info]
1453 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1454 --mandir=DIR man documentation [DATAROOTDIR/man]
1455 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1456 --htmldir=DIR html documentation [DOCDIR]
1457 --dvidir=DIR dvi documentation [DOCDIR]
1458 --pdfdir=DIR pdf documentation [DOCDIR]
1459 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461
1462 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001463
1464System types:
1465 --build=BUILD configure for building on BUILD [guessed]
1466 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001467 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001468_ACEOF
1469fi
1470
1471if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001472 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001473 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 cat <<\_ACEOF
1476
1477Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1480 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001481 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001482 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-framework[=INSTALLDIR]
1484 Build (MacOSX|Darwin) framework
1485 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001486 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001487 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1488 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001489 --enable-loadable-sqlite-extensions
1490 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --enable-ipv6 Enable ipv6 (with ipv4) support
1492 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001493 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496Optional Packages:
1497 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1498 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001499 --with-universal-archs=ARCH
1500 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001501 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001502 --with-framework-name=FRAMEWORK
1503 specify an alternate name of the framework built
1504 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001506 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001507 --with-cxx-main=<compiler>
1508 compile main() and link python executable with C++
1509 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-suffix=.exe set executable suffix
1511 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001512 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001513 --with-lto Enable Link Time Optimization in any build. Disabled
1514 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001515 --with-hash-algorithm=[fnv|siphash24]
1516 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001517 --with-address-sanitizer
1518 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001520 --with-system-expat build pyexpat module using an installed expat
1521 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001522 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001523 --with-system-libmpdec build _decimal module using an installed libmpdec
1524 library
Ned Deilyd819b932013-09-06 01:07:05 -07001525 --with-tcltk-includes='-I...'
1526 override search for Tcl and Tk include files
1527 --with-tcltk-libs='-L...'
1528 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001529 --with-dbmliborder=db1:db2:...
1530 order to check db backends for dbm. Valid value is a
1531 colon separated string with the backend names
1532 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-doc-strings disable/enable documentation strings
1534 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001535 --with(out)-c-locale-coercion
1536 disable/enable C locale coercion to a UTF-8 based
1537 locale
1538 --with(out)-c-locale-warning
1539 disable/enable locale compatibility warning in the C
1540 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001541 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001542 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001543 --with-fpectl enable SIGFPE catching
1544 --with-libm=STRING math library
1545 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001546 --with(out)-computed-gotos
1547 Use computed gotos in evaluation loop (enabled by
1548 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001549 --with(out)-ensurepip=[=upgrade]
1550 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001634python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily4829bc62016-09-12 17:29:04 -04002343It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002693if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694 # If we're building out-of-tree, we need to make sure the following
2695 # resources get picked up before their $srcdir counterparts.
2696 # Objects/ -> typeslots.inc
2697 # Include/ -> Python-ast.h, graminit.h
2698 # Python/ -> importlib.h
2699 # (A side effect of this is that these resources will automatically be
2700 # regenerated when building out-of-tree, regardless of whether or not
2701 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2702 # off.)
2703 BASECPPFLAGS="-IObjects -IInclude -IPython"
2704else
2705 BASECPPFLAGS=""
2706fi
2707
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708
2709
2710
2711
Victor Stinner9ed34a82017-05-02 22:35:58 +02002712if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002714# Extract the first word of "git", so it can be a program name with args.
2715set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2717$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719 $as_echo_n "(cached) " >&6
2720else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721 if test -n "$HAS_GIT"; then
2722 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723else
2724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2725for as_dir in $PATH
2726do
2727 IFS=$as_save_IFS
2728 test -z "$as_dir" && as_dir=.
2729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2733 break 2
2734 fi
2735done
2736 done
2737IFS=$as_save_IFS
2738
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002740fi
2741fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742HAS_GIT=$ac_cv_prog_HAS_GIT
2743if test -n "$HAS_GIT"; then
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2745$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748$as_echo "no" >&6; }
2749fi
2750
2751
2752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Ned Deily554626a2017-03-20 23:41:52 -04002757 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2758 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761 GITVERSION=""
2762 GITTAG=""
2763 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
2765
2766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
2769
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002770ac_aux_dir=
2771for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2772 if test -f "$ac_dir/install-sh"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/install-sh -c"
2775 break
2776 elif test -f "$ac_dir/install.sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install.sh -c"
2779 break
2780 elif test -f "$ac_dir/shtool"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/shtool install -c"
2783 break
2784 fi
2785done
2786if test -z "$ac_aux_dir"; then
2787 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2788fi
2789
2790# These three variables are undocumented and unsupported,
2791# and are intended to be withdrawn in a future Autoconf release.
2792# They can cause serious problems if a builder's source tree is in a directory
2793# whose full name contains unusual characters.
2794ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2795ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2796ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2797
2798
2799# Make sure we can run config.sub.
2800$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2801 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2802
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2804$as_echo_n "checking build system type... " >&6; }
2805if ${ac_cv_build+:} false; then :
2806 $as_echo_n "(cached) " >&6
2807else
2808 ac_build_alias=$build_alias
2809test "x$ac_build_alias" = x &&
2810 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2811test "x$ac_build_alias" = x &&
2812 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2813ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2814 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2815
2816fi
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2818$as_echo "$ac_cv_build" >&6; }
2819case $ac_cv_build in
2820*-*-*) ;;
2821*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2822esac
2823build=$ac_cv_build
2824ac_save_IFS=$IFS; IFS='-'
2825set x $ac_cv_build
2826shift
2827build_cpu=$1
2828build_vendor=$2
2829shift; shift
2830# Remember, the first character of IFS is used to create $*,
2831# except with old shells:
2832build_os=$*
2833IFS=$ac_save_IFS
2834case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2835
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2838$as_echo_n "checking host system type... " >&6; }
2839if ${ac_cv_host+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 if test "x$host_alias" = x; then
2843 ac_cv_host=$ac_cv_build
2844else
2845 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2847fi
2848
2849fi
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2851$as_echo "$ac_cv_host" >&6; }
2852case $ac_cv_host in
2853*-*-*) ;;
2854*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2855esac
2856host=$ac_cv_host
2857ac_save_IFS=$IFS; IFS='-'
2858set x $ac_cv_host
2859shift
2860host_cpu=$1
2861host_vendor=$2
2862shift; shift
2863# Remember, the first character of IFS is used to create $*,
2864# except with old shells:
2865host_os=$*
2866IFS=$ac_save_IFS
2867case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2868
2869
2870
doko@python.orga10e4a92013-01-25 18:45:12 +01002871
2872
Ned Deilyfcbc2462014-08-22 13:32:49 -07002873# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2874rm -f pybuilddir.txt
2875
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002876for ac_prog in python$PACKAGE_VERSION python3 python
2877do
2878 # Extract the first word of "$ac_prog", so it can be a program name with args.
2879set dummy $ac_prog; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002883 $as_echo_n "(cached) " >&6
2884else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885 if test -n "$PYTHON_FOR_REGEN"; then
2886 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2897 break 2
2898 fi
2899done
2900 done
2901IFS=$as_save_IFS
2902
2903fi
2904fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2906if test -n "$PYTHON_FOR_REGEN"; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2908$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
2912fi
2913
2914
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002937 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 +02002938 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002939elif test "$cross_compiling" = maybe; then
2940 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941else
2942 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2943fi
2944
2945
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Benjamin Petersond23f8222009-04-05 19:13:16 +00002947if test "$prefix" != "/"; then
2948 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2949fi
2950
2951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
2953
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002954# We don't use PACKAGE_ variables, and they cause conflicts
2955# with other autoconf-based packages that include Python.h
2956grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2957rm confdefs.h
2958mv confdefs.h.new confdefs.h
2959
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002960
Ned Deily4829bc62016-09-12 17:29:04 -04002961VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002962
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002963# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002964
2965SOVERSION=1.0
2966
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002967# The later defininition of _XOPEN_SOURCE disables certain features
2968# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2969
Matthias Kloseb9621712010-04-24 17:59:49 +00002970$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971
2972
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2974# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2975# them.
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978
2979
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985
2986
Martin v. Löwisd6320502004-08-12 13:45:08 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002988# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992
2993
2994
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002995define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002996
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002997# Arguments passed to configure.
2998
2999CONFIG_ARGS="$ac_configure_args"
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3002$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003004if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003005 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003006 case $enableval in
3007 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003008 # Locate the best usable SDK, see Mac/README.txt for more
3009 # information
3010 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003011 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003012 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3014 if test ! -d "${enableval}"
3015 then
3016 enableval=/
3017 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 ;;
3020 esac
3021 case $enableval in
3022 no)
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025 ;;
3026 *)
3027 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 if test ! -d "${UNIVERSALSDK}"
3029 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003030 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003034
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036else
3037
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043if test -n "${UNIVERSALSDK}"
3044then
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3046$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047else
Matthias Kloseb9621712010-04-24 17:59:49 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3049$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deily87adb6e2013-10-18 21:09:56 -07003054ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003055
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056# For backward compatibility reasons we prefer to select '32-bit' if available,
3057# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003058UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059if test "`uname -s`" = "Darwin"
3060then
3061 if test -n "${UNIVERSALSDK}"
3062 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003063 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 then
3065 UNIVERSAL_ARCHS="intel"
3066 fi
3067 fi
3068fi
3069
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003070
Matthias Kloseb9621712010-04-24 17:59:49 +00003071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3072$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073
3074# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003075if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077 UNIVERSAL_ARCHS="$withval"
3078
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079fi
3080
Ned Deily87adb6e2013-10-18 21:09:56 -07003081if test -n "${UNIVERSALSDK}"
3082then
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3084$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3085else
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3087$as_echo "no" >&6; }
3088fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090
3091# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003093 withval=$with_framework_name;
3094 PYTHONFRAMEWORK=${withval}
3095 PYTHONFRAMEWORKDIR=${withval}.framework
3096 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3097
3098else
3099
3100 PYTHONFRAMEWORK=Python
3101 PYTHONFRAMEWORKDIR=Python.framework
3102 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3103
3104fi
3105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003109 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003110 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003111 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003112 esac
3113 case $enableval in
3114 no)
3115 PYTHONFRAMEWORK=
3116 PYTHONFRAMEWORKDIR=no-framework
3117 PYTHONFRAMEWORKPREFIX=
3118 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119 FRAMEWORKINSTALLFIRST=
3120 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 FRAMEWORKALTINSTALLFIRST=
3122 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003123 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 if test "x${prefix}" = "xNONE"; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3126 else
3127 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3128 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003129 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003130 ;;
3131 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003132 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003135 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003136 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3137 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003139 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 if test "x${prefix}" = "xNONE" ; then
3142 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
3148 case "${enableval}" in
3149 /System*)
3150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3151 if test "${prefix}" = "NONE" ; then
3152 # See below
3153 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3154 fi
3155 ;;
3156
3157 /Library*)
3158 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3159 ;;
3160
3161 */Library/Frameworks)
3162 MDIR="`dirname "${enableval}"`"
3163 MDIR="`dirname "${MDIR}"`"
3164 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3165
3166 if test "${prefix}" = "NONE"; then
3167 # User hasn't specified the
3168 # --prefix option, but wants to install
3169 # the framework in a non-default location,
3170 # ensure that the compatibility links get
3171 # installed relative to that prefix as well
3172 # instead of in /usr/local.
3173 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3174 fi
3175 ;;
3176
3177 *)
3178 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3179 ;;
3180 esac
3181
Jack Jansen127e56e2001-09-11 14:41:54 +00003182 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003184 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003190 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3191
3192 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3193
Jack Jansene578a632001-08-15 01:27:14 +00003194 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Guido van Rossum563e7081996-09-10 18:20:48 +00003196else
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003199 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003200 PYTHONFRAMEWORKPREFIX=
3201 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 FRAMEWORKINSTALLFIRST=
3203 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 FRAMEWORKALTINSTALLFIRST=
3205 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003206 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 if test "x${prefix}" = "xNONE" ; then
3208 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3209 else
3210 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3211 fi
Jack Jansene578a632001-08-15 01:27:14 +00003212 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003213
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215fi
3216
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217
3218
Michael W. Hudson54241132001-12-07 15:38:26 +00003219
3220
3221
3222
Jack Jansene578a632001-08-15 01:27:14 +00003223
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003224
3225
3226
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003228
Ned Deilyb8f944f2013-11-21 22:42:25 -08003229
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230
3231cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003232#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003233_ACEOF
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003237## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003238## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003239##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003240# Set name for machine-dependent library files
3241
Matthias Kloseb9621712010-04-24 17:59:49 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3243$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244if test -z "$MACHDEP"
3245then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003246 # avoid using uname for cross builds
3247 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003248 # ac_sys_system and ac_sys_release are used for setting
3249 # a lot of different things including 'define_xopen_source'
3250 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003251 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003252 *-*-linux-android*)
3253 ac_sys_system=Linux-android
3254 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 *-*-linux*)
3256 ac_sys_system=Linux
3257 ;;
3258 *-*-cygwin*)
3259 ac_sys_system=Cygwin
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3265 esac
3266 ac_sys_release=
3267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003269 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003270 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003275 fi
3276 ac_md_system=`echo $ac_sys_system |
3277 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3278 ac_md_release=`echo $ac_sys_release |
3279 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3280 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003281
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003283 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003284 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003285 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003286 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288fi
Guido van Rossum91922671997-10-09 20:24:13 +00003289
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003290
3291if test "$cross_compiling" = yes; then
3292 case "$host" in
3293 *-*-linux*)
3294 case "$host_cpu" in
3295 arm*)
3296 _host_cpu=arm
3297 ;;
3298 *)
3299 _host_cpu=$host_cpu
3300 esac
3301 ;;
3302 *-*-cygwin*)
3303 _host_cpu=
3304 ;;
3305 *)
3306 # for now, limit cross builds to known configurations
3307 MACHDEP="unknown"
3308 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3309 esac
3310 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3311fi
3312
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003313# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3314# disable features if it is defined, without any means to access these
3315# features as extensions. For these systems, we skip the definition of
3316# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3317# some feature, make sure there is no alternative way to access this
3318# feature. Also, when using wildcards, make sure you have verified the
3319# need for not defining _XOPEN_SOURCE on all systems matching the
3320# wildcard, and that the wildcard does not include future systems
3321# (which may remove their limitations).
3322case $ac_sys_system/$ac_sys_release in
3323 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3324 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003325 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003326 # In addition, Stefan Krah confirms that issue #1244610 exists through
3327 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003328 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003329 define_xopen_source=no
3330 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3331 # also defined. This can be overridden by defining _BSD_SOURCE
3332 # As this has a different meaning on Linux, only define it on OpenBSD
3333
Matthias Kloseb9621712010-04-24 17:59:49 +00003334$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003335
3336 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003338 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3339 # also defined. This can be overridden by defining _BSD_SOURCE
3340 # As this has a different meaning on Linux, only define it on OpenBSD
3341
Matthias Kloseb9621712010-04-24 17:59:49 +00003342$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003343
3344 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003345 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3346 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3347 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003348 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 +00003349 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003350 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3351 # request to enable features supported by the standard as a request
3352 # to disable features not supported by the standard. The best way
3353 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3354 # entirely and define __EXTENSIONS__ instead.
3355 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003356 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003357 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3358 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003359 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003360 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 define_xopen_source=no;;
3362 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003363 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003366 # On FreeBSD 4, the math functions C89 does not cover are never defined
3367 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3368 FreeBSD/4.*)
3369 define_xopen_source=no;;
3370 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3371 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3372 # identifies itself as Darwin/7.*
3373 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3374 # disables platform specific features beyond repair.
3375 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # has no effect, don't bother defining them
3377 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003378 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003379 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003380 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003381 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3382 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3383 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003384 AIX/4)
3385 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003386 AIX/5)
3387 if test `uname -r` -eq 1; then
3388 define_xopen_source=no
3389 fi
3390 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003391 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3392 # defining NI_NUMERICHOST.
3393 QNX/6.3.2)
3394 define_xopen_source=no
3395 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003396
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003397esac
3398
3399if test $define_xopen_source = yes
3400then
Victor Stinner14d098d2011-09-07 22:29:43 +02003401 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
Victor Stinner14d098d2011-09-07 22:29:43 +02003403$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
3406 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3407 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3408 # several APIs are not declared. Since this is also needed in some
3409 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Matthias Kloseb9621712010-04-24 17:59:49 +00003411$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
3413
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003414
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003415$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003417fi
3418
Christian Heimes647cd872013-12-07 23:39:33 +01003419# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3420case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003421 hp*|HP*)
3422 define_stdc_a1=yes;;
3423 *)
3424 define_stdc_a1=no;;
3425esac
3426
3427if test $define_stdc_a1 = yes
3428then
Christian Heimes647cd872013-12-07 23:39:33 +01003429
3430$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3431
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432fi
Christian Heimes647cd872013-12-07 23:39:33 +01003433
Jack Jansen6b08a402004-06-03 12:41:45 +00003434# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3435# it may influence the way we can build extensions, so distutils
3436# needs to check it
3437
Thomas Wouters477c8d52006-05-27 19:21:47 +00003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003440EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003441
Guido van Rossum627b2d71993-12-24 10:39:16 +00003442# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003443
3444# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3445# for debug/optimization stuff. BASECFLAGS is for flags that are required
3446# just to get things to compile and link. Users are free to override OPT
3447# when running configure or make. The build should not break if they do.
3448# BASECFLAGS should generally not be messed with, however.
3449
3450# XXX shouldn't some/most/all of this code be merged with the stuff later
3451# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3453$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003456if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003458 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003459 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003460 without_gcc=yes;;
3461 yes) CC=gcc
3462 without_gcc=no;;
3463 *) CC=$withval
3464 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003465 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003466else
Martin v. Löwis11437992002-04-12 09:54:03 +00003467
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003468 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003469 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003470 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003471 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003472 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473fi
3474
Matthias Kloseb9621712010-04-24 17:59:49 +00003475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3476$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003477
Zachary Ware5af85642015-12-21 12:09:17 -06003478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3479$as_echo_n "checking for --with-icc... " >&6; }
3480
3481# Check whether --with-icc was given.
3482if test "${with_icc+set}" = set; then :
3483 withval=$with_icc;
3484 case $withval in
3485 no) CC=${CC:-cc}
3486 with_icc=no;;
3487 yes) CC=icc
3488 CXX=icpc
3489 with_icc=yes;;
3490 *) CC=$withval
3491 with_icc=$withval;;
3492 esac
3493else
3494
3495 with_icc=no
3496fi
3497
3498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3499$as_echo "$with_icc" >&6; }
3500
Guido van Rossum8b131c51995-03-09 14:10:13 +00003501# If the user switches compilers, we can't believe the cache
3502if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3503then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003504 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003505(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003506fi
3507
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003508# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3509# when the compiler supports them, but we don't always want -O2, and
3510# we set -g later.
3511if test -z "$CFLAGS"; then
3512 CFLAGS=
3513fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003514
3515if test "$ac_sys_system" = "Darwin"
3516then
3517 # Compiler selection on MacOSX is more complicated than
3518 # AC_PROG_CC can handle, see Mac/README.txt for more
3519 # information
3520 if test -z "${CC}"
3521 then
3522 found_gcc=
3523 found_clang=
3524 as_save_IFS=$IFS; IFS=:
3525 for as_dir in $PATH
3526 do
3527 IFS=$as_save_IFS
3528 if test -x $as_dir/gcc; then
3529 if test -z "${found_gcc}"; then
3530 found_gcc=$as_dir/gcc
3531 fi
3532 fi
3533 if test -x $as_dir/clang; then
3534 if test -z "${found_clang}"; then
3535 found_clang=$as_dir/clang
3536 fi
3537 fi
3538 done
3539 IFS=$as_save_IFS
3540
3541 if test -n "$found_gcc" -a -n "$found_clang"
3542 then
3543 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3544 then
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3546$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3547 CC="$found_clang"
3548 CXX="$found_clang++"
3549 fi
3550
3551
3552 elif test -z "$found_gcc" -a -n "$found_clang"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3555$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3556 CC="$found_clang"
3557 CXX="$found_clang++"
3558
3559 elif test -z "$found_gcc" -a -z "$found_clang"
3560 then
3561 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3562 if test -n "${found_clang}"
3563 then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3565$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3566 CC="${found_clang}"
3567 CXX="`/usr/bin/xcrun -find clang++`"
3568
3569 # else: use default behaviour
3570 fi
3571 fi
3572 fi
3573fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003574ac_ext=c
3575ac_cpp='$CPP $CPPFLAGS'
3576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3578ac_compiler_gnu=$ac_cv_c_compiler_gnu
3579if test -n "$ac_tool_prefix"; then
3580 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3581set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3583$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003584if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003586else
3587 if test -n "$CC"; then
3588 ac_cv_prog_CC="$CC" # Let the user override the test.
3589else
Martin v. Löwis11437992002-04-12 09:54:03 +00003590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3591for as_dir in $PATH
3592do
3593 IFS=$as_save_IFS
3594 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 $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 +00003599 break 2
3600 fi
3601done
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003604
Jack Jansendd19cf82001-12-06 22:36:17 +00003605fi
3606fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003607CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003608if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3610$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003611else
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003614fi
3615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616
Martin v. Löwis11437992002-04-12 09:54:03 +00003617fi
3618if test -z "$ac_cv_prog_CC"; then
3619 ac_ct_CC=$CC
3620 # Extract the first word of "gcc", so it can be a program name with args.
3621set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3623$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003624if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003626else
3627 if test -n "$ac_ct_CC"; then
3628 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3629else
3630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3631for as_dir in $PATH
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $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 +00003639 break 2
3640 fi
3641done
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003644
3645fi
3646fi
3647ac_ct_CC=$ac_cv_prog_ac_ct_CC
3648if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3650$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651else
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003654fi
3655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 if test "x$ac_ct_CC" = x; then
3657 CC=""
3658 else
3659 case $cross_compiling:$ac_tool_warned in
3660yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003661{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3662$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663ac_tool_warned=yes ;;
3664esac
3665 CC=$ac_ct_CC
3666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
3668 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003669fi
3670
Jack Jansendd19cf82001-12-06 22:36:17 +00003671if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 if test -n "$ac_tool_prefix"; then
3673 # 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 +00003674set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3676$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003677if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003679else
3680 if test -n "$CC"; then
3681 ac_cv_prog_CC="$CC" # Let the user override the test.
3682else
Martin v. Löwis11437992002-04-12 09:54:03 +00003683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $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 +00003692 break 2
3693 fi
3694done
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
3698fi
3699fi
3700CC=$ac_cv_prog_CC
3701if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3703$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003704else
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3706$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003709
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711fi
3712if test -z "$CC"; then
3713 # Extract the first word of "cc", so it can be a program name with args.
3714set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3716$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003717if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003719else
3720 if test -n "$CC"; then
3721 ac_cv_prog_CC="$CC" # Let the user override the test.
3722else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3732 ac_prog_rejected=yes
3733 continue
3734 fi
3735 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743if test $ac_prog_rejected = yes; then
3744 # We found a bogon in the path, so make sure we never use it.
3745 set dummy $ac_cv_prog_CC
3746 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 # We chose a different compiler from the bogus one.
3749 # However, it has the same basename, so the bogon will be chosen
3750 # first if we set CC to just the basename; use the full file name.
3751 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003752 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 fi
3754fi
3755fi
3756fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003757CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3760$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761else
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3763$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764fi
3765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767fi
3768if test -z "$CC"; then
3769 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 do
3772 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3775$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003776if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003778else
3779 if test -n "$CC"; then
3780 ac_cv_prog_CC="$CC" # Let the user override the test.
3781else
Martin v. Löwis11437992002-04-12 09:54:03 +00003782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785 IFS=$as_save_IFS
3786 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 $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 +00003791 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793done
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
3797fi
3798fi
3799CC=$ac_cv_prog_CC
3800if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3802$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003803else
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003806fi
3807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 test -n "$CC" && break
3810 done
3811fi
3812if test -z "$CC"; then
3813 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003815do
3816 # Extract the first word of "$ac_prog", so it can be a program name with args.
3817set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003820if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003822else
3823 if test -n "$ac_ct_CC"; then
3824 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3825else
3826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827for as_dir in $PATH
3828do
3829 IFS=$as_save_IFS
3830 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 $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 +00003835 break 2
3836 fi
3837done
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
3842fi
3843ac_ct_CC=$ac_cv_prog_ac_ct_CC
3844if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3846$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003847else
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853 test -n "$ac_ct_CC" && break
3854done
Michael W. Hudson54241132001-12-07 15:38:26 +00003855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856 if test "x$ac_ct_CC" = x; then
3857 CC=""
3858 else
3859 case $cross_compiling:$ac_tool_warned in
3860yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863ac_tool_warned=yes ;;
3864esac
3865 CC=$ac_ct_CC
3866 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868
3869fi
3870
3871
Matthias Kloseb9621712010-04-24 17:59:49 +00003872test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003874as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003875See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
3877# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3879set X $ac_compile
3880ac_compiler=$2
3881for ac_option in --version -v -V -qversion; do
3882 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
3889 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003890 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 if test -s conftest.err; then
3892 sed '10a\
3893... rest of stderr output deleted ...
3894 10q' conftest.err >conftest.er1
3895 cat conftest.er1 >&5
3896 fi
3897 rm -f conftest.er1 conftest.err
3898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }
3900done
Martin v. Löwis11437992002-04-12 09:54:03 +00003901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003903/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003904
Martin v. Löwis11437992002-04-12 09:54:03 +00003905int
3906main ()
3907{
3908
3909 ;
3910 return 0;
3911}
3912_ACEOF
3913ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003914ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003915# Try to create an executable without -o first, disregard a.out.
3916# It will help us diagnose broken compilers, and finding out an intuition
3917# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3919$as_echo_n "checking whether the C compiler works... " >&6; }
3920ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3921
3922# The possible output files:
3923ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925ac_rmfiles=
3926for ac_file in $ac_files
3927do
3928 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3931 esac
3932done
3933rm -f $ac_rmfiles
3934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3941$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3945 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3947# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3948# in a Makefile. We should not override ac_cv_exeext if it was cached,
3949# so that the user can short-circuit this test for compilers unknown to
3950# Autoconf.
3951for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003952do
3953 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956 ;;
3957 [ab].out )
3958 # We found the default executable, but exeext='' is most
3959 # certainly right.
3960 break;;
3961 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 then :; else
3964 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3965 fi
3966 # We set ac_cv_exeext here because the later test for it is not
3967 # safe: cross compilers may not add the suffix if given an `-o'
3968 # argument, so we may need to know it at that point already.
3969 # Even if this section looks crufty: it has the advantage of
3970 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 break;;
3972 * )
3973 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003974 esac
3975done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976test "$ac_cv_exeext" = no && ac_cv_exeext=
3977
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003978else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979 ac_file=''
3980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003981if test -z "$ac_file"; then :
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
3984$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003985sed 's/^/| /' conftest.$ac_ext >&5
3986
Matthias Kloseb9621712010-04-24 17:59:49 +00003987{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003989as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003990See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003991else
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3993$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3996$as_echo_n "checking for C compiler default output file name... " >&6; }
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3998$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000
Matthias Kloseb9621712010-04-24 17:59:49 +00004001rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4004$as_echo_n "checking for suffix of executables... " >&6; }
4005if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006case "(($ac_try" in
4007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4008 *) ac_try_echo=$ac_try;;
4009esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004010eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4011$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004012 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004013 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004014 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4015 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4017# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4018# work properly (i.e., refer to `conftest.exe'), while it won't with
4019# `rm'.
4020for ac_file in conftest.exe conftest conftest.*; do
4021 test -f "$ac_file" || continue
4022 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4025 break;;
4026 * ) break;;
4027 esac
4028done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004029else
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004035rm -f conftest conftest$ac_cv_exeext
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4037$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004038
4039rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004040EXEEXT=$ac_cv_exeext
4041ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4043/* end confdefs.h. */
4044#include <stdio.h>
4045int
4046main ()
4047{
4048FILE *f = fopen ("conftest.out", "w");
4049 return ferror (f) || fclose (f) != 0;
4050
4051 ;
4052 return 0;
4053}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004055ac_clean_files="$ac_clean_files conftest.out"
4056# Check that the compiler produces executables we can run. If not, either
4057# the compiler is broken, or we cross compile.
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4059$as_echo_n "checking whether we are cross compiling... " >&6; }
4060if test "$cross_compiling" != yes; then
4061 { { ac_try="$ac_link"
4062case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
4066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4067$as_echo "$ac_try_echo"; } >&5
4068 (eval "$ac_link") 2>&5
4069 ac_status=$?
4070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4071 test $ac_status = 0; }
4072 if { ac_try='./conftest$ac_cv_exeext'
4073 { { case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
4077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
4079 (eval "$ac_try") 2>&5
4080 ac_status=$?
4081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; }; then
4083 cross_compiling=no
4084 else
4085 if test "$cross_compiling" = maybe; then
4086 cross_compiling=yes
4087 else
4088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004090as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004091If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004092See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 fi
4094 fi
4095fi
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4097$as_echo "$cross_compiling" >&6; }
4098
4099rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4100ac_clean_files=$ac_clean_files_save
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4102$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004103if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo_n "(cached) " >&6
4105else
4106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004107/* end confdefs.h. */
4108
4109int
4110main ()
4111{
4112
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004118if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119case "(($ac_try" in
4120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4121 *) ac_try_echo=$ac_try;;
4122esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004123eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4124$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4128 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129 for ac_file in conftest.o conftest.obj conftest.*; do
4130 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004133 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4134 break;;
4135 esac
4136done
4137else
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004139sed 's/^/| /' conftest.$ac_ext >&5
4140
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004143as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004144See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4149$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004150OBJEXT=$ac_cv_objext
4151ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4153$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004154if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004156else
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160int
4161main ()
4162{
4163#ifndef __GNUC__
4164 choke me
4165#endif
4166
4167 ;
4168 return 0;
4169}
4170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 ac_compiler_gnu=yes
4173else
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004177ac_cv_c_compiler_gnu=$ac_compiler_gnu
4178
4179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4181$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4182if test $ac_compiler_gnu = yes; then
4183 GCC=yes
4184else
4185 GCC=
4186fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004187ac_test_CFLAGS=${CFLAGS+set}
4188ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4190$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004191if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004193else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 ac_save_c_werror_flag=$ac_c_werror_flag
4195 ac_c_werror_flag=yes
4196 ac_cv_prog_cc_g=no
4197 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004200
Martin v. Löwis11437992002-04-12 09:54:03 +00004201int
4202main ()
4203{
4204
4205 ;
4206 return 0;
4207}
4208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211else
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 CFLAGS=""
4213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214/* end confdefs.h. */
4215
4216int
4217main ()
4218{
4219
4220 ;
4221 return 0;
4222}
4223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004224if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225
Matthias Kloseb9621712010-04-24 17:59:49 +00004226else
4227 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230/* end confdefs.h. */
4231
4232int
4233main ()
4234{
4235
4236 ;
4237 return 0;
4238}
4239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004240if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_c_werror_flag=$ac_save_c_werror_flag
4249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4251$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004253 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254elif test $ac_cv_prog_cc_g = yes; then
4255 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004256 CFLAGS="-g -O2"
4257 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004258 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259 fi
4260else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261 if test "$GCC" = yes; then
4262 CFLAGS="-O2"
4263 else
4264 CFLAGS=
4265 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4268$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004269if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004270 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004271else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004273ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
4276#include <stdarg.h>
4277#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004278struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4280struct buf { int x; };
4281FILE * (*rcsopen) (struct buf *, struct stat *, int);
4282static char *e (p, i)
4283 char **p;
4284 int i;
4285{
4286 return p[i];
4287}
4288static char *f (char * (*g) (char **, int), char **p, ...)
4289{
4290 char *s;
4291 va_list v;
4292 va_start (v,p);
4293 s = g (p, va_arg (v,int));
4294 va_end (v);
4295 return s;
4296}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297
4298/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4299 function prototypes and stuff, but not '\xHH' hex character constants.
4300 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004302 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4303 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4308 inside strings and character constants. */
4309#define FOO(x) 'x'
4310int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4311
Skip Montanaro6dead952003-09-25 14:50:04 +00004312int test (int i, double x);
4313struct s1 {int (*f) (int a);};
4314struct s2 {int (*f) (double a);};
4315int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4316int argc;
4317char **argv;
4318int
4319main ()
4320{
4321return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4322 ;
4323 return 0;
4324}
4325_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4327 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004328do
4329 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333rm -f core conftest.err conftest.$ac_objext
4334 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004335done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004337CC=$ac_save_CC
4338
4339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340# AC_CACHE_VAL
4341case "x$ac_cv_prog_cc_c89" in
4342 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4344$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4347$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4351$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004352esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004353if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Matthias Kloseb9621712010-04-24 17:59:49 +00004355fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004356
Martin v. Löwis11437992002-04-12 09:54:03 +00004357ac_ext=c
4358ac_cpp='$CPP $CPPFLAGS'
4359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4361ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004363ac_ext=c
4364ac_cpp='$CPP $CPPFLAGS'
4365ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4366ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4367ac_compiler_gnu=$ac_cv_c_compiler_gnu
4368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4369$as_echo_n "checking how to run the C preprocessor... " >&6; }
4370# On Suns, sometimes $CPP names a directory.
4371if test -n "$CPP" && test -d "$CPP"; then
4372 CPP=
4373fi
4374if test -z "$CPP"; then
4375 if ${ac_cv_prog_CPP+:} false; then :
4376 $as_echo_n "(cached) " >&6
4377else
4378 # Double quotes because CPP needs to be expanded
4379 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4380 do
4381 ac_preproc_ok=false
4382for ac_c_preproc_warn_flag in '' yes
4383do
4384 # Use a header file that comes with gcc, so configuring glibc
4385 # with a fresh cross-compiler works.
4386 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4387 # <limits.h> exists even on freestanding compilers.
4388 # On the NeXT, cc -E runs the code through the compiler's parser,
4389 # not just through cpp. "Syntax error" is here to catch this case.
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391/* end confdefs.h. */
4392#ifdef __STDC__
4393# include <limits.h>
4394#else
4395# include <assert.h>
4396#endif
4397 Syntax error
4398_ACEOF
4399if ac_fn_c_try_cpp "$LINENO"; then :
4400
4401else
4402 # Broken: fails on valid input.
4403continue
4404fi
4405rm -f conftest.err conftest.i conftest.$ac_ext
4406
4407 # OK, works on sane cases. Now check whether nonexistent headers
4408 # can be detected and how.
4409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h. */
4411#include <ac_nonexistent.h>
4412_ACEOF
4413if ac_fn_c_try_cpp "$LINENO"; then :
4414 # Broken: success on invalid input.
4415continue
4416else
4417 # Passes both tests.
4418ac_preproc_ok=:
4419break
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423done
4424# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4425rm -f conftest.i conftest.err conftest.$ac_ext
4426if $ac_preproc_ok; then :
4427 break
4428fi
4429
4430 done
4431 ac_cv_prog_CPP=$CPP
4432
4433fi
4434 CPP=$ac_cv_prog_CPP
4435else
4436 ac_cv_prog_CPP=$CPP
4437fi
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4439$as_echo "$CPP" >&6; }
4440ac_preproc_ok=false
4441for ac_c_preproc_warn_flag in '' yes
4442do
4443 # Use a header file that comes with gcc, so configuring glibc
4444 # with a fresh cross-compiler works.
4445 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4446 # <limits.h> exists even on freestanding compilers.
4447 # On the NeXT, cc -E runs the code through the compiler's parser,
4448 # not just through cpp. "Syntax error" is here to catch this case.
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450/* end confdefs.h. */
4451#ifdef __STDC__
4452# include <limits.h>
4453#else
4454# include <assert.h>
4455#endif
4456 Syntax error
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459
4460else
4461 # Broken: fails on valid input.
4462continue
4463fi
4464rm -f conftest.err conftest.i conftest.$ac_ext
4465
4466 # OK, works on sane cases. Now check whether nonexistent headers
4467 # can be detected and how.
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469/* end confdefs.h. */
4470#include <ac_nonexistent.h>
4471_ACEOF
4472if ac_fn_c_try_cpp "$LINENO"; then :
4473 # Broken: success on invalid input.
4474continue
4475else
4476 # Passes both tests.
4477ac_preproc_ok=:
4478break
4479fi
4480rm -f conftest.err conftest.i conftest.$ac_ext
4481
4482done
4483# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4484rm -f conftest.i conftest.err conftest.$ac_ext
4485if $ac_preproc_ok; then :
4486
4487else
4488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4490as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4491See \`config.log' for more details" "$LINENO" 5; }
4492fi
4493
4494ac_ext=c
4495ac_cpp='$CPP $CPPFLAGS'
4496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4498ac_compiler_gnu=$ac_cv_c_compiler_gnu
4499
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4501$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4502if ${ac_cv_path_GREP+:} false; then :
4503 $as_echo_n "(cached) " >&6
4504else
4505 if test -z "$GREP"; then
4506 ac_path_GREP_found=false
4507 # Loop through the user's path and test for each of PROGNAME-LIST
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
4513 for ac_prog in grep ggrep; do
4514 for ac_exec_ext in '' $ac_executable_extensions; do
4515 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4516 as_fn_executable_p "$ac_path_GREP" || continue
4517# Check for GNU ac_path_GREP and select it if it is found.
4518 # Check for GNU $ac_path_GREP
4519case `"$ac_path_GREP" --version 2>&1` in
4520*GNU*)
4521 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4522*)
4523 ac_count=0
4524 $as_echo_n 0123456789 >"conftest.in"
4525 while :
4526 do
4527 cat "conftest.in" "conftest.in" >"conftest.tmp"
4528 mv "conftest.tmp" "conftest.in"
4529 cp "conftest.in" "conftest.nl"
4530 $as_echo 'GREP' >> "conftest.nl"
4531 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4532 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4533 as_fn_arith $ac_count + 1 && ac_count=$as_val
4534 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4535 # Best one so far, save it but keep looking for a better one
4536 ac_cv_path_GREP="$ac_path_GREP"
4537 ac_path_GREP_max=$ac_count
4538 fi
4539 # 10*(2^10) chars as input seems more than enough
4540 test $ac_count -gt 10 && break
4541 done
4542 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4543esac
4544
4545 $ac_path_GREP_found && break 3
4546 done
4547 done
4548 done
4549IFS=$as_save_IFS
4550 if test -z "$ac_cv_path_GREP"; then
4551 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4552 fi
4553else
4554 ac_cv_path_GREP=$GREP
4555fi
4556
4557fi
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4559$as_echo "$ac_cv_path_GREP" >&6; }
4560 GREP="$ac_cv_path_GREP"
4561
4562
Łukasz Langaa785c872016-09-09 17:37:37 -07004563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4564$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4565if ${ac_cv_path_SED+:} false; then :
4566 $as_echo_n "(cached) " >&6
4567else
4568 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4569 for ac_i in 1 2 3 4 5 6 7; do
4570 ac_script="$ac_script$as_nl$ac_script"
4571 done
4572 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4573 { ac_script=; unset ac_script;}
4574 if test -z "$SED"; then
4575 ac_path_SED_found=false
4576 # Loop through the user's path and test for each of PROGNAME-LIST
4577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580 IFS=$as_save_IFS
4581 test -z "$as_dir" && as_dir=.
4582 for ac_prog in sed gsed; do
4583 for ac_exec_ext in '' $ac_executable_extensions; do
4584 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4585 as_fn_executable_p "$ac_path_SED" || continue
4586# Check for GNU ac_path_SED and select it if it is found.
4587 # Check for GNU $ac_path_SED
4588case `"$ac_path_SED" --version 2>&1` in
4589*GNU*)
4590 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4591*)
4592 ac_count=0
4593 $as_echo_n 0123456789 >"conftest.in"
4594 while :
4595 do
4596 cat "conftest.in" "conftest.in" >"conftest.tmp"
4597 mv "conftest.tmp" "conftest.in"
4598 cp "conftest.in" "conftest.nl"
4599 $as_echo '' >> "conftest.nl"
4600 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4601 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4602 as_fn_arith $ac_count + 1 && ac_count=$as_val
4603 if test $ac_count -gt ${ac_path_SED_max-0}; then
4604 # Best one so far, save it but keep looking for a better one
4605 ac_cv_path_SED="$ac_path_SED"
4606 ac_path_SED_max=$ac_count
4607 fi
4608 # 10*(2^10) chars as input seems more than enough
4609 test $ac_count -gt 10 && break
4610 done
4611 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4612esac
4613
4614 $ac_path_SED_found && break 3
4615 done
4616 done
4617 done
4618IFS=$as_save_IFS
4619 if test -z "$ac_cv_path_SED"; then
4620 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4621 fi
4622else
4623 ac_cv_path_SED=$SED
4624fi
4625
4626fi
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4628$as_echo "$ac_cv_path_SED" >&6; }
4629 SED="$ac_cv_path_SED"
4630 rm -f conftest.sed
4631
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004632
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004633
4634
Matthias Kloseb9621712010-04-24 17:59:49 +00004635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4636$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004638# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004639if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004640 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641
4642 case $withval in
4643 no) with_cxx_main=no
4644 MAINCC='$(CC)';;
4645 yes) with_cxx_main=yes
4646 MAINCC='$(CXX)';;
4647 *) with_cxx_main=yes
4648 MAINCC=$withval
4649 if test -z "$CXX"
4650 then
4651 CXX=$withval
4652 fi;;
4653 esac
4654else
4655
4656 with_cxx_main=no
4657 MAINCC='$(CC)'
4658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004659fi
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4662$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664preset_cxx="$CXX"
4665if test -z "$CXX"
4666then
4667 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668 gcc) if test -n "$ac_tool_prefix"; then
4669 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4670set dummy ${ac_tool_prefix}g++; ac_word=$2
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
4673if ${ac_cv_path_CXX+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675else
4676 case $CXX in
4677 [\\/]* | ?:[\\/]*)
4678 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4679 ;;
4680 *)
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in notfound
4683do
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4691 fi
4692done
4693 done
4694IFS=$as_save_IFS
4695
4696 ;;
4697esac
4698fi
4699CXX=$ac_cv_path_CXX
4700if test -n "$CXX"; then
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4702$as_echo "$CXX" >&6; }
4703else
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708
4709fi
4710if test -z "$ac_cv_path_CXX"; then
4711 ac_pt_CXX=$CXX
4712 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004716if ${ac_cv_path_ac_pt_CXX+:} false; then :
4717 $as_echo_n "(cached) " >&6
4718else
4719 case $ac_pt_CXX in
4720 [\\/]* | ?:[\\/]*)
4721 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4722 ;;
4723 *)
4724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in notfound
4726do
4727 IFS=$as_save_IFS
4728 test -z "$as_dir" && as_dir=.
4729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004731 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733 break 2
4734 fi
4735done
4736 done
4737IFS=$as_save_IFS
4738
4739 ;;
4740esac
4741fi
4742ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4743if test -n "$ac_pt_CXX"; then
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4745$as_echo "$ac_pt_CXX" >&6; }
4746else
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751 if test "x$ac_pt_CXX" = x; then
4752 CXX="g++"
4753 else
4754 case $cross_compiling:$ac_tool_warned in
4755yes:)
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4758ac_tool_warned=yes ;;
4759esac
4760 CXX=$ac_pt_CXX
4761 fi
4762else
4763 CXX="$ac_cv_path_CXX"
4764fi
4765 ;;
4766 cc) if test -n "$ac_tool_prefix"; then
4767 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4768set dummy ${ac_tool_prefix}c++; ac_word=$2
4769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004771if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773else
4774 case $CXX in
4775 [\\/]* | ?:[\\/]*)
4776 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4777 ;;
4778 *)
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in notfound
4781do
4782 IFS=$as_save_IFS
4783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 break 2
4789 fi
4790done
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 ;;
4795esac
4796fi
4797CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4800$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801else
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806
4807fi
4808if test -z "$ac_cv_path_CXX"; then
4809 ac_pt_CXX=$CXX
4810 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 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 +00004820 ;;
4821 *)
4822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4823for as_dir in notfound
4824do
4825 IFS=$as_save_IFS
4826 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004827 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004829 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 break 2
4832 fi
4833done
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004836
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837 ;;
4838esac
4839fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4841if test -n "$ac_pt_CXX"; then
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4843$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004844else
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4846$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004848
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 if test "x$ac_pt_CXX" = x; then
4850 CXX="c++"
4851 else
4852 case $cross_compiling:$ac_tool_warned in
4853yes:)
4854{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4855$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4856ac_tool_warned=yes ;;
4857esac
4858 CXX=$ac_pt_CXX
4859 fi
4860else
4861 CXX="$ac_cv_path_CXX"
4862fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004864 clang|*/clang) if test -n "$ac_tool_prefix"; then
4865 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4866set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4868$as_echo_n "checking for $ac_word... " >&6; }
4869if ${ac_cv_path_CXX+:} false; then :
4870 $as_echo_n "(cached) " >&6
4871else
4872 case $CXX in
4873 [\\/]* | ?:[\\/]*)
4874 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4875 ;;
4876 *)
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in notfound
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004884 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
Ned Deilycbfb9a52012-06-23 16:02:19 -07004892 ;;
4893esac
4894fi
4895CXX=$ac_cv_path_CXX
4896if test -n "$CXX"; then
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4898$as_echo "$CXX" >&6; }
4899else
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
4902fi
4903
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004904
4905fi
4906if test -z "$ac_cv_path_CXX"; then
4907 ac_pt_CXX=$CXX
4908 # Extract the first word of "clang++", so it can be a program name with args.
4909set dummy clang++; ac_word=$2
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
4912if ${ac_cv_path_ac_pt_CXX+:} false; then :
4913 $as_echo_n "(cached) " >&6
4914else
4915 case $ac_pt_CXX in
4916 [\\/]* | ?:[\\/]*)
4917 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4918 ;;
4919 *)
4920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921for as_dir in notfound
4922do
4923 IFS=$as_save_IFS
4924 test -z "$as_dir" && as_dir=.
4925 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004927 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929 break 2
4930 fi
4931done
4932 done
4933IFS=$as_save_IFS
4934
4935 ;;
4936esac
4937fi
4938ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4939if test -n "$ac_pt_CXX"; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4941$as_echo "$ac_pt_CXX" >&6; }
4942else
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944$as_echo "no" >&6; }
4945fi
4946
4947 if test "x$ac_pt_CXX" = x; then
4948 CXX="clang++"
4949 else
4950 case $cross_compiling:$ac_tool_warned in
4951yes:)
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4954ac_tool_warned=yes ;;
4955esac
4956 CXX=$ac_pt_CXX
4957 fi
4958else
4959 CXX="$ac_cv_path_CXX"
4960fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004962 icc|*/icc) if test -n "$ac_tool_prefix"; then
4963 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4964set dummy ${ac_tool_prefix}icpc; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_CXX+:} false; then :
4968 $as_echo_n "(cached) " >&6
4969else
4970 case $CXX in
4971 [\\/]* | ?:[\\/]*)
4972 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4973 ;;
4974 *)
4975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in notfound
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
4980 for ac_exec_ext in '' $ac_executable_extensions; do
4981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984 break 2
4985 fi
4986done
4987 done
4988IFS=$as_save_IFS
4989
4990 ;;
4991esac
4992fi
4993CXX=$ac_cv_path_CXX
4994if test -n "$CXX"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4996$as_echo "$CXX" >&6; }
4997else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003fi
5004if test -z "$ac_cv_path_CXX"; then
5005 ac_pt_CXX=$CXX
5006 # Extract the first word of "icpc", so it can be a program name with args.
5007set dummy icpc; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_ac_pt_CXX+:} false; then :
5011 $as_echo_n "(cached) " >&6
5012else
5013 case $ac_pt_CXX in
5014 [\\/]* | ?:[\\/]*)
5015 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5016 ;;
5017 *)
5018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in notfound
5020do
5021 IFS=$as_save_IFS
5022 test -z "$as_dir" && as_dir=.
5023 for ac_exec_ext in '' $ac_executable_extensions; do
5024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027 break 2
5028 fi
5029done
5030 done
5031IFS=$as_save_IFS
5032
5033 ;;
5034esac
5035fi
5036ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5037if test -n "$ac_pt_CXX"; then
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5039$as_echo "$ac_pt_CXX" >&6; }
5040else
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045 if test "x$ac_pt_CXX" = x; then
5046 CXX="icpc"
5047 else
5048 case $cross_compiling:$ac_tool_warned in
5049yes:)
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5052ac_tool_warned=yes ;;
5053esac
5054 CXX=$ac_pt_CXX
5055 fi
5056else
5057 CXX="$ac_cv_path_CXX"
5058fi
5059 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060 esac
5061 if test "$CXX" = "notfound"
5062 then
5063 CXX=""
5064 fi
5065fi
5066if test -z "$CXX"
5067then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005068 if test -n "$ac_tool_prefix"; then
5069 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5070 do
5071 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5072set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005075if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005077else
5078 if test -n "$CXX"; then
5079 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5080else
5081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5082for as_dir in $PATH
5083do
5084 IFS=$as_save_IFS
5085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005088 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090 break 2
5091 fi
5092done
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095
5096fi
5097fi
5098CXX=$ac_cv_prog_CXX
5099if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5101$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102else
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005105fi
5106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005108 test -n "$CXX" && break
5109 done
5110fi
5111if test -z "$CXX"; then
5112 ac_ct_CXX=$CXX
5113 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5114do
5115 # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
5119if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5120 $as_echo_n "(cached) " >&6
5121else
5122 if test -n "$ac_ct_CXX"; then
5123 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5124else
5125as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
5130 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005132 ac_cv_prog_ac_ct_CXX="$ac_prog"
5133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5134 break 2
5135 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005137 done
5138IFS=$as_save_IFS
5139
5140fi
5141fi
5142ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5143if test -n "$ac_ct_CXX"; then
5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5145$as_echo "$ac_ct_CXX" >&6; }
5146else
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5148$as_echo "no" >&6; }
5149fi
5150
5151
5152 test -n "$ac_ct_CXX" && break
5153done
5154
5155 if test "x$ac_ct_CXX" = x; then
5156 CXX="notfound"
5157 else
5158 case $cross_compiling:$ac_tool_warned in
5159yes:)
5160{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5161$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5162ac_tool_warned=yes ;;
5163esac
5164 CXX=$ac_ct_CXX
5165 fi
5166fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167
5168 if test "$CXX" = "notfound"
5169 then
5170 CXX=""
5171 fi
5172fi
5173if test "$preset_cxx" != "$CXX"
5174then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005175 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 By default, distutils will build C++ extension modules with \"$CXX\".
5178 If this is not intended, then set CXX on the configure command line.
5179 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005180$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181
5182 By default, distutils will build C++ extension modules with \"$CXX\".
5183 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005184 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005185fi
5186
5187
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005188MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5189
5190
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5192$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5193cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005194#undef bfin
5195#undef cris
5196#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005197#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef hppa
5199#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005200#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005201#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005202#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005203#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005204#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005205#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005206 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005207#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208# if defined(__x86_64__) && defined(__LP64__)
5209 x86_64-linux-gnu
5210# elif defined(__x86_64__) && defined(__ILP32__)
5211 x86_64-linux-gnux32
5212# elif defined(__i386__)
5213 i386-linux-gnu
5214# elif defined(__aarch64__) && defined(__AARCH64EL__)
5215# if defined(__ILP32__)
5216 aarch64_ilp32-linux-gnu
5217# else
5218 aarch64-linux-gnu
5219# endif
5220# elif defined(__aarch64__) && defined(__AARCH64EB__)
5221# if defined(__ILP32__)
5222 aarch64_be_ilp32-linux-gnu
5223# else
5224 aarch64_be-linux-gnu
5225# endif
5226# elif defined(__alpha__)
5227 alpha-linux-gnu
5228# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5229# if defined(__ARMEL__)
5230 arm-linux-gnueabihf
5231# else
5232 armeb-linux-gnueabihf
5233# endif
5234# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5235# if defined(__ARMEL__)
5236 arm-linux-gnueabi
5237# else
5238 armeb-linux-gnueabi
5239# endif
5240# elif defined(__hppa__)
5241 hppa-linux-gnu
5242# elif defined(__ia64__)
5243 ia64-linux-gnu
5244# elif defined(__m68k__) && !defined(__mcoldfire__)
5245 m68k-linux-gnu
5246# elif defined(__mips_hard_float) && defined(_MIPSEL)
5247# if _MIPS_SIM == _ABIO32
5248 mipsel-linux-gnu
5249# elif _MIPS_SIM == _ABIN32
5250 mips64el-linux-gnuabin32
5251# elif _MIPS_SIM == _ABI64
5252 mips64el-linux-gnuabi64
5253# else
5254# error unknown platform triplet
5255# endif
5256# elif defined(__mips_hard_float)
5257# if _MIPS_SIM == _ABIO32
5258 mips-linux-gnu
5259# elif _MIPS_SIM == _ABIN32
5260 mips64-linux-gnuabin32
5261# elif _MIPS_SIM == _ABI64
5262 mips64-linux-gnuabi64
5263# else
5264# error unknown platform triplet
5265# endif
5266# elif defined(__or1k__)
5267 or1k-linux-gnu
5268# elif defined(__powerpc__) && defined(__SPE__)
5269 powerpc-linux-gnuspe
5270# elif defined(__powerpc64__)
5271# if defined(__LITTLE_ENDIAN__)
5272 powerpc64le-linux-gnu
5273# else
5274 powerpc64-linux-gnu
5275# endif
5276# elif defined(__powerpc__)
5277 powerpc-linux-gnu
5278# elif defined(__s390x__)
5279 s390x-linux-gnu
5280# elif defined(__s390__)
5281 s390-linux-gnu
5282# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5283 sh4-linux-gnu
5284# elif defined(__sparc__) && defined(__arch64__)
5285 sparc64-linux-gnu
5286# elif defined(__sparc__)
5287 sparc-linux-gnu
5288# else
5289# error unknown platform triplet
5290# endif
5291#elif defined(__FreeBSD_kernel__)
5292# if defined(__LP64__)
5293 x86_64-kfreebsd-gnu
5294# elif defined(__i386__)
5295 i386-kfreebsd-gnu
5296# else
5297# error unknown platform triplet
5298# endif
5299#elif defined(__gnu_hurd__)
5300 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005301#elif defined(__APPLE__)
5302 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005303#else
5304# error unknown platform triplet
5305#endif
5306
5307EOF
5308
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005309if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5312$as_echo "$PLATFORM_TRIPLET" >&6; }
5313else
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5315$as_echo "none" >&6; }
5316fi
5317rm -f conftest.c conftest.out
5318
5319if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5320 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5321 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5322 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005323elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5324 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005325fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326
doko@ubuntu.com55532312016-06-14 08:55:19 +02005327if test x$MULTIARCH != x; then
5328 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5329fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005330
5331
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5333$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5334save_LDFLAGS="$LDFLAGS"
5335LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005336
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5338/* end confdefs.h. */
5339
5340int
5341main ()
5342{
5343
5344 ;
5345 return 0;
5346}
5347_ACEOF
5348if ac_fn_c_try_link "$LINENO"; then :
5349 NO_AS_NEEDED="-Wl,--no-as-needed"
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5351$as_echo "yes" >&6; }
5352else
5353 NO_AS_NEEDED=""
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5355$as_echo "no" >&6; }
5356fi
5357rm -f core conftest.err conftest.$ac_objext \
5358 conftest$ac_exeext conftest.$ac_ext
5359LDFLAGS="$save_LDFLAGS"
5360
5361
5362
5363# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364
Matthias Kloseb9621712010-04-24 17:59:49 +00005365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5366$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005367if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369else
5370 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5371 then ac_cv_path_EGREP="$GREP -E"
5372 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 # Loop through the user's path and test for each of PROGNAME-LIST
5376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5378do
5379 IFS=$as_save_IFS
5380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 for ac_prog in egrep; do
5382 for ac_exec_ext in '' $ac_executable_extensions; do
5383 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005384 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005385# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386 # Check for GNU $ac_path_EGREP
5387case `"$ac_path_EGREP" --version 2>&1` in
5388*GNU*)
5389 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5390*)
5391 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 while :
5394 do
5395 cat "conftest.in" "conftest.in" >"conftest.tmp"
5396 mv "conftest.tmp" "conftest.in"
5397 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5400 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5403 # Best one so far, save it but keep looking for a better one
5404 ac_cv_path_EGREP="$ac_path_EGREP"
5405 ac_path_EGREP_max=$ac_count
5406 fi
5407 # 10*(2^10) chars as input seems more than enough
5408 test $ac_count -gt 10 && break
5409 done
5410 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5411esac
5412
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 $ac_path_EGREP_found && break 3
5414 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005419 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 +00005420 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421else
5422 ac_cv_path_EGREP=$EGREP
5423fi
5424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 fi
5426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5428$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005430
5431
Matthias Kloseb9621712010-04-24 17:59:49 +00005432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5433$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005434if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $as_echo_n "(cached) " >&6
5436else
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005438/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005439#include <stdlib.h>
5440#include <stdarg.h>
5441#include <string.h>
5442#include <float.h>
5443
5444int
5445main ()
5446{
5447
5448 ;
5449 return 0;
5450}
5451_ACEOF
5452if ac_fn_c_try_compile "$LINENO"; then :
5453 ac_cv_header_stdc=yes
5454else
5455 ac_cv_header_stdc=no
5456fi
5457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5458
5459if test $ac_cv_header_stdc = yes; then
5460 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h. */
5463#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005464
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005465_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005467 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005469else
Matthias Kloseb9621712010-04-24 17:59:49 +00005470 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005471fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005472rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473
Matthias Kloseb9621712010-04-24 17:59:49 +00005474fi
5475
5476if test $ac_cv_header_stdc = yes; then
5477 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h. */
5480#include <stdlib.h>
5481
5482_ACEOF
5483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5484 $EGREP "free" >/dev/null 2>&1; then :
5485
5486else
5487 ac_cv_header_stdc=no
5488fi
5489rm -f conftest*
5490
5491fi
5492
5493if test $ac_cv_header_stdc = yes; then
5494 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5495 if test "$cross_compiling" = yes; then :
5496 :
5497else
5498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5499/* end confdefs.h. */
5500#include <ctype.h>
5501#include <stdlib.h>
5502#if ((' ' & 0x0FF) == 0x020)
5503# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5504# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5505#else
5506# define ISLOWER(c) \
5507 (('a' <= (c) && (c) <= 'i') \
5508 || ('j' <= (c) && (c) <= 'r') \
5509 || ('s' <= (c) && (c) <= 'z'))
5510# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5511#endif
5512
5513#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5514int
5515main ()
5516{
5517 int i;
5518 for (i = 0; i < 256; i++)
5519 if (XOR (islower (i), ISLOWER (i))
5520 || toupper (i) != TOUPPER (i))
5521 return 2;
5522 return 0;
5523}
5524_ACEOF
5525if ac_fn_c_try_run "$LINENO"; then :
5526
5527else
5528 ac_cv_header_stdc=no
5529fi
5530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5531 conftest.$ac_objext conftest.beam conftest.$ac_ext
5532fi
5533
5534fi
5535fi
5536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5537$as_echo "$ac_cv_header_stdc" >&6; }
5538if test $ac_cv_header_stdc = yes; then
5539
5540$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5541
5542fi
5543
5544# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5545for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5546 inttypes.h stdint.h unistd.h
5547do :
5548 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5549ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5550"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005551if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 cat >>confdefs.h <<_ACEOF
5553#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5554_ACEOF
5555
5556fi
5557
5558done
5559
5560
5561
5562 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 +02005563if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005564 MINIX=yes
5565else
5566 MINIX=
5567fi
5568
5569
5570 if test "$MINIX" = yes; then
5571
5572$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5573
5574
5575$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5576
5577
5578$as_echo "#define _MINIX 1" >>confdefs.h
5579
5580 fi
5581
5582
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5584$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005585if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005586 $as_echo_n "(cached) " >&6
5587else
5588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589/* end confdefs.h. */
5590
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005591# define __EXTENSIONS__ 1
5592 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005593int
5594main ()
5595{
5596
5597 ;
5598 return 0;
5599}
5600_ACEOF
5601if ac_fn_c_try_compile "$LINENO"; then :
5602 ac_cv_safe_to_define___extensions__=yes
5603else
5604 ac_cv_safe_to_define___extensions__=no
5605fi
5606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5607fi
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5609$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5610 test $ac_cv_safe_to_define___extensions__ = yes &&
5611 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5612
5613 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5614
5615 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5616
5617 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5618
5619 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5620
5621
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622
Xavier de Gaye95750b12016-07-09 11:05:42 +02005623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5624$as_echo_n "checking for the Android API level... " >&6; }
5625cat >> conftest.c <<EOF
5626#ifdef __ANDROID__
5627#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005628android_api = __ANDROID_API__
5629arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005630#else
5631#error not Android
5632#endif
5633EOF
5634
5635if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005636 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5637 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5639$as_echo "$ANDROID_API_LEVEL" >&6; }
5640
5641cat >>confdefs.h <<_ACEOF
5642#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5643_ACEOF
5644
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005645
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5647$as_echo_n "checking for the Android arm ABI... " >&6; }
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5649$as_echo "$_arm_arch" >&6; }
5650 if test "$_arm_arch" = 7; then
5651 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5652 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5653 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005654else
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5656$as_echo "not Android" >&6; }
5657fi
5658rm -f conftest.c conftest.out
5659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660# Check for unsupported systems
5661case $ac_sys_system/$ac_sys_release in
5662atheos*|Linux*/1*)
5663 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5664 echo See README for details.
5665 exit 1;;
5666esac
5667
5668
Matthias Kloseb9621712010-04-24 17:59:49 +00005669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5670$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005673if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 withval=$with_suffix;
5675 case $withval in
5676 no) EXEEXT=;;
5677 yes) EXEEXT=.exe;;
5678 *) EXEEXT=$withval;;
5679 esac
5680fi
5681
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5683$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
5685# Test whether we're running on a non-case-sensitive system, in which
5686# case we give a warning if no ext is given
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5689$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690if test ! -d CaseSensitiveTestDir; then
5691mkdir CaseSensitiveTestDir
5692fi
5693
5694if test -d casesensitivetestdir
5695then
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5697$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 BUILDEXEEXT=.exe
5699else
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 BUILDEXEEXT=$EXEEXT
5703fi
5704rmdir CaseSensitiveTestDir
5705
5706case $MACHDEP in
5707bsdos*)
5708 case $CC in
5709 gcc) CC="$CC -D_HAVE_BSDI";;
5710 esac;;
5711esac
5712
5713case $ac_sys_system in
5714hp*|HP*)
5715 case $CC in
5716 cc|*/cc) CC="$CC -Ae";;
5717 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718esac
5719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
Matthias Kloseb9621712010-04-24 17:59:49 +00005721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5722$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723if test -z "$LIBRARY"
5724then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005725 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5728$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729
5730# LDLIBRARY is the name of the library to link against (as opposed to the
5731# name of the library into which to insert object files). BLDLIBRARY is also
5732# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5733# is blank as the main program is not linked directly against LDLIBRARY.
5734# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5735# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5736# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5737# DLLLIBRARY is the shared (i.e., DLL) library.
5738#
5739# RUNSHARED is used to run shared python without installed libraries
5740#
5741# INSTSONAME is the name of the shared library that will be use to install
5742# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005743#
5744# LDVERSION is the shared library version number, normally the Python version
5745# with the ABI build flags appended.
5746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748
5749
5750
5751
5752
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754LDLIBRARY="$LIBRARY"
5755BLDLIBRARY='$(LDLIBRARY)'
5756INSTSONAME='$(LDLIBRARY)'
5757DLLLIBRARY=''
5758LDLIBRARYDIR=''
5759RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005760LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762# LINKCC is the command that links the python executable -- default is $(CC).
5763# If CXX is set, and if it is needed to link a main function that was
5764# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5765# python might then depend on the C++ runtime
5766# This is altered for AIX in order to build the export list before
5767# linking.
5768
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5770$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771if test -z "$LINKCC"
5772then
5773 LINKCC='$(PURIFY) $(MAINCC)'
5774 case $ac_sys_system in
5775 AIX*)
5776 exp_extra="\"\""
5777 if test $ac_sys_release -ge 5 -o \
5778 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5779 exp_extra="."
5780 fi
5781 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782 QNX*)
5783 # qcc must be used because the other compilers do not
5784 # support -N.
5785 LINKCC=qcc;;
5786 esac
5787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5789$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
5791# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5792# make sure we default having it set to "no": this is used by
5793# distutils.unixccompiler to know if it should add --enable-new-dtags
5794# to linker command lines, and failing to detect GNU ld simply results
5795# in the same bahaviour as before.
5796
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5798$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799ac_prog=ld
5800if test "$GCC" = yes; then
5801 ac_prog=`$CC -print-prog-name=ld`
5802fi
5803case `"$ac_prog" -V 2>&1 < /dev/null` in
5804 *GNU*)
5805 GNULD=yes;;
5806 *)
5807 GNULD=no;;
5808esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5810$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5813$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005815if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 enableval=$enable_shared;
5817fi
5818
5819
5820if test -z "$enable_shared"
5821then
5822 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005823 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 enable_shared="yes";;
5825 *)
5826 enable_shared="no";;
5827 esac
5828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5830$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5833$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005835if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836 enableval=$enable_profiling;
5837fi
5838
5839if test "x$enable_profiling" = xyes; then
5840 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005841 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843/* end confdefs.h. */
5844int main() { return 0; }
5845_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005846if ac_fn_c_try_link "$LINENO"; then :
5847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005851rm -f core conftest.err conftest.$ac_objext \
5852 conftest$ac_exeext conftest.$ac_ext
5853 CC="$ac_save_cc"
5854else
5855 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5858$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859
doko@ubuntu.comba015832012-06-30 16:52:05 +02005860if test "x$enable_profiling" = xyes; then
5861 BASECFLAGS="-pg $BASECFLAGS"
5862 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863fi
5864
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5866$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
5868# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5869# library that we build, but we do not want to link against it (we
5870# will find it with a -framework option). For this reason there is an
5871# extra variable BLDLIBRARY against which Python and the extension
5872# modules are linked, BLDLIBRARY. This is normally the same as
5873# LDLIBRARY, but empty for MacOSX framework builds.
5874if test "$enable_framework"
5875then
5876 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005877 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 BLDLIBRARY=''
5879else
5880 BLDLIBRARY='$(LDLIBRARY)'
5881fi
5882
5883# Other platforms follow
5884if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005885 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
Matthias Kloseb9621712010-04-24 17:59:49 +00005887$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888
5889 case $ac_sys_system in
5890 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005891 LDLIBRARY='libpython$(LDVERSION).dll.a'
5892 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ;;
5894 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005895 LDLIBRARY='libpython$(LDVERSION).so'
5896 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005897 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005899 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005900 then
5901 PY3LIBRARY=libpython3.so
5902 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005904 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).so'
5906 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005909 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005910 then
5911 PY3LIBRARY=libpython3.so
5912 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
5914 hp*|HP*)
5915 case `uname -m` in
5916 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 ;;
5919 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005920 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921 ;;
5922 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005924 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).dylib'
5928 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005929 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005931 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005933 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005934 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
5936 esac
5937else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005938 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 case $ac_sys_system in
5940 CYGWIN*)
5941 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 esac
5945fi
5946
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005947if test "$cross_compiling" = yes; then
5948 RUNSHARED=
5949fi
5950
Matthias Kloseb9621712010-04-24 17:59:49 +00005951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5952$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
5954if test -n "$ac_tool_prefix"; then
5955 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5956set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005959if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961else
5962 if test -n "$RANLIB"; then
5963 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974 break 2
5975 fi
5976done
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978IFS=$as_save_IFS
5979
5980fi
5981fi
5982RANLIB=$ac_cv_prog_RANLIB
5983if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5985$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986else
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989fi
5990
5991
5992fi
5993if test -z "$ac_cv_prog_RANLIB"; then
5994 ac_ct_RANLIB=$RANLIB
5995 # Extract the first word of "ranlib", so it can be a program name with args.
5996set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005999if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001else
6002 if test -n "$ac_ct_RANLIB"; then
6003 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6004else
6005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
6009 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 break 2
6015 fi
6016done
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018IFS=$as_save_IFS
6019
6020fi
6021fi
6022ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6023if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6025$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026else
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029fi
6030
6031 if test "x$ac_ct_RANLIB" = x; then
6032 RANLIB=":"
6033 else
6034 case $cross_compiling:$ac_tool_warned in
6035yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006036{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6037$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038ac_tool_warned=yes ;;
6039esac
6040 RANLIB=$ac_ct_RANLIB
6041 fi
6042else
6043 RANLIB="$ac_cv_prog_RANLIB"
6044fi
6045
6046
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006047if test -n "$ac_tool_prefix"; then
6048 for ac_prog in ar aal
6049 do
6050 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006054if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006055 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056else
6057 if test -n "$AR"; then
6058 ac_cv_prog_AR="$AR" # Let the user override the test.
6059else
6060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063 IFS=$as_save_IFS
6064 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006065 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006067 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069 break 2
6070 fi
6071done
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073IFS=$as_save_IFS
6074
6075fi
6076fi
6077AR=$ac_cv_prog_AR
6078if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6080$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081else
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084fi
6085
6086
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006087 test -n "$AR" && break
6088 done
6089fi
6090if test -z "$AR"; then
6091 ac_ct_AR=$AR
6092 for ac_prog in ar aal
6093do
6094 # Extract the first word of "$ac_prog", so it can be a program name with args.
6095set dummy $ac_prog; ac_word=$2
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097$as_echo_n "checking for $ac_word... " >&6; }
6098if ${ac_cv_prog_ac_ct_AR+:} false; then :
6099 $as_echo_n "(cached) " >&6
6100else
6101 if test -n "$ac_ct_AR"; then
6102 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6103else
6104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105for as_dir in $PATH
6106do
6107 IFS=$as_save_IFS
6108 test -z "$as_dir" && as_dir=.
6109 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006111 ac_cv_prog_ac_ct_AR="$ac_prog"
6112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6113 break 2
6114 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006116 done
6117IFS=$as_save_IFS
6118
6119fi
6120fi
6121ac_ct_AR=$ac_cv_prog_ac_ct_AR
6122if test -n "$ac_ct_AR"; then
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6124$as_echo "$ac_ct_AR" >&6; }
6125else
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127$as_echo "no" >&6; }
6128fi
6129
6130
6131 test -n "$ac_ct_AR" && break
6132done
6133
6134 if test "x$ac_ct_AR" = x; then
6135 AR="ar"
6136 else
6137 case $cross_compiling:$ac_tool_warned in
6138yes:)
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6141ac_tool_warned=yes ;;
6142esac
6143 AR=$ac_ct_AR
6144 fi
6145fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146
6147
6148# tweak ARFLAGS only if the user didn't set it on the command line
6149
6150if test -z "$ARFLAGS"
6151then
6152 ARFLAGS="rc"
6153fi
6154
doko@ubuntu.com58844492012-06-30 18:25:32 +02006155if test -n "$ac_tool_prefix"; then
6156 for ac_prog in readelf
6157 do
6158 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6159set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161$as_echo_n "checking for $ac_word... " >&6; }
6162if ${ac_cv_prog_READELF+:} false; then :
6163 $as_echo_n "(cached) " >&6
6164else
6165 if test -n "$READELF"; then
6166 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6167else
6168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169for as_dir in $PATH
6170do
6171 IFS=$as_save_IFS
6172 test -z "$as_dir" && as_dir=.
6173 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006174 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006175 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6177 break 2
6178 fi
6179done
6180 done
6181IFS=$as_save_IFS
6182
6183fi
6184fi
6185READELF=$ac_cv_prog_READELF
6186if test -n "$READELF"; then
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6188$as_echo "$READELF" >&6; }
6189else
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
6192fi
6193
6194
6195 test -n "$READELF" && break
6196 done
6197fi
6198if test -z "$READELF"; then
6199 ac_ct_READELF=$READELF
6200 for ac_prog in readelf
6201do
6202 # Extract the first word of "$ac_prog", so it can be a program name with args.
6203set dummy $ac_prog; ac_word=$2
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6205$as_echo_n "checking for $ac_word... " >&6; }
6206if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6207 $as_echo_n "(cached) " >&6
6208else
6209 if test -n "$ac_ct_READELF"; then
6210 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6211else
6212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6213for as_dir in $PATH
6214do
6215 IFS=$as_save_IFS
6216 test -z "$as_dir" && as_dir=.
6217 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006218 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006219 ac_cv_prog_ac_ct_READELF="$ac_prog"
6220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6221 break 2
6222 fi
6223done
6224 done
6225IFS=$as_save_IFS
6226
6227fi
6228fi
6229ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6230if test -n "$ac_ct_READELF"; then
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6232$as_echo "$ac_ct_READELF" >&6; }
6233else
6234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6235$as_echo "no" >&6; }
6236fi
6237
6238
6239 test -n "$ac_ct_READELF" && break
6240done
6241
6242 if test "x$ac_ct_READELF" = x; then
6243 READELF=":"
6244 else
6245 case $cross_compiling:$ac_tool_warned in
6246yes:)
6247{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6248$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6249ac_tool_warned=yes ;;
6250esac
6251 READELF=$ac_ct_READELF
6252 fi
6253fi
6254
6255if test "$cross_compiling" = yes; then
6256 case "$READELF" in
6257 readelf|:)
6258 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6259 ;;
6260 esac
6261fi
6262
6263
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006265case $MACHDEP in
6266bsdos*|hp*|HP*)
6267 # install -d does not work on BSDI or HP-UX
6268 if test -z "$INSTALL"
6269 then
6270 INSTALL="${srcdir}/install-sh -c"
6271 fi
6272esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273# Find a good install program. We prefer a C program (faster),
6274# so one script is as good as another. But avoid the broken or
6275# incompatible versions:
6276# SysV /etc/install, /usr/sbin/install
6277# SunOS /usr/etc/install
6278# IRIX /sbin/install
6279# AIX /bin/install
6280# AmigaOS /C/install, which installs bootblocks on floppy discs
6281# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6282# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6283# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6284# OS/2's system install, which has a completely different semantic
6285# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006286# Reject install programs that cannot install multiple files.
6287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6288$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006290if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006291 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292else
6293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296 IFS=$as_save_IFS
6297 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 # Account for people who put trailing slashes in PATH elements.
6299case $as_dir/ in #((
6300 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006302 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303 /usr/ucb/* ) ;;
6304 *)
6305 # OSF1 and SCO ODT 3.0 have their own names for install.
6306 # Don't use installbsd from OSF since it installs stuff as root
6307 # by default.
6308 for ac_prog in ginstall scoinst install; do
6309 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006310 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311 if test $ac_prog = install &&
6312 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6313 # AIX install. It has an incompatible calling convention.
6314 :
6315 elif test $ac_prog = install &&
6316 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6317 # program-specific install script used by HP pwplus--don't use.
6318 :
6319 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006320 rm -rf conftest.one conftest.two conftest.dir
6321 echo one > conftest.one
6322 echo two > conftest.two
6323 mkdir conftest.dir
6324 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6325 test -s conftest.one && test -s conftest.two &&
6326 test -s conftest.dir/conftest.one &&
6327 test -s conftest.dir/conftest.two
6328 then
6329 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6330 break 3
6331 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332 fi
6333 fi
6334 done
6335 done
6336 ;;
6337esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006338
6339 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340IFS=$as_save_IFS
6341
Matthias Kloseb9621712010-04-24 17:59:49 +00006342rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343
6344fi
6345 if test "${ac_cv_path_install+set}" = set; then
6346 INSTALL=$ac_cv_path_install
6347 else
6348 # As a last resort, use the slow shell script. Don't cache a
6349 # value for INSTALL within a source directory, because that will
6350 # break other packages using the cache if that directory is
6351 # removed, or if the value is a relative name.
6352 INSTALL=$ac_install_sh
6353 fi
6354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6356$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357
6358# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6359# It thinks the first close brace ends the variable substitution.
6360test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6361
6362test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6363
6364test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6365
Matthias Klose93a0ef12012-03-15 18:08:34 +01006366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6367$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6368if test -z "$MKDIR_P"; then
6369 if ${ac_cv_path_mkdir+:} false; then :
6370 $as_echo_n "(cached) " >&6
6371else
6372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6373for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6374do
6375 IFS=$as_save_IFS
6376 test -z "$as_dir" && as_dir=.
6377 for ac_prog in mkdir gmkdir; do
6378 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006379 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006380 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6381 'mkdir (GNU coreutils) '* | \
6382 'mkdir (coreutils) '* | \
6383 'mkdir (fileutils) '4.1*)
6384 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6385 break 3;;
6386 esac
6387 done
6388 done
6389 done
6390IFS=$as_save_IFS
6391
6392fi
6393
6394 test -d ./--version && rmdir ./--version
6395 if test "${ac_cv_path_mkdir+set}" = set; then
6396 MKDIR_P="$ac_cv_path_mkdir -p"
6397 else
6398 # As a last resort, use the slow shell script. Don't cache a
6399 # value for MKDIR_P within a source directory, because that will
6400 # break other packages using the cache if that directory is
6401 # removed, or if the value is a relative name.
6402 MKDIR_P="$ac_install_sh -d"
6403 fi
6404fi
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6406$as_echo "$MKDIR_P" >&6; }
6407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408
6409# Not every filesystem supports hard links
6410
6411if test -z "$LN" ; then
6412 case $ac_sys_system in
6413 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414 *) LN=ln;;
6415 esac
6416fi
6417
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006418# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006419
6420ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6424$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425
6426# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006427if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 withval=$with_pydebug;
6429if test "$withval" != no
6430then
6431
Matthias Kloseb9621712010-04-24 17:59:49 +00006432$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433
Matthias Kloseb9621712010-04-24 17:59:49 +00006434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6435$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006437 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006438else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440fi
6441else
Matthias Kloseb9621712010-04-24 17:59:49 +00006442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6443$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444fi
6445
6446
T. Woutersddbfa2c2017-05-23 01:30:49 +02006447# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6448# the ABI. This allows enabling assertions without changing the ABI.
6449assertions='false'
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6451$as_echo_n "checking for --with-assertions... " >&6; }
6452
6453# Check whether --with-assertions was given.
6454if test "${with_assertions+set}" = set; then :
6455 withval=$with_assertions;
6456if test "$withval" != no
6457then
6458 assertions='true'
6459fi
6460fi
6461
6462if test "$assertions" = 'true'; then
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6464$as_echo "yes" >&6; }
6465elif test "$Py_DEBUG" = 'true'; then
6466 assertions='true'
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6468$as_echo "implied by --with-pydebug" >&6; }
6469else
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
6472fi
6473
Brett Cannon63d98bc2016-09-06 17:12:40 -07006474# Enable optimization flags
6475
6476
6477Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6479$as_echo_n "checking for --enable-optimizations... " >&6; }
6480# Check whether --enable-optimizations was given.
6481if test "${enable_optimizations+set}" = set; then :
6482 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006483if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006484then
6485 Py_OPT='true'
6486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6487$as_echo "yes" >&6; };
6488else
6489 Py_OPT='false'
6490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6491$as_echo "no" >&6; };
6492fi
6493else
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6495$as_echo "no" >&6; }
6496fi
6497
6498if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006499 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6500 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006501 # 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 +00006502 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006503 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006504 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006505 DEF_MAKE_RULE="build_all"
6506else
6507 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006508 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006509 DEF_MAKE_RULE="all"
6510fi
6511
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006512# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6514$as_echo_n "checking for --with-lto... " >&6; }
6515
6516# Check whether --with-lto was given.
6517if test "${with_lto+set}" = set; then :
6518 withval=$with_lto;
6519if test "$withval" != no
6520then
6521 Py_LTO='true'
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6523$as_echo "yes" >&6; };
6524else
6525 Py_LTO='false'
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527$as_echo "no" >&6; };
6528fi
6529else
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534if test "$Py_LTO" = 'true' ; then
6535 case $CC in
6536 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006537 case $ac_sys_system in
6538 Darwin*)
6539 # Any changes made here should be reflected in the GCC+Darwin case below
6540 LTOFLAGS="-flto -Wl,-export_dynamic"
6541 ;;
6542 *)
6543 LTOFLAGS="-flto"
6544 ;;
6545 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006546 ;;
6547 *gcc*)
6548 case $ac_sys_system in
6549 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006550 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006551 ;;
6552 *)
6553 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6554 ;;
6555 esac
6556 ;;
6557 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006558 CFLAGS="$CFLAGS $LTOFLAGS"
6559 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006560fi
6561
Brett Cannon7188a3e2015-09-18 15:13:44 -07006562# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006563
6564
6565
6566
6567
Gregory P. Smith799520c2016-09-07 16:10:00 -07006568# Make this work on systems where llvm tools are not installed with their
6569# normal names in the default $PATH (ie: Ubuntu). They exist under the
6570# non-suffixed name in their versioned llvm directory.
6571llvm_bin_dir=''
6572llvm_path="${PATH}"
6573if test "${CC}" = "clang"
6574then
6575 clang_bin=`which clang`
6576 # Some systems install clang elsewhere as a symlink to the real path
6577 # which is where the related llvm tools are located.
6578 if test -L "${clang_bin}"
6579 then
6580 clang_dir=`dirname "${clang_bin}"`
6581 clang_bin=`readlink "${clang_bin}"`
6582 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6583 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6584 fi
6585fi
Zachary Ware5af85642015-12-21 12:09:17 -06006586
Gregory P. Smith799520c2016-09-07 16:10:00 -07006587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6588$as_echo_n "checking target system type... " >&6; }
6589if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006590 $as_echo_n "(cached) " >&6
6591else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006592 if test "x$target_alias" = x; then
6593 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006594else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006595 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6596 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6597fi
6598
6599fi
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6601$as_echo "$ac_cv_target" >&6; }
6602case $ac_cv_target in
6603*-*-*) ;;
6604*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6605esac
6606target=$ac_cv_target
6607ac_save_IFS=$IFS; IFS='-'
6608set x $ac_cv_target
6609shift
6610target_cpu=$1
6611target_vendor=$2
6612shift; shift
6613# Remember, the first character of IFS is used to create $*,
6614# except with old shells:
6615target_os=$*
6616IFS=$ac_save_IFS
6617case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6618
6619
6620# The aliases save the names the user supplied, while $host etc.
6621# will get canonicalized.
6622test -n "$target_alias" &&
6623 test "$program_prefix$program_suffix$program_transform_name" = \
6624 NONENONEs,x,x, &&
6625 program_prefix=${target_alias}-
6626# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6627set dummy $target_alias-llvm-profdata; ac_word=$2
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6629$as_echo_n "checking for $ac_word... " >&6; }
6630if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6631 $as_echo_n "(cached) " >&6
6632else
6633 case $LLVM_PROFDATA in
6634 [\\/]* | ?:[\\/]*)
6635 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6636 ;;
6637 *)
6638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6639for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640do
6641 IFS=$as_save_IFS
6642 test -z "$as_dir" && as_dir=.
6643 for ac_exec_ext in '' $ac_executable_extensions; do
6644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006645 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6647 break 2
6648 fi
6649done
6650 done
6651IFS=$as_save_IFS
6652
Gregory P. Smith799520c2016-09-07 16:10:00 -07006653 ;;
6654esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006656LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6657if test -n "$LLVM_PROFDATA"; then
6658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6659$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006660else
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6662$as_echo "no" >&6; }
6663fi
6664
6665
Gregory P. Smith799520c2016-09-07 16:10:00 -07006666if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6667 if test "$build" = "$target"; then
6668 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6669 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6670set dummy llvm-profdata; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6674 $as_echo_n "(cached) " >&6
6675else
6676 case $ac_pt_LLVM_PROFDATA in
6677 [\\/]* | ?:[\\/]*)
6678 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6679 ;;
6680 *)
6681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in ${llvm_path}
6683do
6684 IFS=$as_save_IFS
6685 test -z "$as_dir" && as_dir=.
6686 for ac_exec_ext in '' $ac_executable_extensions; do
6687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6688 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690 break 2
6691 fi
6692done
6693 done
6694IFS=$as_save_IFS
6695
6696 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6697 ;;
6698esac
6699fi
6700ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6701if test -n "$ac_pt_LLVM_PROFDATA"; then
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6703$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6704else
6705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6706$as_echo "no" >&6; }
6707fi
6708
6709 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6710 else
6711 LLVM_PROFDATA="''"
6712 fi
6713else
6714 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6715fi
6716
6717
6718if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6719then
6720 LLVM_PROF_FOUND="found"
6721else
6722 LLVM_PROF_FOUND="not-found"
6723fi
6724if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6725then
6726 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6727 if test -n "${found_llvm_profdata}"
6728 then
6729 # llvm-profdata isn't directly in $PATH in some cases.
6730 # https://apple.stackexchange.com/questions/197053/
6731 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6732 LLVM_PROF_FOUND=found
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6734$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6735 fi
6736fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006737LLVM_PROF_ERR=no
6738case $CC in
6739 *clang*)
6740 # Any changes made here should be reflected in the GCC+Darwin case below
6741 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6742 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006743 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006744 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6745 if test $LLVM_PROF_FOUND = not-found
6746 then
6747 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006748 if test "${REQUIRE_PGO}" = "yes"
6749 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006750 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 -07006751 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752 fi
6753 ;;
6754 *gcc*)
6755 case $ac_sys_system in
6756 Darwin*)
6757 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6758 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006759 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006760 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006761 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006762 then
6763 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006764 if test "${REQUIRE_PGO}" = "yes"
6765 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006766 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 -07006767 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006768 fi
6769 ;;
6770 *)
6771 PGO_PROF_GEN_FLAG="-fprofile-generate"
6772 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6773 LLVM_PROF_MERGER="true"
6774 LLVM_PROF_FILE=""
6775 ;;
6776 esac
6777 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006778 *icc*)
6779 PGO_PROF_GEN_FLAG="-prof-gen"
6780 PGO_PROF_USE_FLAG="-prof-use"
6781 LLVM_PROF_MERGER="true"
6782 LLVM_PROF_FILE=""
6783 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784esac
6785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6787# merged with this chunk of code?
6788
6789# Optimizer/debugger flags
6790# ------------------------
6791# (The following bit of code is complicated enough - please keep things
6792# indented properly. Just pretend you're editing Python code. ;-)
6793
6794# There are two parallel sets of case statements below, one that checks to
6795# see if OPT was set and one that does BASECFLAGS setting based upon
6796# compiler and platform. BASECFLAGS tweaks need to be made even if the
6797# user set OPT.
6798
6799# tweak OPT based on compiler and platform, only if the user didn't set
6800# it on the command line
6801
Victor Stinner9ed34a82017-05-02 22:35:58 +02006802
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006803if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804then
6805 case $GCC in
6806 yes)
6807 if test "$CC" != 'g++' ; then
6808 STRICT_PROTO="-Wstrict-prototypes"
6809 fi
6810 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6811 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6812 WRAP="-fwrapv"
6813 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006814
Stefan Krahaf04ff22011-12-08 22:20:31 +01006815 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006816 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006817 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006818 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006819 *)
6820 if $CC --version 2>&1 | grep -q clang
6821 then
6822 cc_is_clang=1
6823 else
6824 cc_is_clang=
6825 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006826 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006827
Victor Stinner35f3d242017-04-21 12:35:24 +02006828 if test -n "${cc_is_clang}"
6829 then
6830 # Clang also needs -fwrapv
6831 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006832 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6833 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006834 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006835 fi
6836
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837 case $ac_cv_prog_cc_g in
6838 yes)
6839 if test "$Py_DEBUG" = 'true' ; then
6840 # Optimization messes up debuggers, so turn it off for
6841 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006842 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006843 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006844 else
Victor Stinner28205b22017-04-21 11:24:34 +02006845 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006846 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847 else
Victor Stinner28205b22017-04-21 11:24:34 +02006848 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 fi
6850 ;;
6851 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006852 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853 ;;
6854 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006855
Victor Stinner826f83f2017-04-28 15:07:10 +02006856 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006857
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858 case $ac_sys_system in
6859 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6860 ;;
6861 esac
6862 ;;
6863
6864 *)
6865 OPT="-O"
6866 ;;
6867 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868fi
6869
6870
6871
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873# The -arch flags for universal builds on OSX
6874UNIVERSAL_ARCH_FLAGS=
6875
6876
6877# tweak BASECFLAGS based on compiler and platform
6878case $GCC in
6879yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006880 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006881
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6883$as_echo_n "checking for -Wextra... " >&6; }
6884 ac_save_cc="$CC"
6885 CC="$CC -Wextra -Werror"
6886 if ${ac_cv_extra_warnings+:} false; then :
6887 $as_echo_n "(cached) " >&6
6888else
6889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6890/* end confdefs.h. */
6891
6892
6893int
6894main ()
6895{
6896
6897 ;
6898 return 0;
6899}
6900
6901_ACEOF
6902if ac_fn_c_try_compile "$LINENO"; then :
6903
6904 ac_cv_extra_warnings=yes
6905
6906else
6907
6908 ac_cv_extra_warnings=no
6909
6910fi
6911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6912fi
6913
6914 CC="$ac_save_cc"
6915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6916$as_echo "$ac_cv_extra_warnings" >&6; }
6917
6918 if test $ac_cv_extra_warnings = yes
6919 then
6920 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6921 fi
6922
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006923 # Python doesn't violate C99 aliasing rules, but older versions of
6924 # GCC produce warnings for legal Python code. Enable
6925 # -fno-strict-aliasing on versions of GCC that support but produce
6926 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6928$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929 ac_save_cc="$CC"
6930 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006931 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006932 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006933 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006934else
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006937
Matthias Kloseb159a552010-04-25 21:00:44 +00006938
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006939int
6940main ()
6941{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006942
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006943 ;
6944 return 0;
6945}
Matthias Kloseb159a552010-04-25 21:00:44 +00006946
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006948if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006949
6950 CC="$ac_save_cc -fstrict-aliasing"
6951 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006953/* end confdefs.h. */
6954
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006955 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006956int
6957main ()
6958{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006959double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960 ;
6961 return 0;
6962}
Matthias Kloseb159a552010-04-25 21:00:44 +00006963
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006965if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
6967 ac_cv_no_strict_aliasing=no
6968
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969else
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
6971 ac_cv_no_strict_aliasing=yes
6972
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976else
Matthias Kloseb159a552010-04-25 21:00:44 +00006977
6978 ac_cv_no_strict_aliasing=no
6979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006982fi
6983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6987$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989 then
6990 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6991 fi
6992
Zachary Ware5af85642015-12-21 12:09:17 -06006993 # ICC doesn't recognize the option, but only emits a warning
6994 ## XXX does it emit an unused result warning and can it be disabled?
6995 case "$CC" in
6996 *icc*)
6997 ac_cv_disable_unused_result_warning=no
6998 ;;
6999 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7001$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7002 ac_save_cc="$CC"
7003 CC="$CC -Wunused-result -Werror"
7004 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007005 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007006 $as_echo_n "(cached) " >&6
7007else
7008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7009/* end confdefs.h. */
7010
7011
7012int
7013main ()
7014{
7015
7016 ;
7017 return 0;
7018}
7019
7020_ACEOF
7021if ac_fn_c_try_compile "$LINENO"; then :
7022
7023 ac_cv_disable_unused_result_warning=yes
7024
7025else
7026
7027 ac_cv_disable_unused_result_warning=no
7028
7029fi
7030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7031fi
7032
7033 CFLAGS="$save_CFLAGS"
7034 CC="$ac_save_cc"
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7036$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007037 ;;
7038 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007039
7040 if test $ac_cv_disable_unused_result_warning = yes
7041 then
7042 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007043 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7044 fi
7045
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7047$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7048 ac_save_cc="$CC"
7049 CC="$CC -Wunused-parameter -Werror"
7050 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7051 $as_echo_n "(cached) " >&6
7052else
7053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7054/* end confdefs.h. */
7055
7056
7057int
7058main ()
7059{
7060
7061 ;
7062 return 0;
7063}
7064
7065_ACEOF
7066if ac_fn_c_try_compile "$LINENO"; then :
7067
7068 ac_cv_disable_unused_parameter_warning=yes
7069
7070else
7071
7072 ac_cv_disable_unused_parameter_warning=no
7073
7074fi
7075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7076fi
7077
7078 CC="$ac_save_cc"
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7080$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7081
7082 if test $ac_cv_disable_unused_parameter_warning = yes
7083 then
7084 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7085 fi
7086
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7088$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7089 ac_save_cc="$CC"
7090 CC="$CC -Wmissing-field-initializers -Werror"
7091 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7092 $as_echo_n "(cached) " >&6
7093else
7094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7095/* end confdefs.h. */
7096
7097
7098int
7099main ()
7100{
7101
7102 ;
7103 return 0;
7104}
7105
7106_ACEOF
7107if ac_fn_c_try_compile "$LINENO"; then :
7108
7109 ac_cv_disable_missing_field_initializers=yes
7110
7111else
7112
7113 ac_cv_disable_missing_field_initializers=no
7114
7115fi
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117fi
7118
7119 CC="$ac_save_cc"
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7121$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7122
7123 if test $ac_cv_disable_missing_field_initializers = yes
7124 then
7125 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007126 fi
7127
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7129$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7130 ac_save_cc="$CC"
7131 CC="$CC -Wsign-compare"
7132 save_CFLAGS="$CFLAGS"
7133 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7134 $as_echo_n "(cached) " >&6
7135else
7136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7137/* end confdefs.h. */
7138
7139
7140int
7141main ()
7142{
7143
7144 ;
7145 return 0;
7146}
7147
7148_ACEOF
7149if ac_fn_c_try_compile "$LINENO"; then :
7150
7151 ac_cv_enable_sign_compare_warning=yes
7152
7153else
7154
7155 ac_cv_enable_sign_compare_warning=no
7156
7157fi
7158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7159fi
7160
7161 CFLAGS="$save_CFLAGS"
7162 CC="$ac_save_cc"
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7164$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7165
7166 if test $ac_cv_enable_sign_compare_warning = yes
7167 then
7168 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7169 fi
7170
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7172$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7173 ac_save_cc="$CC"
7174 CC="$CC -Wunreachable-code"
7175 save_CFLAGS="$CFLAGS"
7176 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7177 $as_echo_n "(cached) " >&6
7178else
7179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7180/* end confdefs.h. */
7181
7182
7183int
7184main ()
7185{
7186
7187 ;
7188 return 0;
7189}
7190
7191_ACEOF
7192if ac_fn_c_try_compile "$LINENO"; then :
7193
7194 ac_cv_enable_unreachable_code_warning=yes
7195
7196else
7197
7198 ac_cv_enable_unreachable_code_warning=no
7199
7200fi
7201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7202fi
7203
7204 CFLAGS="$save_CFLAGS"
7205 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007206
7207 # Don't enable unreachable code warning in debug mode, since it usually
7208 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007209 # Issue #24324: Unfortunately, the unreachable code warning does not work
7210 # correctly on gcc and has been silently removed from the compiler.
7211 # It is supported on clang but on OS X systems gcc may be an alias
7212 # for clang. Try to determine if the compiler is not really gcc and,
7213 # if so, only then enable the warning.
7214 if test $ac_cv_enable_unreachable_code_warning = yes && \
7215 test "$Py_DEBUG" != "true" && \
7216 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007217 then
7218 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007219 else
7220 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007221 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7223$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007224
Victor Stinner193ee0a2017-02-06 14:24:00 +01007225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7226$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7227 ac_save_cc="$CC"
7228 CC="$CC -Werror=implicit-function-declaration"
7229 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7230 $as_echo_n "(cached) " >&6
7231else
7232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7233/* end confdefs.h. */
7234
7235
7236int
7237main ()
7238{
7239
7240 ;
7241 return 0;
7242}
7243
7244_ACEOF
7245if ac_fn_c_try_compile "$LINENO"; then :
7246
7247 ac_cv_enable_implicit_function_declaration_error=yes
7248
7249else
7250
7251 ac_cv_enable_implicit_function_declaration_error=no
7252
7253fi
7254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7255fi
7256
7257 CC="$ac_save_cc"
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7259$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7260
7261 if test $ac_cv_enable_implicit_function_declaration_error = yes
7262 then
7263 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7264 fi
7265
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7267 # support. Without this, treatment of subnormals doesn't follow
7268 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007269 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270 alpha*)
7271 BASECFLAGS="$BASECFLAGS -mieee"
7272 ;;
7273 esac
7274
7275 case $ac_sys_system in
7276 SCO_SV*)
7277 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7278 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007279
7280 # is there any other compiler on Darwin besides gcc?
7281 Darwin*)
7282 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7283 # used to be here, but non-Apple gcc doesn't accept them.
7284 if test "${CC}" = gcc
7285 then
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007287$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007288 case "${UNIVERSALSDK}" in
7289 */MacOSX10.4u.sdk)
7290 # Build using 10.4 SDK, force usage of gcc when the
7291 # compiler is gcc, otherwise the user will get very
7292 # confusing error messages when building on OSX 10.6
7293 CC=gcc-4.0
7294 CPP=cpp-4.0
7295 ;;
7296 esac
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007298$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007299 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007300
Ned Deily87adb6e2013-10-18 21:09:56 -07007301 if test "${enable_universalsdk}"
7302 then
7303 case "$UNIVERSAL_ARCHS" in
7304 32-bit)
7305 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7306 LIPO_32BIT_FLAGS=""
7307 ARCH_RUN_32BIT=""
7308 ;;
7309 64-bit)
7310 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7311 LIPO_32BIT_FLAGS=""
7312 ARCH_RUN_32BIT="true"
7313 ;;
7314 all)
7315 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7316 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7317 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7318 ;;
7319 intel)
7320 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7321 LIPO_32BIT_FLAGS="-extract i386"
7322 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7323 ;;
7324 intel-32)
7325 UNIVERSAL_ARCH_FLAGS="-arch i386"
7326 LIPO_32BIT_FLAGS=""
7327 ARCH_RUN_32BIT=""
7328 ;;
7329 3-way)
7330 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7331 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7332 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7333 ;;
7334 *)
7335 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7336 ;;
7337 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7340 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7341 if test "${UNIVERSALSDK}" != "/"
7342 then
7343 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7344 fi
7345 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346
Ned Deily87adb6e2013-10-18 21:09:56 -07007347 # Calculate an appropriate deployment target for this build:
7348 # The deployment target value is used explicitly to enable certain
7349 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007350 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 # component of the string returned by distutils.get_platform().
7352 #
7353 # Use the value from:
7354 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7355 # 2. the operating system version of the build machine if >= 10.6
7356 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7357 # below to pick either 10.3, 10.4, or 10.5 as the target.
7358 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007359
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7361$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007362 cur_target_major=`sw_vers -productVersion | \
7363 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7364 cur_target_minor=`sw_vers -productVersion | \
7365 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7366 cur_target="${cur_target_major}.${cur_target_minor}"
7367 if test ${cur_target_major} -eq 10 && \
7368 test ${cur_target_minor} -ge 3 && \
7369 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007370 then
Ned Deily36820b62014-06-25 13:44:22 -07007371 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007372 cur_target=10.3
7373 if test ${enable_universalsdk}
7374 then
7375 case "$UNIVERSAL_ARCHS" in
7376 all|3-way|intel|64-bit)
7377 # These configurations were first supported in 10.5
7378 cur_target='10.5'
7379 ;;
7380 esac
7381 else
7382 if test `/usr/bin/arch` = "i386"
7383 then
7384 # 10.4 was the first release to support Intel archs
7385 cur_target="10.4"
7386 fi
7387 fi
7388 fi
7389 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007390
Ned Deily87adb6e2013-10-18 21:09:56 -07007391 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7392 # environment with a value that is the same as what we'll use
7393 # in the Makefile to ensure that we'll get the same compiler
7394 # environment during configure and build time.
7395 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7396 export MACOSX_DEPLOYMENT_TARGET
7397 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7399$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007400
Ned Deily87adb6e2013-10-18 21:09:56 -07007401 # end of Darwin* tests
7402 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403 esac
7404 ;;
7405
7406*)
7407 case $ac_sys_system in
7408 OpenUNIX*|UnixWare*)
7409 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7410 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 SCO_SV*)
7412 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7413 ;;
7414 esac
7415 ;;
7416esac
7417
Zachary Ware5af85642015-12-21 12:09:17 -06007418# ICC needs -fp-model strict or floats behave badly
7419case "$CC" in
7420*icc*)
7421 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7422 ;;
7423esac
7424
T. Woutersddbfa2c2017-05-23 01:30:49 +02007425if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 :
7427else
7428 OPT="-DNDEBUG $OPT"
7429fi
7430
7431if test "$ac_arch_flags"
7432then
7433 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7434fi
7435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436# On some compilers, pthreads are available without further options
7437# (e.g. MacOS X). On some of these systems, the compiler will not
7438# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7439# So we have to see first whether pthreads are available without
7440# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7442$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007443if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445else
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447 ac_cv_pthread_is_default=no
7448else
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450/* end confdefs.h. */
7451
Stefan Krah7dba5942012-11-22 22:49:11 +01007452#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453#include <pthread.h>
7454
7455void* routine(void* p){return NULL;}
7456
7457int main(){
7458 pthread_t p;
7459 if(pthread_create(&p,NULL,routine,NULL)!=0)
7460 return 1;
7461 (void)pthread_detach(p);
7462 return 0;
7463}
7464
7465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007466if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467
7468 ac_cv_pthread_is_default=yes
7469 ac_cv_kthread=no
7470 ac_cv_pthread=no
7471
7472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477fi
7478
7479
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480fi
7481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7483$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484
7485
7486if test $ac_cv_pthread_is_default = yes
7487then
7488 ac_cv_kpthread=no
7489else
7490# -Kpthread, 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 -Kpthread,
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 -Kpthread" >&5
7496$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007497if ${ac_cv_kpthread+:} 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 -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007502if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503 ac_cv_kpthread=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_kpthread=yes
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 ac_cv_kpthread=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_kpthread" >&5
7535$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536fi
7537
7538if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7539then
7540# -Kthread, if available, provides the right #defines
7541# and linker options to make pthread_create available
7542# Some compilers won't report that they do not support -Kthread,
7543# so we need to run a program to see whether it really made the
7544# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7546$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007547if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549else
7550 ac_save_cc="$CC"
7551CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007552if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553 ac_cv_kthread=no
7554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556/* end confdefs.h. */
7557
Stefan Krah7dba5942012-11-22 22:49:11 +01007558#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559#include <pthread.h>
7560
7561void* routine(void* p){return NULL;}
7562
7563int main(){
7564 pthread_t p;
7565 if(pthread_create(&p,NULL,routine,NULL)!=0)
7566 return 1;
7567 (void)pthread_detach(p);
7568 return 0;
7569}
7570
7571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573 ac_cv_kthread=yes
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579fi
7580
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581CC="$ac_save_cc"
7582fi
7583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7585$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586fi
7587
7588if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7589then
7590# -pthread, if available, provides the right #defines
7591# and linker options to make pthread_create available
7592# Some compilers won't report that they do not support -pthread,
7593# so we need to run a program to see whether it really made the
7594# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7596$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007597if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599else
7600 ac_save_cc="$CC"
7601CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007602if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603 ac_cv_pthread=no
7604else
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606/* end confdefs.h. */
7607
Stefan Krah7dba5942012-11-22 22:49:11 +01007608#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609#include <pthread.h>
7610
7611void* routine(void* p){return NULL;}
7612
7613int main(){
7614 pthread_t p;
7615 if(pthread_create(&p,NULL,routine,NULL)!=0)
7616 return 1;
7617 (void)pthread_detach(p);
7618 return 0;
7619}
7620
7621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007622if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623 ac_cv_pthread=yes
7624else
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629fi
7630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631CC="$ac_save_cc"
7632fi
7633
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7635$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
7637
7638# If we have set a CC compiler flag for thread support then
7639# check if it works for CXX, too.
7640ac_cv_cxx_thread=no
7641if test ! -z "$CXX"
7642then
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7644$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645ac_save_cxx="$CXX"
7646
7647if test "$ac_cv_kpthread" = "yes"
7648then
7649 CXX="$CXX -Kpthread"
7650 ac_cv_cxx_thread=yes
7651elif test "$ac_cv_kthread" = "yes"
7652then
7653 CXX="$CXX -Kthread"
7654 ac_cv_cxx_thread=yes
7655elif test "$ac_cv_pthread" = "yes"
7656then
7657 CXX="$CXX -pthread"
7658 ac_cv_cxx_thread=yes
7659fi
7660
7661if test $ac_cv_cxx_thread = yes
7662then
7663 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7664 $CXX -c conftest.$ac_ext 2>&5
7665 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7666 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7667 then
7668 ac_cv_cxx_thread=yes
7669 else
7670 ac_cv_cxx_thread=no
7671 fi
7672 rm -fr conftest*
7673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7675$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676fi
7677CXX="$ac_save_cxx"
7678
7679
7680# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7682$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007683if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685else
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687/* end confdefs.h. */
7688#include <stdlib.h>
7689#include <stdarg.h>
7690#include <string.h>
7691#include <float.h>
7692
7693int
7694main ()
7695{
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007701if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702 ac_cv_header_stdc=yes
7703else
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7707
7708if test $ac_cv_header_stdc = yes; then
7709 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711/* end confdefs.h. */
7712#include <string.h>
7713
7714_ACEOF
7715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007716 $EGREP "memchr" >/dev/null 2>&1; then :
7717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718else
7719 ac_cv_header_stdc=no
7720fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007721rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722
7723fi
7724
7725if test $ac_cv_header_stdc = yes; then
7726 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728/* end confdefs.h. */
7729#include <stdlib.h>
7730
7731_ACEOF
7732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 $EGREP "free" >/dev/null 2>&1; then :
7734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735else
7736 ac_cv_header_stdc=no
7737fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007738rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739
7740fi
7741
7742if test $ac_cv_header_stdc = yes; then
7743 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745 :
7746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748/* end confdefs.h. */
7749#include <ctype.h>
7750#include <stdlib.h>
7751#if ((' ' & 0x0FF) == 0x020)
7752# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7753# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7754#else
7755# define ISLOWER(c) \
7756 (('a' <= (c) && (c) <= 'i') \
7757 || ('j' <= (c) && (c) <= 'r') \
7758 || ('s' <= (c) && (c) <= 'z'))
7759# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7760#endif
7761
7762#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7763int
7764main ()
7765{
7766 int i;
7767 for (i = 0; i < 256; i++)
7768 if (XOR (islower (i), ISLOWER (i))
7769 || toupper (i) != TOUPPER (i))
7770 return 2;
7771 return 0;
7772}
7773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007774if ac_fn_c_try_run "$LINENO"; then :
7775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007776else
Matthias Kloseb9621712010-04-24 17:59:49 +00007777 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781fi
7782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783fi
7784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7786$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787if test $ac_cv_header_stdc = yes; then
7788
Matthias Kloseb9621712010-04-24 17:59:49 +00007789$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790
7791fi
7792
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007793for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007794fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007795ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007796sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007797unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007798poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007799sys/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 +01007800sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007801sys/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 +01007802sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007803sys/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 -07007804libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007805linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007806sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007807do :
7808 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7809ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007810if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007812#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007813_ACEOF
7814
7815fi
7816
Guido van Rossum627b2d71993-12-24 10:39:16 +00007817done
7818
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007819ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007820for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7823$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007828/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007829#include <sys/types.h>
7830#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832int
7833main ()
7834{
7835if ((DIR *) 0)
7836return 0;
7837 ;
7838 return 0;
7839}
7840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007843else
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848eval ac_res=\$$as_ac_Header
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7850$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007851if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007853#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
7855
7856ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007857fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859done
7860# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7861if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7863$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007864if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007866else
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871/* Override any GCC internal prototype to avoid an error.
7872 Use char because int might match the return type of a GCC
7873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007874#ifdef __cplusplus
7875extern "C"
7876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007877char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007878int
7879main ()
7880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007882 ;
7883 return 0;
7884}
7885_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886for ac_lib in '' dir; do
7887 if test -z "$ac_lib"; then
7888 ac_res="none required"
7889 else
7890 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007891 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007898 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901done
Victor Stinnere0be4232011-10-25 13:06:09 +02007902if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007904else
7905 ac_cv_search_opendir=no
7906fi
7907rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007908LIBS=$ac_func_search_save_LIBS
7909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7911$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007913if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007915
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917
Michael W. Hudson54241132001-12-07 15:38:26 +00007918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7920$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007921if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007923else
7924 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007928/* Override any GCC internal prototype to avoid an error.
7929 Use char because int might match the return type of a GCC
7930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931#ifdef __cplusplus
7932extern "C"
7933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007934char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935int
7936main ()
7937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ;
7940 return 0;
7941}
7942_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943for ac_lib in '' x; do
7944 if test -z "$ac_lib"; then
7945 ac_res="none required"
7946 else
7947 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007948 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953rm -f core conftest.err conftest.$ac_objext \
7954 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007955 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958done
Victor Stinnere0be4232011-10-25 13:06:09 +02007959if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007960
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961else
7962 ac_cv_search_opendir=no
7963fi
7964rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007965LIBS=$ac_func_search_save_LIBS
7966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7968$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007970if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007973fi
7974
7975fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007976
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7978$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007979if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007983/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007984#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007985int
7986main ()
7987{
7988return makedev(0, 0);
7989 ;
7990 return 0;
7991}
7992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007994 ac_cv_header_sys_types_h_makedev=yes
7995else
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998rm -f core conftest.err conftest.$ac_objext \
7999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008000
8001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8003$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008004
8005if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008006ac_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 +02008007if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008010
8011fi
8012
8013
8014
8015 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 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 +02008017if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008018
Matthias Kloseb9621712010-04-24 17:59:49 +00008019$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008020
8021fi
8022
8023
8024 fi
8025fi
8026
Michael W. Hudson54241132001-12-07 15:38:26 +00008027
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008028# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8029# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8030SAVE_CFLAGS=$CFLAGS
8031CFLAGS="-std=c99 $CFLAGS"
8032for ac_header in bluetooth/bluetooth.h
8033do :
8034 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8035if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8036 cat >>confdefs.h <<_ACEOF
8037#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8038_ACEOF
8039
8040fi
8041
8042done
8043
8044CFLAGS=$SAVE_CFLAGS
8045
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008046# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8047for ac_header in net/if.h
8048do :
8049 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8050#ifdef STDC_HEADERS
8051# include <stdlib.h>
8052# include <stddef.h>
8053#else
8054# ifdef HAVE_STDLIB_H
8055# include <stdlib.h>
8056# endif
8057#endif
8058#ifdef HAVE_SYS_SOCKET_H
8059# include <sys/socket.h>
8060#endif
8061
8062"
Victor Stinnere0be4232011-10-25 13:06:09 +02008063if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008064 cat >>confdefs.h <<_ACEOF
8065#define HAVE_NET_IF_H 1
8066_ACEOF
8067
8068fi
8069
8070done
8071
8072
Martin v. Löwis11017b12006-01-14 18:12:57 +00008073# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008074for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008075do :
8076 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 +00008077#ifdef HAVE_ASM_TYPES_H
8078#include <asm/types.h>
8079#endif
8080#ifdef HAVE_SYS_SOCKET_H
8081#include <sys/socket.h>
8082#endif
8083
Matthias Kloseb9621712010-04-24 17:59:49 +00008084"
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008087#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008088_ACEOF
8089
8090fi
8091
8092done
8093
8094
caaveryeffc12f2017-09-06 18:18:10 -04008095for ac_header in linux/vm_sockets.h
8096do :
8097 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8098#ifdef HAVE_SYS_SOCKET_H
8099#include <sys/socket.h>
8100#endif
8101
8102"
8103if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8104 cat >>confdefs.h <<_ACEOF
8105#define HAVE_LINUX_VM_SOCKETS_H 1
8106_ACEOF
8107
8108fi
8109
8110done
8111
8112
Charles-François Natali47413c12011-10-06 19:47:44 +02008113# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008114for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008115do :
8116 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8117ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8118#ifdef HAVE_SYS_SOCKET_H
8119#include <sys/socket.h>
8120#endif
8121
8122"
8123if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8124 cat >>confdefs.h <<_ACEOF
8125#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8126_ACEOF
8127
8128fi
8129
8130done
8131
8132
Guido van Rossum627b2d71993-12-24 10:39:16 +00008133# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008134was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8136$as_echo_n "checking for clock_t in time.h... " >&6; }
8137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008138/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008139#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008140
8141_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008144 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008145else
Martin v. Löwis11437992002-04-12 09:54:03 +00008146
8147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008149
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008150
Guido van Rossum627b2d71993-12-24 10:39:16 +00008151fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008152rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8155$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8158$as_echo_n "checking for makedev... " >&6; }
8159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008160/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008161
Jesus Cea740f53a2010-04-28 11:35:30 +00008162#if defined(MAJOR_IN_MKDEV)
8163#include <sys/mkdev.h>
8164#elif defined(MAJOR_IN_SYSMACROS)
8165#include <sys/sysmacros.h>
8166#else
8167#include <sys/types.h>
8168#endif
8169
Neal Norwitz11690112002-07-30 01:08:28 +00008170int
8171main ()
8172{
Jesus Cea740f53a2010-04-28 11:35:30 +00008173
8174 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008175 ;
8176 return 0;
8177}
Matthias Kloseb159a552010-04-25 21:00:44 +00008178
Neal Norwitz11690112002-07-30 01:08:28 +00008179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008180if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008181 ac_cv_has_makedev=yes
8182else
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008185rm -f core conftest.err conftest.$ac_objext \
8186 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8188$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008189if test "$ac_cv_has_makedev" = "yes"; then
8190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008192
8193fi
8194
Christian Heimes985ecdc2013-11-20 11:46:18 +01008195# byte swapping
8196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8197$as_echo_n "checking for le64toh... " >&6; }
8198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8199/* end confdefs.h. */
8200
8201#ifdef HAVE_ENDIAN_H
8202#include <endian.h>
8203#elif defined(HAVE_SYS_ENDIAN_H)
8204#include <sys/endian.h>
8205#endif
8206
8207int
8208main ()
8209{
8210
8211 le64toh(1)
8212 ;
8213 return 0;
8214}
8215
8216_ACEOF
8217if ac_fn_c_try_link "$LINENO"; then :
8218 ac_cv_has_le64toh=yes
8219else
8220 ac_cv_has_le64toh=no
8221fi
8222rm -f core conftest.err conftest.$ac_objext \
8223 conftest$ac_exeext conftest.$ac_ext
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8225$as_echo "$ac_cv_has_le64toh" >&6; }
8226if test "$ac_cv_has_le64toh" = "yes"; then
8227
8228$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8229
8230fi
8231
Martin v. Löwis399a6892002-10-04 10:22:02 +00008232use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008233# Don't use largefile support for GNU/Hurd
8234case $ac_sys_system in GNU*)
8235 use_lfs=no
8236esac
8237
Martin v. Löwis399a6892002-10-04 10:22:02 +00008238if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008239# Two defines needed to enable largefile support on various platforms
8240# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008241case $ac_sys_system/$ac_sys_release in
8242AIX*)
8243
8244$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8245
8246 ;;
8247esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008250
8251
Matthias Kloseb9621712010-04-24 17:59:49 +00008252$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008253
Martin v. Löwis399a6892002-10-04 10:22:02 +00008254fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008255
Guido van Rossum84e7b241996-08-19 21:59:00 +00008256# Add some code to confdefs.h so that the test for off_t works on SCO
8257cat >> confdefs.h <<\EOF
8258#if defined(SCO_DS)
8259#undef _OFF_T
8260#endif
8261EOF
8262
Guido van Rossumef2255b2000-03-10 22:30:29 +00008263# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008264ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008265if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008266
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008267else
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269cat >>confdefs.h <<_ACEOF
8270#define mode_t int
8271_ACEOF
8272
8273fi
8274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008277
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008278else
Martin v. Löwis11437992002-04-12 09:54:03 +00008279
8280cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
8283
8284fi
8285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008287if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008288
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008289else
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
8291cat >>confdefs.h <<_ACEOF
8292#define pid_t int
8293_ACEOF
8294
8295fi
8296
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008299#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008300_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008301
Matthias Kloseb9621712010-04-24 17:59:49 +00008302ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008303if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008304
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008305else
Martin v. Löwis11437992002-04-12 09:54:03 +00008306
8307cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008309_ACEOF
8310
8311fi
8312
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8314$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008319/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008320#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008321
8322_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008325 ac_cv_type_uid_t=yes
8326else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008327 ac_cv_type_uid_t=no
8328fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008329rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8333$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008334if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008337
8338
Matthias Kloseb9621712010-04-24 17:59:49 +00008339$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008340
8341fi
8342
Mark Dickinson983bc162012-12-02 12:11:38 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008345if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008348
8349fi
8350
Stefan Krah1919b7e2012-03-21 18:25:23 +01008351ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8352if test "x$ac_cv_type___uint128_t" = xyes; then :
8353
8354$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8355
8356fi
8357
Jack Jansendd19cf82001-12-06 22:36:17 +00008358
Michael W. Hudson54241132001-12-07 15:38:26 +00008359# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008360# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361# The cast to long int works around a bug in the HP C Compiler
8362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8364# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8366$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008367if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 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 +00008371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 if test "$ac_cv_type_int" = yes; then
8374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008376as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008377See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378 else
8379 ac_cv_sizeof_int=0
8380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8385$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386
8387
8388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008390#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008392
8393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394# The cast to long int works around a bug in the HP C Compiler
8395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8397# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8399$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008400if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 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 +00008404
Martin v. Löwis11437992002-04-12 09:54:03 +00008405else
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 if test "$ac_cv_type_long" = yes; then
8407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008409as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008410See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411 else
8412 ac_cv_sizeof_long=0
8413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415
Martin v. Löwis11437992002-04-12 09:54:03 +00008416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8418$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419
8420
8421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008423#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008424_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008425
8426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427# The cast to long int works around a bug in the HP C Compiler
8428# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8429# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8430# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8432$as_echo_n "checking size of long long... " >&6; }
8433if ${ac_cv_sizeof_long_long+:} false; then :
8434 $as_echo_n "(cached) " >&6
8435else
8436 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8437
8438else
8439 if test "$ac_cv_type_long_long" = yes; then
8440 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8442as_fn_error 77 "cannot compute sizeof (long long)
8443See \`config.log' for more details" "$LINENO" 5; }
8444 else
8445 ac_cv_sizeof_long_long=0
8446 fi
8447fi
8448
8449fi
8450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8451$as_echo "$ac_cv_sizeof_long_long" >&6; }
8452
8453
8454
8455cat >>confdefs.h <<_ACEOF
8456#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8457_ACEOF
8458
8459
8460# The cast to long int works around a bug in the HP C Compiler
8461# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8462# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8463# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8465$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008466if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 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 +00008470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471else
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 if test "$ac_cv_type_void_p" = yes; then
8473 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008475as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008476See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477 else
8478 ac_cv_sizeof_void_p=0
8479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8484$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485
8486
8487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008489#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008490_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008491
8492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493# The cast to long int works around a bug in the HP C Compiler
8494# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8495# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8496# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8498$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008499if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 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 +00008503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504else
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 if test "$ac_cv_type_short" = yes; then
8506 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008508as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008509See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510 else
8511 ac_cv_sizeof_short=0
8512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8517$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518
8519
8520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008522#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008523_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008524
8525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526# The cast to long int works around a bug in the HP C Compiler
8527# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8528# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8529# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8531$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008532if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 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 +00008536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537else
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 if test "$ac_cv_type_float" = yes; then
8539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008541as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008542See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 else
8544 ac_cv_sizeof_float=0
8545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8550$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551
8552
8553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008555#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008556_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008557
8558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559# The cast to long int works around a bug in the HP C Compiler
8560# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8561# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8562# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8564$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008565if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 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 +00008569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570else
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 if test "$ac_cv_type_double" = yes; then
8572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008574as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008575See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576 else
8577 ac_cv_sizeof_double=0
8578 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8583$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584
8585
8586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008588#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008589_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008590
8591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592# The cast to long int works around a bug in the HP C Compiler
8593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8595# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8597$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008598if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008600else
Matthias Kloseb9621712010-04-24 17:59:49 +00008601 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 +00008602
Martin v. Löwis11437992002-04-12 09:54:03 +00008603else
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 if test "$ac_cv_type_fpos_t" = yes; then
8605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008607as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008608See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 else
8610 ac_cv_sizeof_fpos_t=0
8611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613
Martin v. Löwis11437992002-04-12 09:54:03 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8616$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617
8618
8619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008621#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008622_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625# The cast to long int works around a bug in the HP C Compiler
8626# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8627# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8628# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8630$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008631if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008633else
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 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 +00008635
Martin v. Löwis18e16552006-02-15 17:27:45 +00008636else
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 if test "$ac_cv_type_size_t" = yes; then
8638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008640as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008641See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642 else
8643 ac_cv_sizeof_size_t=0
8644 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646
Martin v. Löwis18e16552006-02-15 17:27:45 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8649$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650
8651
8652
Martin v. Löwis18e16552006-02-15 17:27:45 +00008653cat >>confdefs.h <<_ACEOF
8654#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8655_ACEOF
8656
8657
Christian Heimes400adb02008-02-01 08:12:03 +00008658# The cast to long int works around a bug in the HP C Compiler
8659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8661# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8663$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008664if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 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 +00008668
Christian Heimes400adb02008-02-01 08:12:03 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 if test "$ac_cv_type_pid_t" = yes; then
8671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008673as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008674See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008675 else
8676 ac_cv_sizeof_pid_t=0
8677 fi
8678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679
Christian Heimes400adb02008-02-01 08:12:03 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8682$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008683
8684
8685
8686cat >>confdefs.h <<_ACEOF
8687#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8688_ACEOF
8689
8690
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008691# The cast to long int works around a bug in the HP C Compiler
8692# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8693# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8694# This bug is HP SR number 8606223364.
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8696$as_echo_n "checking size of uintptr_t... " >&6; }
8697if ${ac_cv_sizeof_uintptr_t+:} false; then :
8698 $as_echo_n "(cached) " >&6
8699else
8700 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8701
8702else
8703 if test "$ac_cv_type_uintptr_t" = yes; then
8704 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8706as_fn_error 77 "cannot compute sizeof (uintptr_t)
8707See \`config.log' for more details" "$LINENO" 5; }
8708 else
8709 ac_cv_sizeof_uintptr_t=0
8710 fi
8711fi
8712
8713fi
8714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8715$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8716
8717
8718
8719cat >>confdefs.h <<_ACEOF
8720#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8721_ACEOF
8722
8723
Michael W. Hudson54241132001-12-07 15:38:26 +00008724
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8726$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008727have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008729/* end confdefs.h. */
8730
8731int
8732main ()
8733{
8734long double x; x = (long double)0;
8735 ;
8736 return 0;
8737}
8738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008739if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008740
8741
Matthias Kloseb9621712010-04-24 17:59:49 +00008742$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008743
8744 have_long_double=yes
8745
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8749$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008750if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008751# The cast to long int works around a bug in the HP C Compiler
8752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8754# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8756$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008757if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 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 +00008761
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 if test "$ac_cv_type_long_double" = yes; then
8764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008766as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008767See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768 else
8769 ac_cv_sizeof_long_double=0
8770 fi
8771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008772
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8775$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008776
8777
8778
8779cat >>confdefs.h <<_ACEOF
8780#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8781_ACEOF
8782
8783
8784fi
8785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786# The cast to long int works around a bug in the HP C Compiler
8787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8791$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008792if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 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 +00008796
Thomas Woutersb2137042007-02-01 18:02:27 +00008797else
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 if test "$ac_cv_type__Bool" = yes; then
8799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008801as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008802See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803 else
8804 ac_cv_sizeof__Bool=0
8805 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008807
Thomas Woutersb2137042007-02-01 18:02:27 +00008808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8810$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811
8812
8813
Thomas Woutersb2137042007-02-01 18:02:27 +00008814cat >>confdefs.h <<_ACEOF
8815#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8816_ACEOF
8817
8818
Thomas Woutersb2137042007-02-01 18:02:27 +00008819
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008820# The cast to long int works around a bug in the HP C Compiler
8821# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8822# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8823# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8825$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008826if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008830#ifdef HAVE_SYS_TYPES_H
8831#include <sys/types.h>
8832#endif
8833
Matthias Kloseb9621712010-04-24 17:59:49 +00008834"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 if test "$ac_cv_type_off_t" = yes; then
8838 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008840as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008841See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842 else
8843 ac_cv_sizeof_off_t=0
8844 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8849$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851
8852
Martin v. Löwis11437992002-04-12 09:54:03 +00008853cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008854#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008855_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008856
Michael W. Hudson54241132001-12-07 15:38:26 +00008857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858
Matthias Kloseb9621712010-04-24 17:59:49 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8860$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008861if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008862 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008863
Matthias Kloseb9621712010-04-24 17:59:49 +00008864$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8867$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008868else
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008871fi
8872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008873# The cast to long int works around a bug in the HP C Compiler
8874# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8875# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8876# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8878$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008879if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008881else
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883#ifdef HAVE_SYS_TYPES_H
8884#include <sys/types.h>
8885#endif
8886#ifdef HAVE_TIME_H
8887#include <time.h>
8888#endif
8889
Matthias Kloseb9621712010-04-24 17:59:49 +00008890"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892else
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 if test "$ac_cv_type_time_t" = yes; then
8894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008896as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008897See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008898 else
8899 ac_cv_sizeof_time_t=0
8900 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008902
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8905$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008907
8908
Martin v. Löwis11437992002-04-12 09:54:03 +00008909cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008910#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008911_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008912
Michael W. Hudson54241132001-12-07 15:38:26 +00008913
8914
Trent Mick635f6fb2000-08-23 21:33:05 +00008915# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008916ac_save_cc="$CC"
8917if test "$ac_cv_kpthread" = "yes"
8918then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008919elif test "$ac_cv_kthread" = "yes"
8920then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008921elif test "$ac_cv_pthread" = "yes"
8922then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008923fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924
Matthias Kloseb9621712010-04-24 17:59:49 +00008925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8926$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008927have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008929/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
8931 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Guido van Rossum12580492000-09-24 16:47:19 +00008935pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 ;
8937 return 0;
8938}
Matthias Kloseb159a552010-04-25 21:00:44 +00008939
Martin v. Löwis11437992002-04-12 09:54:03 +00008940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008941if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008942 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8946$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008947if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8951# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8953$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008954if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008956else
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008958#ifdef HAVE_PTHREAD_H
8959#include <pthread.h>
8960#endif
8961
Matthias Kloseb9621712010-04-24 17:59:49 +00008962"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008963
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008964else
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 if test "$ac_cv_type_pthread_t" = yes; then
8966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008968as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008969See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970 else
8971 ac_cv_sizeof_pthread_t=0
8972 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974
Trent Mick635f6fb2000-08-23 21:33:05 +00008975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8977$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008978
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979
8980
Martin v. Löwis11437992002-04-12 09:54:03 +00008981cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008982#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008984
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985
Trent Mick635f6fb2000-08-23 21:33:05 +00008986fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008987CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008988
Michael W. Hudson54241132001-12-07 15:38:26 +00008989
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008990case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008991 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008992 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8993 ;;
8994 Darwin/*)
8995 OTHER_LIBTOOL_OPT=""
8996 ;;
8997esac
8998
8999
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009000
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009001case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009002 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009003 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9004 if test "${enable_universalsdk}"; then
9005 :
9006 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009007 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009008 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009009 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009010 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009011 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009012 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009013 if test ${gcc_version} '<' 4.0
9014 then
9015 LIBTOOL_CRUFT="-lcc_dynamic"
9016 else
9017 LIBTOOL_CRUFT=""
9018 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009020 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021else
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009023/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009024
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009025 #include <unistd.h>
9026 int main(int argc, char*argv[])
9027 {
9028 if (sizeof(long) == 4) {
9029 return 0;
9030 } else {
9031 return 1;
9032 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009033 }
9034
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009036if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009037 ac_osx_32bit=yes
9038else
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009043fi
9044
9045
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009046 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009047 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009048 i386)
9049 MACOSX_DEFAULT_ARCH="i386"
9050 ;;
9051 ppc)
9052 MACOSX_DEFAULT_ARCH="ppc"
9053 ;;
9054 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009055 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009056 ;;
9057 esac
9058 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009059 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009060 i386)
9061 MACOSX_DEFAULT_ARCH="x86_64"
9062 ;;
9063 ppc)
9064 MACOSX_DEFAULT_ARCH="ppc64"
9065 ;;
9066 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009067 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009068 ;;
9069 esac
9070
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009071 fi
9072
9073 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009075 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009076esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9078$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009079if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009080then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009081 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009083 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9088$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009089 if test $enable_shared = "yes"
9090 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009091 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 +00009092 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093else
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009096fi
9097
Matthias Kloseb9621712010-04-24 17:59:49 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9099$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009100case $ac_sys_system/$ac_sys_release in
9101 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9106$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009107 ;;
9108 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009111 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009112esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009113
Guido van Rossum0a516c91994-09-12 10:58:40 +00009114# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009115
Michael W. Hudson54241132001-12-07 15:38:26 +00009116
9117
9118
9119
Benjamin Peterson99f03762010-04-11 22:15:28 +00009120
Thomas Wouters477c8d52006-05-27 19:21:47 +00009121
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009122# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9123# -- usually .so, .sl on HP-UX, .dll on Cygwin
9124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9125$as_echo_n "checking the extension of shared libraries... " >&6; }
9126if test -z "$SHLIB_SUFFIX"; then
9127 case $ac_sys_system in
9128 hp*|HP*)
9129 case `uname -m` in
9130 ia64) SHLIB_SUFFIX=.so;;
9131 *) SHLIB_SUFFIX=.sl;;
9132 esac
9133 ;;
9134 CYGWIN*) SHLIB_SUFFIX=.dll;;
9135 *) SHLIB_SUFFIX=.so;;
9136 esac
9137fi
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9139$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009140
Guido van Rossum0a516c91994-09-12 10:58:40 +00009141# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009142# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009143# (Shared libraries in this instance are shared modules to be loaded into
9144# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9146$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009147if test -z "$LDSHARED"
9148then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009149 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009150 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009151 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009152 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009153 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009154 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009155 if test "$GCC" = "yes" ; then
9156 LDSHARED='$(CC) -shared'
9157 LDCXXSHARED='$(CXX) -shared'
9158 else
9159 LDSHARED='$(CC) -G'
9160 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009161 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009162 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009163 if test "$GCC" = "yes" ; then
9164 LDSHARED='$(CC) -shared'
9165 LDCXXSHARED='$(CXX) -shared'
9166 else
9167 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009168 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009169 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009170 LDSHARED='$(CC) -bundle'
9171 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009172 if test "$enable_framework" ; then
9173 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009174 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9175 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009176 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009177 else
9178 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009179 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009180 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009181 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009182 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009183 LDSHARED='$(CC) -bundle'
9184 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009185 if test "$enable_framework" ; then
9186 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009187 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9188 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009189 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009190 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009191 # No framework, use the Python app as bundle-loader
9192 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009193 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009194 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009195 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009196 Darwin/*)
9197 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9198 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009199
Ned Deily36820b62014-06-25 13:44:22 -07009200 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9201 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9202 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9203 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9204 if test ${dep_target_major} -eq 10 && \
9205 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009206 then
Ned Deily36820b62014-06-25 13:44:22 -07009207 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009208 LDSHARED='$(CC) -bundle'
9209 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009210 if test "$enable_framework" ; then
9211 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009212 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9213 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009214 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009215 else
9216 # No framework, use the Python app as bundle-loader
9217 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9218 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009219 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009220 fi
Ned Deily36820b62014-06-25 13:44:22 -07009221 else
9222 # building for OS X 10.3 and later
9223 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9224 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9225 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009226 fi
9227 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009228 Linux*|GNU*|QNX*)
9229 LDSHARED='$(CC) -shared'
9230 LDCXXSHARED='$(CXX) -shared';;
9231 BSD/OS*/4*)
9232 LDSHARED="gcc -shared"
9233 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009234 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009235 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009236 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009237 LDSHARED='$(CC) -shared'
9238 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009239 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009240 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009241 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009242 OpenBSD*)
9243 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9244 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009245 LDSHARED='$(CC) -shared $(CCSHARED)'
9246 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009247 else
9248 case `uname -r` in
9249 [01].* | 2.[0-7] | 2.[0-7].*)
9250 LDSHARED="ld -Bshareable ${LDFLAGS}"
9251 ;;
9252 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009253 LDSHARED='$(CC) -shared $(CCSHARED)'
9254 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009255 ;;
9256 esac
9257 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009258 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009259 LDSHARED='$(CC) -shared'
9260 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009261 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009262 if test "$GCC" = "yes" ; then
9263 LDSHARED='$(CC) -shared'
9264 LDCXXSHARED='$(CXX) -shared'
9265 else
9266 LDSHARED='$(CC) -G'
9267 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009268 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009269 SCO_SV*)
9270 LDSHARED='$(CC) -Wl,-G,-Bexport'
9271 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9272 CYGWIN*)
9273 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9274 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009275 *) LDSHARED="ld";;
9276 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9279$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009280LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009281BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009282# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009283# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9285$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009286if test -z "$CCSHARED"
9287then
Guido van Rossum07397971997-04-29 21:49:50 +00009288 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009289 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009290 then CCSHARED="-fPIC";
9291 elif test `uname -p` = sparc;
9292 then CCSHARED="-xcode=pic32";
9293 else CCSHARED="-Kpic";
9294 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009295 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009296 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009297 else CCSHARED="+z";
9298 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009299 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009300 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009301 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009302 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009303 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009304 if test "$GCC" = "yes"
9305 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009306 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009307 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009308 SCO_SV*)
9309 if test "$GCC" = "yes"
9310 then CCSHARED="-fPIC"
9311 else CCSHARED="-Kpic -belf"
9312 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009313 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9316$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009318# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9320$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321if test -z "$LINKFORSHARED"
9322then
Guido van Rossum07397971997-04-29 21:49:50 +00009323 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009324 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009325 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009326 LINKFORSHARED="-Wl,-E -Wl,+s";;
9327# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009328 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009329 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009330 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009331 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009333 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009334
9335 # Issue #18075: the default maximum stack size (8MBytes) is too
9336 # small for the default recursion limit. Increase the stack size
9337 # to ensure that tests don't crash
9338 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9339
Jack Jansene578a632001-08-15 01:27:14 +00009340 if test "$enable_framework"
9341 then
Jack Jansenda49e192005-01-07 13:08:22 +00009342 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009343 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009344 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009345 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009346 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009347 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009348 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009349 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9350 then
9351 LINKFORSHARED="-Wl,--export-dynamic"
9352 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009353 SunOS/5*) case $CC in
9354 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009355 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009356 then
9357 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009358 fi;;
9359 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009360 CYGWIN*)
9361 if test $enable_shared = "no"
9362 then
9363 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9364 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009365 QNX*)
9366 # -Wl,-E causes the symbols to be added to the dynamic
9367 # symbol table so that they can be found when a module
9368 # is loaded. -N 2048K causes the stack size to be set
9369 # to 2048 kilobytes so that the stack doesn't overflow
9370 # when running test_compile.py.
9371 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009372 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9375$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009376
Michael W. Hudson54241132001-12-07 15:38:26 +00009377
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009378
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9380$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009381if test ! "$LIBRARY" = "$LDLIBRARY"
9382then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009383 case $ac_sys_system in
9384 CYGWIN*)
9385 # Cygwin needs CCSHARED when building extension DLLs
9386 # but not when building the interpreter DLL.
9387 CFLAGSFORSHARED='';;
9388 *)
9389 CFLAGSFORSHARED='$(CCSHARED)'
9390 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9393$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009394
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009395# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9396# library (with --enable-shared).
9397# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009398# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9399# if it is not required, since it creates a dependency of the shared library
9400# to LIBS. This, in turn, means that applications linking the shared libpython
9401# don't need to link LIBS explicitly. The default should be only changed
9402# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009403
Matthias Kloseb9621712010-04-24 17:59:49 +00009404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9405$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009406case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009407 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009408 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009409esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9411$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009412
9413
Guido van Rossum627b2d71993-12-24 10:39:16 +00009414# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9416$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009417if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009418 $as_echo_n "(cached) " >&6
9419else
9420 ac_check_lib_save_LIBS=$LIBS
9421LIBS="-lsendfile $LIBS"
9422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9423/* end confdefs.h. */
9424
9425/* Override any GCC internal prototype to avoid an error.
9426 Use char because int might match the return type of a GCC
9427 builtin and then its argument prototype would still apply. */
9428#ifdef __cplusplus
9429extern "C"
9430#endif
9431char sendfile ();
9432int
9433main ()
9434{
9435return sendfile ();
9436 ;
9437 return 0;
9438}
9439_ACEOF
9440if ac_fn_c_try_link "$LINENO"; then :
9441 ac_cv_lib_sendfile_sendfile=yes
9442else
9443 ac_cv_lib_sendfile_sendfile=no
9444fi
9445rm -f core conftest.err conftest.$ac_objext \
9446 conftest$ac_exeext conftest.$ac_ext
9447LIBS=$ac_check_lib_save_LIBS
9448fi
9449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9450$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009451if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009452 cat >>confdefs.h <<_ACEOF
9453#define HAVE_LIBSENDFILE 1
9454_ACEOF
9455
9456 LIBS="-lsendfile $LIBS"
9457
9458fi
9459
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9461$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009462if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009463 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009464else
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009466LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470/* Override any GCC internal prototype to avoid an error.
9471 Use char because int might match the return type of a GCC
9472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009473#ifdef __cplusplus
9474extern "C"
9475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009476char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009477int
9478main ()
9479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ;
9482 return 0;
9483}
9484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487else
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009490rm -f core conftest.err conftest.$ac_objext \
9491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009492LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9495$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009496if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 cat >>confdefs.h <<_ACEOF
9498#define HAVE_LIBDL 1
9499_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009500
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009501 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503fi
9504 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9506$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009507if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009508 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009509else
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009511LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515/* Override any GCC internal prototype to avoid an error.
9516 Use char because int might match the return type of a GCC
9517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009518#ifdef __cplusplus
9519extern "C"
9520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009521char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009522int
9523main ()
9524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ;
9527 return 0;
9528}
9529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009532else
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535rm -f core conftest.err conftest.$ac_objext \
9536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009537LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9540$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009541if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 cat >>confdefs.h <<_ACEOF
9543#define HAVE_LIBDLD 1
9544_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009545
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009546 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009548fi
9549 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009550
Georg Brandlb1441c72009-01-03 22:33:39 +00009551# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009552if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9554$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009555if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009557else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009558 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009560/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562/* Override any GCC internal prototype to avoid an error.
9563 Use char because int might match the return type of a GCC
9564 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009565#ifdef __cplusplus
9566extern "C"
9567#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009568char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009569int
9570main ()
9571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ;
9574 return 0;
9575}
9576_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577for ac_lib in '' pthread rt posix4; do
9578 if test -z "$ac_lib"; then
9579 ac_res="none required"
9580 else
9581 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009582 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009587rm -f core conftest.err conftest.$ac_objext \
9588 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009589 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592done
Victor Stinnere0be4232011-10-25 13:06:09 +02009593if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595else
9596 ac_cv_search_sem_init=no
9597fi
9598rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009599LIBS=$ac_func_search_save_LIBS
9600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9602$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009604if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009606
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009607fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009608 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009609 # posix4 on Solaris 2.6
9610 # pthread (first!) on Linux
9611fi
9612
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9615$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009616if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009618else
9619 ac_check_lib_save_LIBS=$LIBS
9620LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009622/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624/* Override any GCC internal prototype to avoid an error.
9625 Use char because int might match the return type of a GCC
9626 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009627#ifdef __cplusplus
9628extern "C"
9629#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009630char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009631int
9632main ()
9633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009635 ;
9636 return 0;
9637}
9638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009640 ac_cv_lib_intl_textdomain=yes
9641else
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644rm -f core conftest.err conftest.$ac_objext \
9645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646LIBS=$ac_check_lib_save_LIBS
9647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9649$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009650if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651
Matthias Kloseb9621712010-04-24 17:59:49 +00009652$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009653
Brett Cannonc6d936e2009-06-07 20:09:53 +00009654 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009655fi
9656
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009657
9658# checks for system dependent C++ extensions support
9659case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9661$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009664
Georg Brandl59e87bd2011-02-15 19:48:59 +00009665 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009666int
9667main ()
9668{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009669loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ;
9671 return 0;
9672}
Matthias Kloseb159a552010-04-25 21:00:44 +00009673
Martin v. Löwis11437992002-04-12 09:54:03 +00009674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009675if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009676
Matthias Kloseb159a552010-04-25 21:00:44 +00009677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009682
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009683else
Matthias Kloseb159a552010-04-25 21:00:44 +00009684
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009686$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689rm -f core conftest.err conftest.$ac_objext \
9690 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009691 *) ;;
9692esac
9693
Christian Heimes985ecdc2013-11-20 11:46:18 +01009694# check for systems that require aligned memory access
9695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9696$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009697if ${ac_cv_aligned_required+:} false; then :
9698 $as_echo_n "(cached) " >&6
9699else
9700 if test "$cross_compiling" = yes; then :
9701 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009702else
9703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9704/* end confdefs.h. */
9705
9706int main()
9707{
9708 char s[16];
9709 int i, *p1, *p2;
9710 for (i=0; i < 16; i++)
9711 s[i] = i;
9712 p1 = (int*)(s+1);
9713 p2 = (int*)(s+2);
9714 if (*p1 == *p2)
9715 return 1;
9716 return 0;
9717}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009718_ACEOF
9719if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009720 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009721else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009722 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009723fi
9724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9725 conftest.$ac_objext conftest.beam conftest.$ac_ext
9726fi
9727
9728
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009729fi
9730
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9732$as_echo "$ac_cv_aligned_required" >&6; }
9733if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009734
9735$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9736
9737fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009738
9739# str, bytes and memoryview hash algorithm
9740
9741
9742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9743$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9744
9745# Check whether --with-hash_algorithm was given.
9746if test "${with_hash_algorithm+set}" = set; then :
9747 withval=$with_hash_algorithm;
9748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9749$as_echo "$withval" >&6; }
9750case "$withval" in
9751 siphash24)
9752 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9753
9754 ;;
9755 fnv)
9756 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9757
9758 ;;
9759 *)
9760 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9761 ;;
9762esac
9763
9764else
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9766$as_echo "default" >&6; }
9767fi
9768
9769
Charles-François Natalid30b0222014-05-08 23:08:51 +01009770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9771$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9772
9773# Check whether --with-address_sanitizer was given.
9774if test "${with_address_sanitizer+set}" = set; then :
9775 withval=$with_address_sanitizer;
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9777$as_echo "$withval" >&6; }
9778BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9779LDFLAGS="-fsanitize=address $LDFLAGS"
9780
9781else
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9783$as_echo "no" >&6; }
9784fi
9785
9786
Guido van Rossum70c7f481998-03-26 18:44:10 +00009787# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9789$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009790if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009791 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009792else
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009794LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798/* Override any GCC internal prototype to avoid an error.
9799 Use char because int might match the return type of a GCC
9800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801#ifdef __cplusplus
9802extern "C"
9803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009804char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
9807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ;
9810 return 0;
9811}
9812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009815else
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009820LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9823$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009824if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009825 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009826fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009827 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9829$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009830if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009832else
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009834LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9863$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009865 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009866fi
9867 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009868
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9870$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009873if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9876$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009877LIBS="$withval $LIBS"
9878
9879else
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882fi
9883
Guido van Rossum7f43da71994-08-01 12:15:30 +00009884
Victor Stinner8291b5e2015-03-20 16:03:14 +01009885
9886
9887
9888
9889
9890
9891
9892if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9893 if test -n "$ac_tool_prefix"; then
9894 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9895set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897$as_echo_n "checking for $ac_word... " >&6; }
9898if ${ac_cv_path_PKG_CONFIG+:} false; then :
9899 $as_echo_n "(cached) " >&6
9900else
9901 case $PKG_CONFIG in
9902 [\\/]* | ?:[\\/]*)
9903 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9904 ;;
9905 *)
9906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907for as_dir in $PATH
9908do
9909 IFS=$as_save_IFS
9910 test -z "$as_dir" && as_dir=.
9911 for ac_exec_ext in '' $ac_executable_extensions; do
9912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9913 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9915 break 2
9916 fi
9917done
9918 done
9919IFS=$as_save_IFS
9920
9921 ;;
9922esac
9923fi
9924PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9925if test -n "$PKG_CONFIG"; then
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9927$as_echo "$PKG_CONFIG" >&6; }
9928else
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
9931fi
9932
9933
9934fi
9935if test -z "$ac_cv_path_PKG_CONFIG"; then
9936 ac_pt_PKG_CONFIG=$PKG_CONFIG
9937 # Extract the first word of "pkg-config", so it can be a program name with args.
9938set dummy pkg-config; ac_word=$2
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9940$as_echo_n "checking for $ac_word... " >&6; }
9941if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9942 $as_echo_n "(cached) " >&6
9943else
9944 case $ac_pt_PKG_CONFIG in
9945 [\\/]* | ?:[\\/]*)
9946 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9947 ;;
9948 *)
9949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950for as_dir in $PATH
9951do
9952 IFS=$as_save_IFS
9953 test -z "$as_dir" && as_dir=.
9954 for ac_exec_ext in '' $ac_executable_extensions; do
9955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958 break 2
9959 fi
9960done
9961 done
9962IFS=$as_save_IFS
9963
9964 ;;
9965esac
9966fi
9967ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9968if test -n "$ac_pt_PKG_CONFIG"; then
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9970$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9971else
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9973$as_echo "no" >&6; }
9974fi
9975
9976 if test "x$ac_pt_PKG_CONFIG" = x; then
9977 PKG_CONFIG=""
9978 else
9979 case $cross_compiling:$ac_tool_warned in
9980yes:)
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9983ac_tool_warned=yes ;;
9984esac
9985 PKG_CONFIG=$ac_pt_PKG_CONFIG
9986 fi
9987else
9988 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9989fi
9990
9991fi
9992if test -n "$PKG_CONFIG"; then
9993 _pkg_min_version=0.9.0
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9995$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9996 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9998$as_echo "yes" >&6; }
9999 else
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10001$as_echo "no" >&6; }
10002 PKG_CONFIG=""
10003 fi
10004fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010005
10006# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10008$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010009
10010# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010011if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010012 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010013else
10014 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010015fi
10016
10017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10019$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010020
10021# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10023$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010024
10025# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010026if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010027 withval=$with_system_ffi;
10028fi
10029
10030
Zachary Waref40d4dd2016-09-17 01:25:24 -050010031if test "$ac_sys_system" = "Darwin"
10032then
10033 case "$with_system_ffi" in
10034 "")
10035 with_system_ffi="no"
10036 ;;
10037 yes|no)
10038 ;;
10039 *)
10040 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10041 ;;
10042 esac
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10044$as_echo "$with_system_ffi" >&6; }
10045else
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10047$as_echo "yes" >&6; }
10048 if test "$with_system_ffi" != ""
10049 then
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10051$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10052 fi
10053 with_system_ffi="yes"
10054fi
Zachary Ware935043d2016-09-09 17:01:21 -070010055
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010057 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10058else
10059 LIBFFI_INCLUDEDIR=""
10060fi
10061
10062
Stefan Krah60187b52012-03-23 19:06:27 +010010063# Check for use of the system libmpdec library
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10065$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10066
10067# Check whether --with-system_libmpdec was given.
10068if test "${with_system_libmpdec+set}" = set; then :
10069 withval=$with_system_libmpdec;
10070else
10071 with_system_libmpdec="no"
10072fi
10073
10074
10075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10076$as_echo "$with_system_libmpdec" >&6; }
10077
Benjamin Peterson076ed002010-10-31 17:11:02 +000010078# Check for support for loadable sqlite extensions
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10080$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10081# Check whether --enable-loadable-sqlite-extensions was given.
10082if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10083 enableval=$enable_loadable_sqlite_extensions;
10084else
10085 enable_loadable_sqlite_extensions="no"
10086fi
10087
10088
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10090$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10091
Ned Deilyd819b932013-09-06 01:07:05 -070010092# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10093
10094
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10096$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10097
10098# Check whether --with-tcltk-includes was given.
10099if test "${with_tcltk_includes+set}" = set; then :
10100 withval=$with_tcltk_includes;
10101else
10102 with_tcltk_includes="default"
10103fi
10104
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10106$as_echo "$with_tcltk_includes" >&6; }
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10108$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10109
10110# Check whether --with-tcltk-libs was given.
10111if test "${with_tcltk_libs+set}" = set; then :
10112 withval=$with_tcltk_libs;
10113else
10114 with_tcltk_libs="default"
10115fi
10116
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10118$as_echo "$with_tcltk_libs" >&6; }
10119if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10120then
10121 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10122 then
10123 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10124 fi
10125 TCLTK_INCLUDES=""
10126 TCLTK_LIBS=""
10127else
10128 TCLTK_INCLUDES="$with_tcltk_includes"
10129 TCLTK_LIBS="$with_tcltk_libs"
10130fi
10131
Matthias Klose55708cc2009-04-30 08:06:49 +000010132# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10134$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010135
10136# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010137if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010138 withval=$with_dbmliborder;
10139if test x$with_dbmliborder = xyes
10140then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010141as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010142else
10143 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10144 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10145 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010146 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010147 fi
10148 done
10149fi
10150fi
10151
Matthias Kloseb9621712010-04-24 17:59:49 +000010152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10153$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155
Martin v. Löwis11437992002-04-12 09:54:03 +000010156
10157# Templates for things AC_DEFINEd more than once.
10158# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010159
10160
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010161if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010162then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010163 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010164 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010165
10166 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010167elif test "$ac_cv_kpthread" = "yes"
10168then
10169 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010170 if test "$ac_cv_cxx_thread" = "yes"; then
10171 CXX="$CXX -Kpthread"
10172 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010173 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010174elif test "$ac_cv_kthread" = "yes"
10175then
10176 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010177 if test "$ac_cv_cxx_thread" = "yes"; then
10178 CXX="$CXX -Kthread"
10179 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010180 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010181elif test "$ac_cv_pthread" = "yes"
10182then
10183 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010184 if test "$ac_cv_cxx_thread" = "yes"; then
10185 CXX="$CXX -pthread"
10186 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010187 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010188else
10189 if test ! -z "$with_threads" -a -d "$with_threads"
10190 then LDFLAGS="$LDFLAGS -L$with_threads"
10191 fi
10192 if test ! -z "$withval" -a -d "$withval"
10193 then LDFLAGS="$LDFLAGS -L$withval"
10194 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010195
10196 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010197 # define _POSIX_THREADS in unistd.h. Some apparently don't
10198 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10200$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010202/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010203
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010204#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010205#ifdef _POSIX_THREADS
10206yes
10207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010208
10209_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010212 unistd_defines_pthreads=yes
10213else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010214 unistd_defines_pthreads=no
10215fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010216rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010217
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10219$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010220
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010222
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010223 # Just looking for pthread_create in libpthread is not enough:
10224 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10225 # So we really have to include pthread.h, and then link.
10226 _libs=$LIBS
10227 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10229$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010231/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010232
10233#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010234#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010235
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010236void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010237int
10238main ()
10239{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010240
10241pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010247
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10249$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010250 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010251
Guido van Rossum02a1c402000-02-25 19:26:31 +000010252else
Martin v. Löwis11437992002-04-12 09:54:03 +000010253
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010254 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010256if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010257
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010258 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010259
Guido van Rossumad678af1998-10-02 14:42:15 +000010260else
Guido van Rossumad678af1998-10-02 14:42:15 +000010261
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10263$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010264if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010266else
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010268LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272/* Override any GCC internal prototype to avoid an error.
10273 Use char because int might match the return type of a GCC
10274 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275#ifdef __cplusplus
10276extern "C"
10277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010278char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010279int
10280main ()
10281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 ;
10284 return 0;
10285}
10286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010287if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010289else
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010292rm -f core conftest.err conftest.$ac_objext \
10293 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010294LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10297$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010298if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010300 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010301 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010302
Greg Steinadf63d62000-07-05 10:38:09 +000010303else
Greg Steinadf63d62000-07-05 10:38:09 +000010304
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10306$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010307if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010309else
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010311LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315/* Override any GCC internal prototype to avoid an error.
10316 Use char because int might match the return type of a GCC
10317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318#ifdef __cplusplus
10319extern "C"
10320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010321char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010322int
10323main ()
10324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010325return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 ;
10327 return 0;
10328}
10329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010332else
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010335rm -f core conftest.err conftest.$ac_objext \
10336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10340$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010341if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010343 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010344 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010345
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010346else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10349$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010350if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010352else
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010354LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010358/* Override any GCC internal prototype to avoid an error.
10359 Use char because int might match the return type of a GCC
10360 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010361#ifdef __cplusplus
10362extern "C"
10363#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010364char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010365int
10366main ()
10367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378rm -f core conftest.err conftest.$ac_objext \
10379 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010380LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10383$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010384if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010385
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010386 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010387 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010388
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010389else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10392$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010393if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010395else
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010397LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401/* Override any GCC internal prototype to avoid an error.
10402 Use char because int might match the return type of a GCC
10403 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010404#ifdef __cplusplus
10405extern "C"
10406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010407char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010408int
10409main ()
10410{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010411return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 ;
10413 return 0;
10414}
10415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010416if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010418else
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010421rm -f core conftest.err conftest.$ac_objext \
10422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010423LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10426$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010427if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010428
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010429 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010430 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010431
Guido van Rossumb93a8621998-05-07 13:27:32 +000010432else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010433
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010434 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10435
Guido van Rossum2d38f911996-06-26 19:47:01 +000010436fi
10437
Guido van Rossum627b2d71993-12-24 10:39:16 +000010438
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010439fi
10440
Guido van Rossum0be3e491997-05-22 20:33:33 +000010441fi
10442
Guido van Rossum49545951997-12-02 19:28:29 +000010443fi
10444
Guido van Rossumb93a8621998-05-07 13:27:32 +000010445fi
10446
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010450
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10452$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010453if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010455else
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010457LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461/* Override any GCC internal prototype to avoid an error.
10462 Use char because int might match the return type of a GCC
10463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010464#ifdef __cplusplus
10465extern "C"
10466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010467char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010468int
10469main ()
10470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010471return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010478else
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010483LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10486$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010487if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010488
Martin v. Löwis130fb172001-07-19 11:00:41 +000010489 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010490
Guido van Rossum627b2d71993-12-24 10:39:16 +000010491fi
10492
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010493
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010494fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010495
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010496if test "$posix_threads" = "yes"; then
10497 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010498
Matthias Kloseb9621712010-04-24 17:59:49 +000010499$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010500
10501 fi
10502
10503 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10504 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010505 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010506$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010507
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010508 ;;
10509 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010510$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010511
10512 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010513 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010514$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010515
10516 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010517 esac
10518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10520$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010521 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010523else
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010525 ac_cv_pthread_system_supported=no
10526else
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010528/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010529
10530 #include <stdio.h>
10531 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010532 void *foo(void *parm) {
10533 return NULL;
10534 }
10535 main() {
10536 pthread_attr_t attr;
10537 pthread_t id;
10538 if (pthread_attr_init(&attr)) exit(-1);
10539 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10540 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10541 exit(0);
10542 }
10543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010544if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545 ac_cv_pthread_system_supported=yes
10546else
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010551fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554fi
10555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10557$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010558 if test "$ac_cv_pthread_system_supported" = "yes"; then
10559
Matthias Kloseb9621712010-04-24 17:59:49 +000010560$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561
10562 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 for ac_func in pthread_sigmask
10564do :
10565 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010566if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010567 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010568#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010570 case $ac_sys_system in
10571 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010574
10575 ;;
10576 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010577fi
10578done
10579
Christian Heimesf77b4b22013-08-21 13:26:05 +020010580 for ac_func in pthread_atfork
10581do :
10582 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10583if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10584 cat >>confdefs.h <<_ACEOF
10585#define HAVE_PTHREAD_ATFORK 1
10586_ACEOF
10587
10588fi
10589done
10590
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591fi
10592
10593
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010595
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10597$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010599if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010604 ipv6=no
10605 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10607$as_echo "yes" >&6; }
10608 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010609
10610 ipv6=yes
10611 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613else
Martin v. Löwis11437992002-04-12 09:54:03 +000010614
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010616/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617 /* AF_INET6 available check */
10618#include <sys/types.h>
10619#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010620int
10621main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010623int domain = AF_INET6;
10624 ;
10625 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010626}
Martin v. Löwis11437992002-04-12 09:54:03 +000010627_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010628if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10631$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010633
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010634else
Matthias Kloseb159a552010-04-25 21:00:44 +000010635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010639
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010643if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10645$as_echo_n "checking if RFC2553 API is available... " >&6; }
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010648
10649 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010650#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010651int
10652main ()
10653{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010654struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010655 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 ;
10657 return 0;
10658}
Matthias Kloseb159a552010-04-25 21:00:44 +000010659
Martin v. Löwis11437992002-04-12 09:54:03 +000010660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010662
10663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010664$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010665 ipv6=yes
10666
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010667else
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010670$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010671 ipv6=no
10672
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010675fi
10676
10677if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010679
10680fi
10681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682fi
10683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684
10685ipv6type=unknown
10686ipv6lib=none
10687ipv6trylibc=no
10688
10689if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10691$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010692 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10693 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010694 case $i in
10695 inria)
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 <netinet/in.h>
10700#ifdef IPV6_INRIA_VERSION
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öwis44ddbde2001-12-02 10:15:37 +000010706 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010708rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010709
10710 ;;
10711 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010713/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010714
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715#include <netinet/in.h>
10716#ifdef __KAME__
10717yes
10718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722 ipv6type=$i;
10723 ipv6lib=inet6
10724 ipv6libdir=/usr/local/v6/lib
10725 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010727rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728
10729 ;;
10730 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734#include <features.h>
10735#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10736yes
10737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010738_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 ipv6type=$i;
10742 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010744rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745
10746 ;;
10747 linux-inet6)
10748 if test -d /usr/inet6; then
10749 ipv6type=$i
10750 ipv6lib=inet6
10751 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010752 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753 fi
10754 ;;
10755 solaris)
10756 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010757 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 ipv6type=$i
10759 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760 fi
10761 fi
10762 ;;
10763 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010765/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010766
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767#include <sys/param.h>
10768#ifdef _TOSHIBA_INET6
10769yes
10770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010771_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774 ipv6type=$i;
10775 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010776 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010778rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779
10780 ;;
10781 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785#include </usr/local/v6/include/sys/v6config.h>
10786#ifdef __V6D__
10787yes
10788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010789_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 ipv6type=$i;
10793 ipv6lib=v6;
10794 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010795 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010797rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798
10799 ;;
10800 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010802/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010803
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010804#include <sys/param.h>
10805#ifdef _ZETA_MINAMI_INET6
10806yes
10807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010808_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811 ipv6type=$i;
10812 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010813 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010815rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816
10817 ;;
10818 esac
10819 if test "$ipv6type" != "unknown"; then
10820 break
10821 fi
10822 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10824$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825fi
10826
10827if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10828 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10829 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10830 echo "using lib$ipv6lib"
10831 else
10832 if test $ipv6trylibc = "yes"; then
10833 echo "using libc"
10834 else
10835 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10836 echo "You need to fetch lib$ipv6lib.a from appropriate"
10837 echo 'ipv6 kit and compile beforehand.'
10838 exit 1
10839 fi
10840 fi
10841fi
10842
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10844$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10846/* end confdefs.h. */
10847 /* CAN_RAW_FD_FRAMES available check */
10848#include <linux/can/raw.h>
10849int
10850main ()
10851{
10852int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10853 ;
10854 return 0;
10855}
10856_ACEOF
10857if ac_fn_c_try_compile "$LINENO"; then :
10858
10859
10860$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10861
10862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10863$as_echo "yes" >&6; }
10864
10865else
10866
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10868$as_echo "no" >&6; }
10869
10870fi
10871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10872
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010873# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10875$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010878if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010879 withval=$with_doc_strings;
10880fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010881
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010882
10883if test -z "$with_doc_strings"
10884then with_doc_strings="yes"
10885fi
10886if test "$with_doc_strings" != "no"
10887then
10888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010890
10891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10893$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010894
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010895# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10897$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010900if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901 withval=$with_pymalloc;
10902fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010903
Neil Schemenauera35c6882001-02-27 04:45:05 +000010904
Neil Schemenauer16c22972002-03-22 15:34:49 +000010905if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010906then
10907 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010908fi
10909if test "$with_pymalloc" != "no"
10910then
Martin v. Löwis11437992002-04-12 09:54:03 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010913
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010914 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10917$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010918
Nick Coghlan6ea41862017-06-11 13:16:15 +100010919# Check for --with-c-locale-coercion
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10921$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10922
10923# Check whether --with-c-locale-coercion was given.
10924if test "${with_c_locale_coercion+set}" = set; then :
10925 withval=$with_c_locale_coercion;
10926fi
10927
10928
10929if test -z "$with_c_locale_coercion"
10930then
10931 with_c_locale_coercion="yes"
10932fi
10933if test "$with_c_locale_coercion" != "no"
10934then
10935
10936$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10937
10938fi
10939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10940$as_echo "$with_c_locale_coercion" >&6; }
10941
10942# Check for --with-c-locale-warning
10943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10944$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10945
10946# Check whether --with-c-locale-warning was given.
10947if test "${with_c_locale_warning+set}" = set; then :
10948 withval=$with_c_locale_warning;
10949fi
10950
10951
10952if test -z "$with_c_locale_warning"
10953then
10954 with_c_locale_warning="yes"
10955fi
10956if test "$with_c_locale_warning" != "no"
10957then
10958
10959$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10960
10961fi
10962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10963$as_echo "$with_c_locale_warning" >&6; }
10964
Benjamin Peterson05159c42009-12-03 03:01:27 +000010965# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10967$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010968
10969# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010970if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010971 withval=$with_valgrind;
10972else
10973 with_valgrind=no
10974fi
10975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10977$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010978if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 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 +020010980if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010983
10984else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010985 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010986
10987fi
10988
10989
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010990 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010991fi
10992
Łukasz Langaa785c872016-09-09 17:37:37 -070010993# Check for DTrace support
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
10995$as_echo_n "checking for --with-dtrace... " >&6; }
10996
10997# Check whether --with-dtrace was given.
10998if test "${with_dtrace+set}" = set; then :
10999 withval=$with_dtrace;
11000else
11001 with_dtrace=no
11002fi
11003
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11005$as_echo "$with_dtrace" >&6; }
11006
11007
11008
11009
11010
11011DTRACE=
11012DFLAGS=
11013DTRACE_HEADERS=
11014DTRACE_OBJS=
11015
11016if test "$with_dtrace" = "yes"
11017then
11018 # Extract the first word of "dtrace", so it can be a program name with args.
11019set dummy dtrace; ac_word=$2
11020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11021$as_echo_n "checking for $ac_word... " >&6; }
11022if ${ac_cv_path_DTRACE+:} false; then :
11023 $as_echo_n "(cached) " >&6
11024else
11025 case $DTRACE in
11026 [\\/]* | ?:[\\/]*)
11027 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11028 ;;
11029 *)
11030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031for as_dir in $PATH
11032do
11033 IFS=$as_save_IFS
11034 test -z "$as_dir" && as_dir=.
11035 for ac_exec_ext in '' $ac_executable_extensions; do
11036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11037 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11039 break 2
11040 fi
11041done
11042 done
11043IFS=$as_save_IFS
11044
11045 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11046 ;;
11047esac
11048fi
11049DTRACE=$ac_cv_path_DTRACE
11050if test -n "$DTRACE"; then
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11052$as_echo "$DTRACE" >&6; }
11053else
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055$as_echo "no" >&6; }
11056fi
11057
11058
11059 if test "$DTRACE" = "not found"; then
11060 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11061 fi
11062
11063$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11064
11065 DTRACE_HEADERS="Include/pydtrace_probes.h"
11066
11067 # On OS X, DTrace providers do not need to be explicitly compiled and
11068 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11069 # generation flag '-G'. We check for presence of this flag, rather than
11070 # hardcoding support by OS, in the interest of robustness.
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11072$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11073if ${ac_cv_dtrace_link+:} false; then :
11074 $as_echo_n "(cached) " >&6
11075else
11076 ac_cv_dtrace_link=no
11077 echo 'BEGIN' > conftest.d
11078 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11079 ac_cv_dtrace_link=yes
11080
11081fi
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11083$as_echo "$ac_cv_dtrace_link" >&6; }
11084 if test "$ac_cv_dtrace_link" = "yes"; then
11085 DTRACE_OBJS="Python/pydtrace.o"
11086 fi
11087fi
11088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011089# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011090
Guido van Rossum98935bf2001-09-05 19:13:16 +000011091DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011092
Guido van Rossume97ee181999-12-20 21:27:22 +000011093# the dlopen() function means we might want to use dynload_shlib.o. some
11094# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011095for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011096do :
11097 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011098if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011099 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011100#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011101_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011102
Guido van Rossume97ee181999-12-20 21:27:22 +000011103fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011104done
Guido van Rossume97ee181999-12-20 21:27:22 +000011105
Michael W. Hudson54241132001-12-07 15:38:26 +000011106
Guido van Rossume97ee181999-12-20 21:27:22 +000011107# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11108# loading of modules.
11109
Matthias Kloseb9621712010-04-24 17:59:49 +000011110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11111$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011112if test -z "$DYNLOADFILE"
11113then
11114 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011115 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11116 if test "$ac_cv_func_dlopen" = yes
11117 then DYNLOADFILE="dynload_shlib.o"
11118 else DYNLOADFILE="dynload_aix.o"
11119 fi
11120 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011121 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011122 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11123 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011124 *)
11125 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11126 # out any dynamic loading
11127 if test "$ac_cv_func_dlopen" = yes
11128 then DYNLOADFILE="dynload_shlib.o"
11129 else DYNLOADFILE="dynload_stub.o"
11130 fi
11131 ;;
11132 esac
11133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11135$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011136if test "$DYNLOADFILE" != "dynload_stub.o"
11137then
Martin v. Löwis11437992002-04-12 09:54:03 +000011138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011140
11141fi
11142
Neil Schemenauer4e425612001-06-19 15:44:15 +000011143# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11144
Michael W. Hudson54241132001-12-07 15:38:26 +000011145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11147$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011148if test -z "$MACHDEP_OBJS"
11149then
Jack Jansene578a632001-08-15 01:27:14 +000011150 MACHDEP_OBJS=$extra_machdep_objs
11151else
11152 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011153fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011154if test -z "$MACHDEP_OBJS"; then
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11156$as_echo "none" >&6; }
11157else
11158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11159$as_echo "$MACHDEP_OBJS" >&6; }
11160fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011161
Guido van Rossum627b2d71993-12-24 10:39:16 +000011162# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011163for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011164 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011165 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011166 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011167 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011168 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011169 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011170 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011171 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011172 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011173 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011174 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011175 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011176 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011177 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11178 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011179 sigaction sigaltstack siginterrupt sigpending sigrelse \
11180 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011181 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011182 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011183 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011184do :
11185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11186ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011187if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011189#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011190_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011192fi
11193done
11194
Michael W. Hudson54241132001-12-07 15:38:26 +000011195
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011196ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11197 #include <dirent.h>
11198"
11199if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11200
11201$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11202
11203fi
11204
11205
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011206# For some functions, having a definition is not sufficient, since
11207# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11209$as_echo_n "checking for chroot... " >&6; }
11210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011211/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011212#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011213int
11214main ()
11215{
11216void *x=chroot
11217 ;
11218 return 0;
11219}
11220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011222
Matthias Kloseb9621712010-04-24 17:59:49 +000011223$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011224
Matthias Kloseb159a552010-04-25 21:00:44 +000011225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011226$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011227else
Matthias Kloseb9621712010-04-24 17:59:49 +000011228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11229$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011230
11231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11234$as_echo_n "checking for link... " >&6; }
11235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011236/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011237#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011238int
11239main ()
11240{
11241void *x=link
11242 ;
11243 return 0;
11244}
11245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011249
Matthias Kloseb159a552010-04-25 21:00:44 +000011250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011252else
Matthias Kloseb9621712010-04-24 17:59:49 +000011253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11254$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011255
11256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11259$as_echo_n "checking for symlink... " >&6; }
11260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011261/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011262#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011263int
11264main ()
11265{
11266void *x=symlink
11267 ;
11268 return 0;
11269}
11270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011272
Matthias Kloseb9621712010-04-24 17:59:49 +000011273$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011274
Matthias Kloseb159a552010-04-25 21:00:44 +000011275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011277else
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11279$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011280
11281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11284$as_echo_n "checking for fchdir... " >&6; }
11285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011287#include <unistd.h>
11288int
11289main ()
11290{
11291void *x=fchdir
11292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011299
Matthias Kloseb159a552010-04-25 21:00:44 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011302else
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11304$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011305
11306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11309$as_echo_n "checking for fsync... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011312#include <unistd.h>
11313int
11314main ()
11315{
11316void *x=fsync
11317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011324
Matthias Kloseb159a552010-04-25 21:00:44 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011327else
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011330
11331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11334$as_echo_n "checking for fdatasync... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011336/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011337#include <unistd.h>
11338int
11339main ()
11340{
11341void *x=fdatasync
11342 ;
11343 return 0;
11344}
11345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011349
Matthias Kloseb159a552010-04-25 21:00:44 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011352else
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011355
11356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11359$as_echo_n "checking for epoll... " >&6; }
11360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011361/* end confdefs.h. */
11362#include <sys/epoll.h>
11363int
11364main ()
11365{
11366void *x=epoll_create
11367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011374
Matthias Kloseb159a552010-04-25 21:00:44 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011377else
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011380
11381fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11384$as_echo_n "checking for epoll_create1... " >&6; }
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11386/* end confdefs.h. */
11387#include <sys/epoll.h>
11388int
11389main ()
11390{
11391void *x=epoll_create1
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396if ac_fn_c_try_compile "$LINENO"; then :
11397
11398$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11399
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11401$as_echo "yes" >&6; }
11402else
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
11405
11406fi
11407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11409$as_echo_n "checking for kqueue... " >&6; }
11410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011411/* end confdefs.h. */
11412
11413#include <sys/types.h>
11414#include <sys/event.h>
11415
11416int
11417main ()
11418{
11419int x=kqueue()
11420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011427
Matthias Kloseb159a552010-04-25 21:00:44 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011430else
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011433
11434fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11437$as_echo_n "checking for prlimit... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439/* end confdefs.h. */
11440
11441#include <sys/time.h>
11442#include <sys/resource.h>
11443
11444int
11445main ()
11446{
11447void *x=prlimit
11448 ;
11449 return 0;
11450}
11451_ACEOF
11452if ac_fn_c_try_compile "$LINENO"; then :
11453
11454$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11455
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11457$as_echo "yes" >&6; }
11458else
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
11461
11462fi
11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11464
Martin v. Löwisd5843682002-11-21 20:41:28 +000011465# On some systems (eg. FreeBSD 5), we would find a definition of the
11466# functions ctermid_r, setgroups in the library, but no prototype
11467# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11468# address to avoid compiler warnings and potential miscompilations
11469# because of the missing prototypes.
11470
Matthias Kloseb9621712010-04-24 17:59:49 +000011471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11472$as_echo_n "checking for ctermid_r... " >&6; }
11473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011474/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011475
Martin v. Löwisd5843682002-11-21 20:41:28 +000011476#include <stdio.h>
11477
Martin v. Löwisd5843682002-11-21 20:41:28 +000011478int
11479main ()
11480{
11481void* p = ctermid_r
11482 ;
11483 return 0;
11484}
11485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011487
Matthias Kloseb9621712010-04-24 17:59:49 +000011488$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011489
Matthias Kloseb159a552010-04-25 21:00:44 +000011490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011491$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011492else
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011495
11496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11498
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11500$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011501if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011502 $as_echo_n "(cached) " >&6
11503else
11504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011505/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011506#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011507int
11508main ()
11509{
11510void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011511
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011517 ac_cv_flock_decl=yes
11518else
11519 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011520
11521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011523
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011524fi
11525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11526$as_echo "$ac_cv_flock_decl" >&6; }
11527if test "x${ac_cv_flock_decl}" = xyes; then
11528 for ac_func in flock
11529do :
11530 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011531if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011532 cat >>confdefs.h <<_ACEOF
11533#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011534_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011535
Antoine Pitroua3000072010-09-07 14:52:42 +000011536else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011538$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011539if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011540 $as_echo_n "(cached) " >&6
11541else
11542 ac_check_lib_save_LIBS=$LIBS
11543LIBS="-lbsd $LIBS"
11544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11545/* end confdefs.h. */
11546
11547/* Override any GCC internal prototype to avoid an error.
11548 Use char because int might match the return type of a GCC
11549 builtin and then its argument prototype would still apply. */
11550#ifdef __cplusplus
11551extern "C"
11552#endif
11553char flock ();
11554int
11555main ()
11556{
11557return flock ();
11558 ;
11559 return 0;
11560}
11561_ACEOF
11562if ac_fn_c_try_link "$LINENO"; then :
11563 ac_cv_lib_bsd_flock=yes
11564else
11565 ac_cv_lib_bsd_flock=no
11566fi
11567rm -f core conftest.err conftest.$ac_objext \
11568 conftest$ac_exeext conftest.$ac_ext
11569LIBS=$ac_check_lib_save_LIBS
11570fi
11571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11572$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011573if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011574 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011575
11576
11577$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11578
11579
11580fi
11581
11582
11583fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011584done
11585
Antoine Pitroua3000072010-09-07 14:52:42 +000011586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11589$as_echo_n "checking for getpagesize... " >&6; }
11590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011591/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011592
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011593#include <unistd.h>
11594
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011595int
11596main ()
11597{
11598void* p = getpagesize
11599 ;
11600 return 0;
11601}
11602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011603if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011606
Matthias Kloseb159a552010-04-25 21:00:44 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011608$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011612
11613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011615
Victor Stinner984890f2011-11-24 13:53:38 +010011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11617$as_echo_n "checking for broken unsetenv... " >&6; }
11618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11619/* end confdefs.h. */
11620
11621#include <stdlib.h>
11622
11623int
11624main ()
11625{
11626int res = unsetenv("DUMMY")
11627 ;
11628 return 0;
11629}
11630_ACEOF
11631if ac_fn_c_try_compile "$LINENO"; then :
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11633$as_echo "no" >&6; }
11634else
11635
11636$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11637
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11639$as_echo "yes" >&6; }
11640
11641fi
11642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11643
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011644for ac_prog in true
11645do
11646 # Extract the first word of "$ac_prog", so it can be a program name with args.
11647set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11649$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011650if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011652else
11653 if test -n "$TRUE"; then
11654 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11655else
11656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11657for as_dir in $PATH
11658do
11659 IFS=$as_save_IFS
11660 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011663 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 $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 +000011665 break 2
11666 fi
11667done
Matthias Kloseb9621712010-04-24 17:59:49 +000011668 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011670
11671fi
11672fi
11673TRUE=$ac_cv_prog_TRUE
11674if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11676$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011680fi
11681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011682
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011683 test -n "$TRUE" && break
11684done
11685test -n "$TRUE" || TRUE="/bin/true"
11686
11687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11689$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011690if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011692else
11693 ac_check_lib_save_LIBS=$LIBS
11694LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011696/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011697
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011698/* Override any GCC internal prototype to avoid an error.
11699 Use char because int might match the return type of a GCC
11700 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011701#ifdef __cplusplus
11702extern "C"
11703#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011704char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011705int
11706main ()
11707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011709 ;
11710 return 0;
11711}
11712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011713if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011714 ac_cv_lib_c_inet_aton=yes
11715else
Matthias Kloseb9621712010-04-24 17:59:49 +000011716 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011718rm -f core conftest.err conftest.$ac_objext \
11719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011720LIBS=$ac_check_lib_save_LIBS
11721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11723$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011724if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011725 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11728$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011729if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731else
11732 ac_check_lib_save_LIBS=$LIBS
11733LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011735/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011737/* Override any GCC internal prototype to avoid an error.
11738 Use char because int might match the return type of a GCC
11739 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740#ifdef __cplusplus
11741extern "C"
11742#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011743char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011744int
11745main ()
11746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011748 ;
11749 return 0;
11750}
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011753 ac_cv_lib_resolv_inet_aton=yes
11754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011757rm -f core conftest.err conftest.$ac_objext \
11758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011759LIBS=$ac_check_lib_save_LIBS
11760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11762$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011763if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011764 cat >>confdefs.h <<_ACEOF
11765#define HAVE_LIBRESOLV 1
11766_ACEOF
11767
11768 LIBS="-lresolv $LIBS"
11769
11770fi
11771
11772
11773fi
11774
11775
Christian Heimesd0764e22007-12-04 15:00:33 +000011776# On Tru64, chflags seems to be present, but calling it will
11777# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11779$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011780if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011784 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011787/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011788
Christian Heimesd0764e22007-12-04 15:00:33 +000011789#include <sys/stat.h>
11790#include <unistd.h>
11791int main(int argc, char*argv[])
11792{
11793 if(chflags(argv[0], 0) != 0)
11794 return 1;
11795 return 0;
11796}
Ned Deily3eb67d52011-06-28 00:00:28 -070011797
Christian Heimesd0764e22007-12-04 15:00:33 +000011798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011799if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011800 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011801else
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011806fi
11807
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011808
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11811$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011812if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011814if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011815 ac_cv_have_chflags="yes"
11816else
11817 ac_cv_have_chflags="no"
11818fi
11819
11820fi
11821if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011824
11825fi
11826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11828$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011829if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011833 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011834else
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011836/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011837
Christian Heimesd0764e22007-12-04 15:00:33 +000011838#include <sys/stat.h>
11839#include <unistd.h>
11840int main(int argc, char*argv[])
11841{
11842 if(lchflags(argv[0], 0) != 0)
11843 return 1;
11844 return 0;
11845}
Ned Deily3eb67d52011-06-28 00:00:28 -070011846
Christian Heimesd0764e22007-12-04 15:00:33 +000011847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011849 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011855fi
11856
11857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11860$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011861if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011862 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011864 ac_cv_have_lchflags="yes"
11865else
11866 ac_cv_have_lchflags="no"
11867fi
11868
11869fi
11870if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011873
11874fi
11875
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011876case $ac_sys_system/$ac_sys_release in
11877Darwin/*)
11878 _CUR_CFLAGS="${CFLAGS}"
11879 _CUR_LDFLAGS="${LDFLAGS}"
11880 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11881 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11882 ;;
11883esac
11884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11886$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011887if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011889else
11890 ac_check_lib_save_LIBS=$LIBS
11891LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011893/* end confdefs.h. */
11894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895/* Override any GCC internal prototype to avoid an error.
11896 Use char because int might match the return type of a GCC
11897 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011898#ifdef __cplusplus
11899extern "C"
11900#endif
11901char inflateCopy ();
11902int
11903main ()
11904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011905return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011906 ;
11907 return 0;
11908}
11909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011910if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011911 ac_cv_lib_z_inflateCopy=yes
11912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011915rm -f core conftest.err conftest.$ac_objext \
11916 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011917LIBS=$ac_check_lib_save_LIBS
11918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11920$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011921if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011924
11925fi
11926
11927
11928case $ac_sys_system/$ac_sys_release in
11929Darwin/*)
11930 CFLAGS="${_CUR_CFLAGS}"
11931 LDFLAGS="${_CUR_LDFLAGS}"
11932 ;;
11933esac
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11936$as_echo_n "checking for hstrerror... " >&6; }
11937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011939
Martin v. Löwise9416172003-05-03 10:12:45 +000011940#include <netdb.h>
11941
Martin v. Löwise9416172003-05-03 10:12:45 +000011942int
11943main ()
11944{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011945void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011946 ;
11947 return 0;
11948}
11949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011950if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011953
Matthias Kloseb159a552010-04-25 21:00:44 +000011954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011955$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11958$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011959
11960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011961rm -f core conftest.err conftest.$ac_objext \
11962 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11965$as_echo_n "checking for inet_aton... " >&6; }
11966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011967/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011968
Martin v. Löwis86d66262006-02-17 08:40:11 +000011969#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011970#include <sys/socket.h>
11971#include <netinet/in.h>
11972#include <arpa/inet.h>
11973
Martin v. Löwise9416172003-05-03 10:12:45 +000011974int
11975main ()
11976{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011977void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011978 ;
11979 return 0;
11980}
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011983
Matthias Kloseb9621712010-04-24 17:59:49 +000011984$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011985
Matthias Kloseb159a552010-04-25 21:00:44 +000011986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011987$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011991
11992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011993rm -f core conftest.err conftest.$ac_objext \
11994 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11997$as_echo_n "checking for inet_pton... " >&6; }
11998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012000
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012001#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012002#include <sys/socket.h>
12003#include <netinet/in.h>
12004#include <arpa/inet.h>
12005
Martin v. Löwise9416172003-05-03 10:12:45 +000012006int
12007main ()
12008{
12009void* p = inet_pton
12010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012017
Matthias Kloseb159a552010-04-25 21:00:44 +000012018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012019$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012020else
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12022$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012023
12024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012026
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012027# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12029$as_echo_n "checking for setgroups... " >&6; }
12030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012032
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012033#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012034#ifdef HAVE_GRP_H
12035#include <grp.h>
12036#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012037
Martin v. Löwisd5843682002-11-21 20:41:28 +000012038int
12039main ()
12040{
12041void* p = setgroups
12042 ;
12043 return 0;
12044}
12045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012049
Matthias Kloseb159a552010-04-25 21:00:44 +000012050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012052else
Matthias Kloseb9621712010-04-24 17:59:49 +000012053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012055
12056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012059# check for openpty and forkpty
12060
12061for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012062do :
12063 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012064if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012065 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012066#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012067_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012068
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12071$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012072if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012074else
Martin v. Löwis11437992002-04-12 09:54:03 +000012075 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012076LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080/* Override any GCC internal prototype to avoid an error.
12081 Use char because int might match the return type of a GCC
12082 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012083#ifdef __cplusplus
12084extern "C"
12085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012086char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012087int
12088main ()
12089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012090return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 ;
12092 return 0;
12093}
12094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012095if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012096 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012100rm -f core conftest.err conftest.$ac_objext \
12101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012102LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12105$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012106if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012108 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12111$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012112if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012114else
12115 ac_check_lib_save_LIBS=$LIBS
12116LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012118/* end confdefs.h. */
12119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012120/* Override any GCC internal prototype to avoid an error.
12121 Use char because int might match the return type of a GCC
12122 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012123#ifdef __cplusplus
12124extern "C"
12125#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012126char openpty ();
12127int
12128main ()
12129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012131 ;
12132 return 0;
12133}
12134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012135if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012136 ac_cv_lib_bsd_openpty=yes
12137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012140rm -f core conftest.err conftest.$ac_objext \
12141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012142LIBS=$ac_check_lib_save_LIBS
12143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12145$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012146if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012148 LIBS="$LIBS -lbsd"
12149fi
12150
12151
12152fi
12153
Fred Drake8cef4cf2000-06-28 16:40:38 +000012154
12155fi
12156done
12157
12158for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012159do :
12160 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012161if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012164_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012165
Fred Drake8cef4cf2000-06-28 16:40:38 +000012166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12168$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012171else
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012173LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177/* Override any GCC internal prototype to avoid an error.
12178 Use char because int might match the return type of a GCC
12179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012180#ifdef __cplusplus
12181extern "C"
12182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012183char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012184int
12185main ()
12186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 ;
12189 return 0;
12190}
12191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012197rm -f core conftest.err conftest.$ac_objext \
12198 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012199LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12202$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12208$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211else
12212 ac_check_lib_save_LIBS=$LIBS
12213LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215/* end confdefs.h. */
12216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217/* Override any GCC internal prototype to avoid an error.
12218 Use char because int might match the return type of a GCC
12219 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220#ifdef __cplusplus
12221extern "C"
12222#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223char forkpty ();
12224int
12225main ()
12226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012228 ;
12229 return 0;
12230}
12231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012233 ac_cv_lib_bsd_forkpty=yes
12234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012237rm -f core conftest.err conftest.$ac_objext \
12238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012239LIBS=$ac_check_lib_save_LIBS
12240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12242$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012245 LIBS="$LIBS -lbsd"
12246fi
12247
12248
12249fi
12250
Fred Drake8cef4cf2000-06-28 16:40:38 +000012251
12252fi
12253done
12254
Jack Jansendd19cf82001-12-06 22:36:17 +000012255
Christian Heimesb186d002008-03-18 15:15:01 +000012256# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012257for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012258do :
12259 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012260if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012262#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012263_ACEOF
12264
12265fi
12266done
12267
12268
Michael W. Hudson54241132001-12-07 15:38:26 +000012269# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012271do :
12272 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12273ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012274if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012276#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012277_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012279fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012280done
12281
Michael W. Hudson54241132001-12-07 15:38:26 +000012282
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012283ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012284if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012285 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012286
Martin v. Löwis1142de32002-03-29 16:28:31 +000012287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012289 *" dup2.$ac_objext "* ) ;;
12290 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012292esac
12293
Martin v. Löwis1142de32002-03-29 16:28:31 +000012294fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012295
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012296ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012297if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012298 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12299
12300else
12301 case " $LIBOBJS " in
12302 *" strdup.$ac_objext "* ) ;;
12303 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12304 ;;
12305esac
12306
12307fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012308
12309
12310for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012311do :
12312 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012313if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012314 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012319#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012320int
12321main ()
12322{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012323getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 ;
12325 return 0;
12326}
12327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012331
Guido van Rossum627b2d71993-12-24 10:39:16 +000012332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012334
Guido van Rossum627b2d71993-12-24 10:39:16 +000012335fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012336done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012337
Jack Jansen150753c2003-03-29 22:07:47 +000012338for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012339do :
12340 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012341if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012342 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012347#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012348int
12349main ()
12350{
12351setpgrp(0,0);
12352 ;
12353 return 0;
12354}
12355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
Matthias Kloseb9621712010-04-24 17:59:49 +000012358$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012359
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012362
12363fi
12364done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012365
Thomas Wouters3a584202000-08-05 23:28:51 +000012366for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012367do :
12368 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012369if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012374/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012375#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012376int
12377main ()
12378{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012379gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 ;
12381 return 0;
12382}
12383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012384if ac_fn_c_try_compile "$LINENO"; then :
12385
Guido van Rossum627b2d71993-12-24 10:39:16 +000012386else
Skip Montanaro6dead952003-09-25 14:50:04 +000012387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Guido van Rossum627b2d71993-12-24 10:39:16 +000012391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012393
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012395done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012396
Michael W. Hudson54241132001-12-07 15:38:26 +000012397
Victor Stinnere0be4232011-10-25 13:06:09 +020012398for ac_func in clock_gettime
12399do :
12400 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12401if test "x$ac_cv_func_clock_gettime" = xyes; then :
12402 cat >>confdefs.h <<_ACEOF
12403#define HAVE_CLOCK_GETTIME 1
12404_ACEOF
12405
12406else
12407
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12409$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12410if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12411 $as_echo_n "(cached) " >&6
12412else
12413 ac_check_lib_save_LIBS=$LIBS
12414LIBS="-lrt $LIBS"
12415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12416/* end confdefs.h. */
12417
12418/* Override any GCC internal prototype to avoid an error.
12419 Use char because int might match the return type of a GCC
12420 builtin and then its argument prototype would still apply. */
12421#ifdef __cplusplus
12422extern "C"
12423#endif
12424char clock_gettime ();
12425int
12426main ()
12427{
12428return clock_gettime ();
12429 ;
12430 return 0;
12431}
12432_ACEOF
12433if ac_fn_c_try_link "$LINENO"; then :
12434 ac_cv_lib_rt_clock_gettime=yes
12435else
12436 ac_cv_lib_rt_clock_gettime=no
12437fi
12438rm -f core conftest.err conftest.$ac_objext \
12439 conftest$ac_exeext conftest.$ac_ext
12440LIBS=$ac_check_lib_save_LIBS
12441fi
12442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12443$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12444if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12445
Victor Stinner7efb8332014-08-29 15:41:08 +020012446 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012447 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12448
12449
12450$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12451
12452
12453fi
12454
12455
12456fi
12457done
12458
12459
12460for ac_func in clock_getres
12461do :
12462 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12463if test "x$ac_cv_func_clock_getres" = xyes; then :
12464 cat >>confdefs.h <<_ACEOF
12465#define HAVE_CLOCK_GETRES 1
12466_ACEOF
12467
12468else
12469
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12471$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12472if ${ac_cv_lib_rt_clock_getres+:} false; then :
12473 $as_echo_n "(cached) " >&6
12474else
12475 ac_check_lib_save_LIBS=$LIBS
12476LIBS="-lrt $LIBS"
12477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12478/* end confdefs.h. */
12479
12480/* Override any GCC internal prototype to avoid an error.
12481 Use char because int might match the return type of a GCC
12482 builtin and then its argument prototype would still apply. */
12483#ifdef __cplusplus
12484extern "C"
12485#endif
12486char clock_getres ();
12487int
12488main ()
12489{
12490return clock_getres ();
12491 ;
12492 return 0;
12493}
12494_ACEOF
12495if ac_fn_c_try_link "$LINENO"; then :
12496 ac_cv_lib_rt_clock_getres=yes
12497else
12498 ac_cv_lib_rt_clock_getres=no
12499fi
12500rm -f core conftest.err conftest.$ac_objext \
12501 conftest$ac_exeext conftest.$ac_ext
12502LIBS=$ac_check_lib_save_LIBS
12503fi
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12505$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12506if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12507
12508 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12509
12510
12511fi
12512
12513
12514fi
12515done
12516
12517
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012518for ac_func in clock_settime
12519do :
12520 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12521if test "x$ac_cv_func_clock_settime" = xyes; then :
12522 cat >>confdefs.h <<_ACEOF
12523#define HAVE_CLOCK_SETTIME 1
12524_ACEOF
12525
12526else
12527
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12529$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12530if ${ac_cv_lib_rt_clock_settime+:} false; then :
12531 $as_echo_n "(cached) " >&6
12532else
12533 ac_check_lib_save_LIBS=$LIBS
12534LIBS="-lrt $LIBS"
12535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12536/* end confdefs.h. */
12537
12538/* Override any GCC internal prototype to avoid an error.
12539 Use char because int might match the return type of a GCC
12540 builtin and then its argument prototype would still apply. */
12541#ifdef __cplusplus
12542extern "C"
12543#endif
12544char clock_settime ();
12545int
12546main ()
12547{
12548return clock_settime ();
12549 ;
12550 return 0;
12551}
12552_ACEOF
12553if ac_fn_c_try_link "$LINENO"; then :
12554 ac_cv_lib_rt_clock_settime=yes
12555else
12556 ac_cv_lib_rt_clock_settime=no
12557fi
12558rm -f core conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
12560LIBS=$ac_check_lib_save_LIBS
12561fi
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12563$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12564if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12565
12566 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12567
12568
12569fi
12570
12571
12572fi
12573done
12574
12575
Matthias Kloseb9621712010-04-24 17:59:49 +000012576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12577$as_echo_n "checking for major... " >&6; }
12578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012579/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012580
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012581#if defined(MAJOR_IN_MKDEV)
12582#include <sys/mkdev.h>
12583#elif defined(MAJOR_IN_SYSMACROS)
12584#include <sys/sysmacros.h>
12585#else
12586#include <sys/types.h>
12587#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012588
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012589int
12590main ()
12591{
12592
12593 makedev(major(0),minor(0));
12594
12595 ;
12596 return 0;
12597}
12598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012599if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012600
12601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12605$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012606
12607else
Skip Montanaro6dead952003-09-25 14:50:04 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12610$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012611
12612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012613rm -f core conftest.err conftest.$ac_objext \
12614 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012615
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012616# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12617# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12619$as_echo_n "checking for if_nameindex... " >&6; }
12620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12621/* end confdefs.h. */
12622
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012623#include <stdio.h>
12624#ifdef STDC_HEADERS
12625# include <stdlib.h>
12626# include <stddef.h>
12627#else
12628# ifdef HAVE_STDLIB_H
12629# include <stdlib.h>
12630# endif
12631#endif
12632#ifdef HAVE_SYS_SOCKET_H
12633# include <sys/socket.h>
12634#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012635#ifdef HAVE_NET_IF_H
12636# include <net/if.h>
12637#endif
12638
12639int
12640main ()
12641{
12642struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12643 ;
12644 return 0;
12645}
12646_ACEOF
12647if ac_fn_c_try_link "$LINENO"; then :
12648
12649$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12650
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12652$as_echo "yes" >&6; }
12653else
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12655$as_echo "no" >&6; }
12656
12657fi
12658rm -f core conftest.err conftest.$ac_objext \
12659 conftest$ac_exeext conftest.$ac_ext
12660
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012661# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12662# macro is not defined in android-ndk-r13.
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12664$as_echo_n "checking for lockf... " >&6; }
12665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666/* end confdefs.h. */
12667#include <unistd.h>
12668int
12669main ()
12670{
12671lockf(0, F_LOCK, 0);
12672 ;
12673 return 0;
12674}
12675_ACEOF
12676if ac_fn_c_try_link "$LINENO"; then :
12677
12678$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12679
12680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12681$as_echo "yes" >&6; }
12682else
12683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12684$as_echo "no" >&6; }
12685
12686fi
12687rm -f core conftest.err conftest.$ac_objext \
12688 conftest$ac_exeext conftest.$ac_ext
12689
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012690# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012691# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12693$as_echo_n "checking for getaddrinfo... " >&6; }
12694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012696
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012697#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012698#include <sys/socket.h>
12699#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012700#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012701
Martin v. Löwis11437992002-04-12 09:54:03 +000012702int
12703main ()
12704{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012705getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012706 ;
12707 return 0;
12708}
12709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012711 have_getaddrinfo=yes
12712else
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012715rm -f core conftest.err conftest.$ac_objext \
12716 conftest$ac_exeext conftest.$ac_ext
12717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12718$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012719if test $have_getaddrinfo = yes
12720then
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12722$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012723 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012727
12728if test "${enable_ipv6+set}" = set; then
12729 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12730else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012731 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012732fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012733else
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012735/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012736
Stefan Krah19c21392012-11-22 23:47:32 +010012737#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012738#include <sys/types.h>
12739#include <netdb.h>
12740#include <string.h>
12741#include <sys/socket.h>
12742#include <netinet/in.h>
12743
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012744int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012745{
12746 int passive, gaierr, inet4 = 0, inet6 = 0;
12747 struct addrinfo hints, *ai, *aitop;
12748 char straddr[INET6_ADDRSTRLEN], strport[16];
12749
12750 for (passive = 0; passive <= 1; passive++) {
12751 memset(&hints, 0, sizeof(hints));
12752 hints.ai_family = AF_UNSPEC;
12753 hints.ai_flags = passive ? AI_PASSIVE : 0;
12754 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012755 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012756 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12757 (void)gai_strerror(gaierr);
12758 goto bad;
12759 }
12760 for (ai = aitop; ai; ai = ai->ai_next) {
12761 if (ai->ai_addr == NULL ||
12762 ai->ai_addrlen == 0 ||
12763 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12764 straddr, sizeof(straddr), strport, sizeof(strport),
12765 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12766 goto bad;
12767 }
12768 switch (ai->ai_family) {
12769 case AF_INET:
12770 if (strcmp(strport, "54321") != 0) {
12771 goto bad;
12772 }
12773 if (passive) {
12774 if (strcmp(straddr, "0.0.0.0") != 0) {
12775 goto bad;
12776 }
12777 } else {
12778 if (strcmp(straddr, "127.0.0.1") != 0) {
12779 goto bad;
12780 }
12781 }
12782 inet4++;
12783 break;
12784 case AF_INET6:
12785 if (strcmp(strport, "54321") != 0) {
12786 goto bad;
12787 }
12788 if (passive) {
12789 if (strcmp(straddr, "::") != 0) {
12790 goto bad;
12791 }
12792 } else {
12793 if (strcmp(straddr, "::1") != 0) {
12794 goto bad;
12795 }
12796 }
12797 inet6++;
12798 break;
12799 case AF_UNSPEC:
12800 goto bad;
12801 break;
12802 default:
12803 /* another family support? */
12804 break;
12805 }
12806 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012807 freeaddrinfo(aitop);
12808 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012809 }
12810
12811 if (!(inet4 == 0 || inet4 == 2))
12812 goto bad;
12813 if (!(inet6 == 0 || inet6 == 2))
12814 goto bad;
12815
12816 if (aitop)
12817 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012818 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012819
12820 bad:
12821 if (aitop)
12822 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012823 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012824}
12825
Martin v. Löwis11437992002-04-12 09:54:03 +000012826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012827if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012828 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012829else
Matthias Kloseb9621712010-04-24 17:59:49 +000012830 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012835
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012836fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012837
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12841$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12842
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012843if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012844then
12845 if test $ipv6 = yes
12846 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012847 echo 'Fatal: You must get working getaddrinfo() function.'
12848 echo ' or you can specify "--disable-ipv6"'.
12849 exit 1
12850 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012851else
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012854
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012855fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012856
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012857for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012858do :
12859 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012860if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012862#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012863_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012864
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012865fi
12866done
12867
Michael W. Hudson54241132001-12-07 15:38:26 +000012868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012869# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12871$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012872if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877#include <sys/types.h>
12878#include <sys/time.h>
12879#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012880
Martin v. Löwis11437992002-04-12 09:54:03 +000012881int
12882main ()
12883{
12884if ((struct tm *) 0)
12885return 0;
12886 ;
12887 return 0;
12888}
12889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012890if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012891 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012892else
Matthias Kloseb9621712010-04-24 17:59:49 +000012893 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12898$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012899if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902
12903fi
12904
Matthias Kloseb9621712010-04-24 17:59:49 +000012905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12906$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012907if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012911/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012912#include <sys/types.h>
12913#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012914
Martin v. Löwis11437992002-04-12 09:54:03 +000012915int
12916main ()
12917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012918struct tm tm;
12919 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012921 ;
12922 return 0;
12923}
12924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012925if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926 ac_cv_struct_tm=time.h
12927else
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12933$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012934if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012937
12938fi
12939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940ac_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 +000012941#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943"
Victor Stinnere0be4232011-10-25 13:06:09 +020012944if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012945
12946cat >>confdefs.h <<_ACEOF
12947#define HAVE_STRUCT_TM_TM_ZONE 1
12948_ACEOF
12949
12950
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012951fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012952
Martin v. Löwis11437992002-04-12 09:54:03 +000012953if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956
12957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12959"
Victor Stinnere0be4232011-10-25 13:06:09 +020012960if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964fi
12965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012966cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012967#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968_ACEOF
12969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12971$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012972if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974else
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012976/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012977#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978#if !HAVE_DECL_TZNAME
12979extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012985return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 ;
12987 return 0;
12988}
12989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012991 ac_cv_var_tzname=yes
12992else
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012995rm -f core conftest.err conftest.$ac_objext \
12996 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12999$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013000 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013003
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004 fi
13005fi
13006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007ac_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 +020013008if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013009
13010cat >>confdefs.h <<_ACEOF
13011#define HAVE_STRUCT_STAT_ST_RDEV 1
13012_ACEOF
13013
13014
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013015fi
13016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017ac_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 +020013018if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013019
Martin v. Löwis11437992002-04-12 09:54:03 +000013020cat >>confdefs.h <<_ACEOF
13021#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13022_ACEOF
13023
13024
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013025fi
13026
Matthias Kloseb9621712010-04-24 17:59:49 +000013027ac_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 +020013028if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013029
13030cat >>confdefs.h <<_ACEOF
13031#define HAVE_STRUCT_STAT_ST_FLAGS 1
13032_ACEOF
13033
13034
13035fi
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037ac_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 +020013038if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013039
13040cat >>confdefs.h <<_ACEOF
13041#define HAVE_STRUCT_STAT_ST_GEN 1
13042_ACEOF
13043
13044
13045fi
13046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047ac_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 +020013048if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013049
13050cat >>confdefs.h <<_ACEOF
13051#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13052_ACEOF
13053
13054
13055fi
13056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057ac_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 +020013058if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013059
Martin v. Löwis11437992002-04-12 09:54:03 +000013060cat >>confdefs.h <<_ACEOF
13061#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13062_ACEOF
13063
13064
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013065fi
13066
Stefan Krah267b6392016-04-26 01:09:18 +020013067ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13068 #include <sys/types.h>
13069 #include <pwd.h>
13070
13071"
13072if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13073
13074cat >>confdefs.h <<_ACEOF
13075#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13076_ACEOF
13077
13078
13079fi
13080ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13081 #include <sys/types.h>
13082 #include <pwd.h>
13083
13084"
13085if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13086
13087cat >>confdefs.h <<_ACEOF
13088#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13089_ACEOF
13090
13091
13092fi
13093
Zachary Ware6a6967e2016-10-01 00:47:27 -050013094# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13095ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13096"
13097if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13098
13099cat >>confdefs.h <<_ACEOF
13100#define HAVE_SIGINFO_T_SI_BAND 1
13101_ACEOF
13102
13103
13104fi
13105
Michael W. Hudson54241132001-12-07 15:38:26 +000013106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13108$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013109if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111else
Matthias Kloseb159a552010-04-25 21:00:44 +000013112
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013114/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013115#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013116int
13117main ()
13118{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ;
13121 return 0;
13122}
13123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125 ac_cv_header_time_altzone=yes
13126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131fi
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13134$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013136
Matthias Kloseb9621712010-04-24 17:59:49 +000013137$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013138
13139fi
13140
Guido van Rossumda88dad1995-01-26 00:46:29 +000013141was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13143$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013145/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013146
13147#include <sys/types.h>
13148#include <sys/select.h>
13149#include <sys/time.h>
13150
Martin v. Löwis11437992002-04-12 09:54:03 +000013151int
13152main ()
13153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154;
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 ;
13156 return 0;
13157}
13158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013160
13161
Matthias Kloseb9621712010-04-24 17:59:49 +000013162$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013163
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013164 was_it_defined=yes
13165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13169$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13172$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013173if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013177/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013178#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013179int
13180main ()
13181{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013183 ;
13184 return 0;
13185}
13186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013188 ac_cv_struct_addrinfo=yes
13189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13193fi
13194
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13196$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013197if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013200
13201fi
13202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13204$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013205if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207else
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013209/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013210
13211# include <sys/types.h>
13212# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013213int
13214main ()
13215{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 ;
13218 return 0;
13219}
13220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222 ac_cv_struct_sockaddr_storage=yes
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227fi
13228
Matthias Kloseb9621712010-04-24 17:59:49 +000013229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13230$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Matthias Kloseb9621712010-04-24 17:59:49 +000013233$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234
13235fi
13236
Christian Heimesdffa3942016-09-05 23:54:41 +020013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13238$as_echo_n "checking for sockaddr_alg... " >&6; }
13239if ${ac_cv_struct_sockaddr_alg+:} false; then :
13240 $as_echo_n "(cached) " >&6
13241else
13242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13243/* end confdefs.h. */
13244
13245# include <sys/types.h>
13246# include <sys/socket.h>
13247# include <linux/if_alg.h>
13248int
13249main ()
13250{
13251struct sockaddr_alg s
13252 ;
13253 return 0;
13254}
13255_ACEOF
13256if ac_fn_c_try_compile "$LINENO"; then :
13257 ac_cv_struct_sockaddr_alg=yes
13258else
13259 ac_cv_struct_sockaddr_alg=no
13260fi
13261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13262fi
13263
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13265$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13266if test $ac_cv_struct_sockaddr_alg = yes; then
13267
13268$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13269
13270fi
13271
Guido van Rossum627b2d71993-12-24 10:39:16 +000013272# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13275$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013276if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013278else
Matthias Kloseb9621712010-04-24 17:59:49 +000013279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013281$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013282int
13283main ()
13284{
13285static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013286test_array [0] = 0;
13287return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
13289 ;
13290 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013291}
Martin v. Löwis11437992002-04-12 09:54:03 +000013292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013294 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13301$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013302if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013304
13305fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13308$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013309if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314
Martin v. Löwis11437992002-04-12 09:54:03 +000013315int
13316main ()
13317{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013318
Martin v. Löwis11437992002-04-12 09:54:03 +000013319#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013320 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013321 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013322 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324 char const *const *pcpcc;
13325 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 /* NEC SVR4.0.2 mips cc rejects this. */
13327 struct point {int x, y;};
13328 static struct point const zero = {0,0};
13329 /* AIX XL C 1.02.0.0 rejects this.
13330 It does not let you subtract one const X* pointer from another in
13331 an arm of an if-expression whose if-part is not a constant
13332 expression */
13333 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336 ++pcpcc;
13337 ppc = (char**) pcpcc;
13338 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013339 { /* SCO 3.2v4 cc rejects this sort of thing. */
13340 char tx;
13341 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 }
13347 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13348 int x[] = {25, 17};
13349 const int *foo = &x[0];
13350 ++foo;
13351 }
13352 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13353 typedef const int *iptr;
13354 iptr p = 0;
13355 ++p;
13356 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013357 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013358 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013359 struct s { int j; const int *ap[3]; } bx;
13360 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 }
13362 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13363 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013367#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013368
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 ;
13370 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013371}
Martin v. Löwis11437992002-04-12 09:54:03 +000013372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013374 ac_cv_c_const=yes
13375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13381$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013385
13386fi
13387
Michael W. Hudson54241132001-12-07 15:38:26 +000013388
Guido van Rossumda88dad1995-01-26 00:46:29 +000013389works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13391$as_echo_n "checking for working signed char... " >&6; }
13392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013393/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013394
Martin v. Löwis11437992002-04-12 09:54:03 +000013395int
13396main ()
13397{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398signed char c;
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 :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013404 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013405else
Skip Montanaro6dead952003-09-25 14:50:04 +000013406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013408
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013409
Guido van Rossum7f43da71994-08-01 12:15:30 +000013410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13413$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013414
Guido van Rossumda88dad1995-01-26 00:46:29 +000013415have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13417$as_echo_n "checking for prototypes... " >&6; }
13418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013419/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013420int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013421int
13422main ()
13423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013424return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 ;
13426 return 0;
13427}
13428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Matthias Kloseb159a552010-04-25 21:00:44 +000013433 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13437$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013438
Guido van Rossumda88dad1995-01-26 00:46:29 +000013439works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13441$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013443/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013444
13445#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013446int foo(int x, ...) {
13447 va_list va;
13448 va_start(va, x);
13449 va_arg(va, int);
13450 va_arg(va, char *);
13451 va_arg(va, double);
13452 return 0;
13453}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013454
Martin v. Löwis11437992002-04-12 09:54:03 +000013455int
13456main ()
13457{
Guido van Rossum90eea071996-08-30 20:58:57 +000013458return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 ;
13460 return 0;
13461}
13462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
13465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013468 works=yes
13469
Guido van Rossum627b2d71993-12-24 10:39:16 +000013470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13473$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013474
Martin v. Löwisd6320502004-08-12 13:45:08 +000013475# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13477$as_echo_n "checking for socketpair... " >&6; }
13478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013479/* end confdefs.h. */
13480
13481#include <sys/types.h>
13482#include <sys/socket.h>
13483
13484int
13485main ()
13486{
13487void *x=socketpair
13488 ;
13489 return 0;
13490}
13491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013495
Matthias Kloseb159a552010-04-25 21:00:44 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013497$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13500$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013501
13502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013504
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013505# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13507$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013509/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013510#include <sys/types.h>
13511#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013512int
13513main ()
13514{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013515struct sockaddr x;
13516x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013517 ;
13518 return 0;
13519}
13520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013521if ac_fn_c_try_compile "$LINENO"; then :
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13523$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013526
13527else
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13529$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013530
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013534# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013538if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13543$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013544 OLD_CFLAGS=$CFLAGS
13545 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013548
13549# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Martin v. Löwis11437992002-04-12 09:54:03 +000013551int
13552main ()
13553{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013554
13555 char *name;
13556 struct hostent *he, *res;
13557 char buffer[2048];
13558 int buflen = 2048;
13559 int h_errnop;
13560
13561 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
13563 ;
13564 return 0;
13565}
13566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013570
Martin v. Löwis11437992002-04-12 09:54:03 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13575$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013577else
Skip Montanaro6dead952003-09-25 14:50:04 +000013578
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13580$as_echo "no" >&6; }
13581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13582$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013584/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013586# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Martin v. Löwis11437992002-04-12 09:54:03 +000013588int
13589main ()
13590{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013591
13592 char *name;
13593 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013594 char buffer[2048];
13595 int buflen = 2048;
13596 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013597
Matthias Kloseb159a552010-04-25 21:00:44 +000013598 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013599
13600 ;
13601 return 0;
13602}
13603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013607
Martin v. Löwis11437992002-04-12 09:54:03 +000013608
Matthias Kloseb159a552010-04-25 21:00:44 +000013609$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13612$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013614else
Skip Montanaro6dead952003-09-25 14:50:04 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13617$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13619$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621/* end confdefs.h. */
13622
13623# include <netdb.h>
13624
13625int
13626main ()
13627{
13628
13629 char *name;
13630 struct hostent *he;
13631 struct hostent_data data;
13632
13633 (void) gethostbyname_r(name, he, &data);
13634
13635 ;
13636 return 0;
13637}
13638_ACEOF
13639if ac_fn_c_try_compile "$LINENO"; then :
13640
13641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13642
13643
13644$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13645
13646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13647$as_echo "yes" >&6; }
13648
13649else
13650
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013653
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013662 CFLAGS=$OLD_CFLAGS
13663
13664else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013665
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 for ac_func in gethostbyname
13667do :
13668 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013669if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013671#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013672_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013674fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013675done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013676
Michael W. Hudson54241132001-12-07 15:38:26 +000013677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678fi
13679
Michael W. Hudson54241132001-12-07 15:38:26 +000013680
13681
13682
13683
13684
13685
Guido van Rossum627b2d71993-12-24 10:39:16 +000013686# checks for system services
13687# (none yet)
13688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013689# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013690ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013691if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013692
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13695$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013696if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013698else
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013700LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704/* Override any GCC internal prototype to avoid an error.
13705 Use char because int might match the return type of a GCC
13706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013707#ifdef __cplusplus
13708extern "C"
13709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013710char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013711int
13712main ()
13713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013715 ;
13716 return 0;
13717}
13718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724rm -f core conftest.err conftest.$ac_objext \
13725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13729$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013730if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 cat >>confdefs.h <<_ACEOF
13732#define HAVE_LIBIEEE 1
13733_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013735 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013736
Guido van Rossum627b2d71993-12-24 10:39:16 +000013737fi
13738
Michael W. Hudson54241132001-12-07 15:38:26 +000013739
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013740fi
13741
Michael W. Hudson54241132001-12-07 15:38:26 +000013742
Guido van Rossum7f253911997-05-09 02:42:48 +000013743# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13745$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013748if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013749 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013750if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013751then
13752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13756$as_echo "yes" >&6; }
13757else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13758$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013759fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013760else
Matthias Kloseb9621712010-04-24 17:59:49 +000013761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13762$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013763fi
13764
Guido van Rossum7f253911997-05-09 02:42:48 +000013765
Guido van Rossum7f43da71994-08-01 12:15:30 +000013766# check for --with-libm=...
13767
Guido van Rossum563e7081996-09-10 18:20:48 +000013768case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013769Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013770*) LIBM=-lm
13771esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13773$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013775# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013776if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013777 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013778if test "$withval" = no
13779then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13781$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013782elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013783then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13785$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013786else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013787fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013788else
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13790$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791fi
13792
Guido van Rossum7f43da71994-08-01 12:15:30 +000013793
13794# check for --with-libc=...
13795
Matthias Kloseb9621712010-04-24 17:59:49 +000013796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13797$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013800if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013802if test "$withval" = no
13803then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13805$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013806elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013807then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13809$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013810else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013811fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013812else
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13814$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815fi
13816
Guido van Rossum7f43da71994-08-01 12:15:30 +000013817
Stefan Krah1919b7e2012-03-21 18:25:23 +010013818# **************************************
13819# * Check for gcc x64 inline assembler *
13820# **************************************
13821
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13823$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825/* end confdefs.h. */
13826
13827int
13828main ()
13829{
13830
13831 __asm__ __volatile__ ("movq %rcx, %rax");
13832
13833 ;
13834 return 0;
13835}
13836_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013837if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013838 have_gcc_asm_for_x64=yes
13839else
13840 have_gcc_asm_for_x64=no
13841fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013842rm -f core conftest.err conftest.$ac_objext \
13843 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13845$as_echo "$have_gcc_asm_for_x64" >&6; }
13846if test "$have_gcc_asm_for_x64" = yes
13847then
13848
13849$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13850
13851fi
13852
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013853# **************************************************
13854# * Check for various properties of floating point *
13855# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13858$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013859if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013861else
13862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864 ac_cv_little_endian_double=no
13865else
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867/* end confdefs.h. */
13868
13869#include <string.h>
13870int main() {
13871 double x = 9006104071832581.0;
13872 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13873 return 0;
13874 else
13875 return 1;
13876}
13877
13878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013879if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013880 ac_cv_little_endian_double=yes
13881else
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013886fi
13887
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013888fi
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13891$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892if test "$ac_cv_little_endian_double" = yes
13893then
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013896
13897fi
13898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13900$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013901if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903else
13904
Matthias Kloseb9621712010-04-24 17:59:49 +000013905if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906 ac_cv_big_endian_double=no
13907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909/* end confdefs.h. */
13910
13911#include <string.h>
13912int main() {
13913 double x = 9006104071832581.0;
13914 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13915 return 0;
13916 else
13917 return 1;
13918}
13919
13920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013921if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013922 ac_cv_big_endian_double=yes
13923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013928fi
13929
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930fi
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13933$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934if test "$ac_cv_big_endian_double" = yes
13935then
13936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938
13939fi
13940
13941# Some ARM platforms use a mixed-endian representation for doubles.
13942# While Python doesn't currently have full support for these platforms
13943# (see e.g., issue 1762561), we can at least make sure that float <-> string
13944# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13946$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949else
13950
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952 ac_cv_mixed_endian_double=no
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013955/* end confdefs.h. */
13956
13957#include <string.h>
13958int main() {
13959 double x = 9006104071832581.0;
13960 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13961 return 0;
13962 else
13963 return 1;
13964}
13965
13966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968 ac_cv_mixed_endian_double=yes
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013974fi
13975
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976fi
13977
Matthias Kloseb9621712010-04-24 17:59:49 +000013978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13979$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013980if test "$ac_cv_mixed_endian_double" = yes
13981then
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984
13985fi
13986
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013987# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013988# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013989# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013990# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013991# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013992# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013993
13994# This inline assembler syntax may also work for suncc and icc,
13995# so we try it on all platforms.
13996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13998$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000/* end confdefs.h. */
14001
14002int
14003main ()
14004{
14005
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014006 unsigned short cw;
14007 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14008 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014009
14010 ;
14011 return 0;
14012}
14013_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014014if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014015 have_gcc_asm_for_x87=yes
14016else
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014019rm -f core conftest.err conftest.$ac_objext \
14020 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14022$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014023if test "$have_gcc_asm_for_x87" = yes
14024then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014027
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014028fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14031$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033/* end confdefs.h. */
14034
14035int
14036main ()
14037{
14038
14039 unsigned int fpcr;
14040 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14041 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14042
14043 ;
14044 return 0;
14045}
14046_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014047if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014048 have_gcc_asm_for_mc68881=yes
14049else
14050 have_gcc_asm_for_mc68881=no
14051fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014052rm -f core conftest.err conftest.$ac_objext \
14053 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14055$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14056if test "$have_gcc_asm_for_mc68881" = yes
14057then
14058
14059$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14060
14061fi
14062
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014063# Detect whether system arithmetic is subject to x87-style double
14064# rounding issues. The result of this test has little meaning on non
14065# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14066# mode is round-to-nearest and double rounding issues are present, and
14067# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14069$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014070# $BASECFLAGS may affect the result
14071ac_save_cc="$CC"
14072CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014073if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014074 ac_cv_x87_double_rounding=no
14075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014077/* end confdefs.h. */
14078
14079#include <stdlib.h>
14080#include <math.h>
14081int main() {
14082 volatile double x, y, z;
14083 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14084 x = 0.99999999999999989; /* 1-2**-53 */
14085 y = 1./x;
14086 if (y != 1.)
14087 exit(0);
14088 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14089 x = 1e16;
14090 y = 2.99999;
14091 z = x + y;
14092 if (z != 1e16+4.)
14093 exit(0);
14094 /* both tests show evidence of double rounding */
14095 exit(1);
14096}
14097
14098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014099if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014100 ac_cv_x87_double_rounding=no
14101else
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014106fi
14107
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014108CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14110$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014111if test "$ac_cv_x87_double_rounding" = yes
14112then
14113
Matthias Kloseb9621712010-04-24 17:59:49 +000014114$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014115
14116fi
14117
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014118# ************************************
14119# * Check for mathematical functions *
14120# ************************************
14121
14122LIBS_SAVE=$LIBS
14123LIBS="$LIBS $LIBM"
14124
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014125for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14126do :
14127 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14128ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014129if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014130 cat >>confdefs.h <<_ACEOF
14131#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14132_ACEOF
14133
14134fi
14135done
14136
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014137for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014138do :
14139 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14140ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014141if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014142 cat >>confdefs.h <<_ACEOF
14143#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14144_ACEOF
14145
14146fi
14147done
14148
14149ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14150"
Victor Stinnere0be4232011-10-25 13:06:09 +020014151if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014152 ac_have_decl=1
14153else
14154 ac_have_decl=0
14155fi
14156
14157cat >>confdefs.h <<_ACEOF
14158#define HAVE_DECL_ISINF $ac_have_decl
14159_ACEOF
14160ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14161"
Victor Stinnere0be4232011-10-25 13:06:09 +020014162if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014163 ac_have_decl=1
14164else
14165 ac_have_decl=0
14166fi
14167
14168cat >>confdefs.h <<_ACEOF
14169#define HAVE_DECL_ISNAN $ac_have_decl
14170_ACEOF
14171ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14172"
Victor Stinnere0be4232011-10-25 13:06:09 +020014173if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014174 ac_have_decl=1
14175else
14176 ac_have_decl=0
14177fi
14178
14179cat >>confdefs.h <<_ACEOF
14180#define HAVE_DECL_ISFINITE $ac_have_decl
14181_ACEOF
14182
14183
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014184# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14185# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14187$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014188if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014190else
14191
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014193 ac_cv_tanh_preserves_zero_sign=no
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014196/* end confdefs.h. */
14197
14198#include <math.h>
14199#include <stdlib.h>
14200int main() {
14201 /* return 0 if either negative zeros don't exist
14202 on this platform or if negative zeros exist
14203 and tanh(-0.) == -0. */
14204 if (atan2(0., -1.) == atan2(-0., -1.) ||
14205 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14206 else exit(1);
14207}
14208
14209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014210if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014211 ac_cv_tanh_preserves_zero_sign=yes
14212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014217fi
14218
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014219fi
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14222$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014223if test "$ac_cv_tanh_preserves_zero_sign" = yes
14224then
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014227
14228fi
14229
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014230if test "$ac_cv_func_log1p" = yes
14231then
14232 # On some versions of AIX, log1p(-0.) returns 0. instead of
14233 # -0. See issue #9920.
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14235$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014236 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014237 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014238else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014239
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014240 if test "$cross_compiling" = yes; then :
14241 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014242else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14244/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014245
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014246 #include <math.h>
14247 #include <stdlib.h>
14248 int main() {
14249 /* Fail if the signs of log1p(-0.) and -0. can be
14250 distinguished. */
14251 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14252 return 0;
14253 else
14254 return 1;
14255 }
14256
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014257_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014258if ac_fn_c_try_run "$LINENO"; then :
14259 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014260else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014261 ac_cv_log1p_drops_zero_sign=yes
14262fi
14263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14264 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014265fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014266
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014267fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014268
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14270$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14271fi
14272if test "$ac_cv_log1p_drops_zero_sign" = yes
14273then
14274
14275$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14276
14277fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014278
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014279LIBS=$LIBS_SAVE
14280
Mark Dickinsona614f042009-11-28 12:48:43 +000014281# For multiprocessing module, check that sem_open
14282# actually works. For FreeBSD versions <= 7.2,
14283# the kernel module that provides POSIX semaphores
14284# isn't loaded by default, so an attempt to call
14285# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14287$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014288if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014292 ac_cv_posix_semaphores_enabled=yes
14293else
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014295/* end confdefs.h. */
14296
14297#include <unistd.h>
14298#include <fcntl.h>
14299#include <stdio.h>
14300#include <semaphore.h>
14301#include <sys/stat.h>
14302
14303int main(void) {
14304 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14305 if (a == SEM_FAILED) {
14306 perror("sem_open");
14307 return 1;
14308 }
14309 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014310 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014311 return 0;
14312}
14313
14314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014315if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014316 ac_cv_posix_semaphores_enabled=yes
14317else
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14321 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014322fi
14323
14324
Mark Dickinsona614f042009-11-28 12:48:43 +000014325fi
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14328$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014329if test $ac_cv_posix_semaphores_enabled = no
14330then
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014333
14334fi
14335
Mark Dickinson10683072009-04-18 21:18:19 +000014336# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14338$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014339if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014341else
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014343 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014344else
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014346/* end confdefs.h. */
14347
14348#include <unistd.h>
14349#include <fcntl.h>
14350#include <stdio.h>
14351#include <semaphore.h>
14352#include <sys/stat.h>
14353
14354int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014355 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014356 int count;
14357 int res;
14358 if(a==SEM_FAILED){
14359 perror("sem_open");
14360 return 1;
14361
14362 }
14363 res = sem_getvalue(a, &count);
14364 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014365 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014366 return res==-1 ? 1 : 0;
14367}
14368
Mark Dickinson10683072009-04-18 21:18:19 +000014369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014370if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014371 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014372else
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14376 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014377fi
14378
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014379
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014380fi
14381
Matthias Kloseb9621712010-04-24 17:59:49 +000014382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14383$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384if test $ac_cv_broken_sem_getvalue = yes
14385then
14386
Matthias Kloseb9621712010-04-24 17:59:49 +000014387$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014388
14389fi
14390
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014391ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14392"
14393if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14394 ac_have_decl=1
14395else
14396 ac_have_decl=0
14397fi
14398
14399cat >>confdefs.h <<_ACEOF
14400#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14401_ACEOF
14402ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14403"
14404if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14405 ac_have_decl=1
14406else
14407 ac_have_decl=0
14408fi
14409
14410cat >>confdefs.h <<_ACEOF
14411#define HAVE_DECL_RTLD_NOW $ac_have_decl
14412_ACEOF
14413ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14414"
14415if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14416 ac_have_decl=1
14417else
14418 ac_have_decl=0
14419fi
14420
14421cat >>confdefs.h <<_ACEOF
14422#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14423_ACEOF
14424ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14425"
14426if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14427 ac_have_decl=1
14428else
14429 ac_have_decl=0
14430fi
14431
14432cat >>confdefs.h <<_ACEOF
14433#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14434_ACEOF
14435ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14436"
14437if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14438 ac_have_decl=1
14439else
14440 ac_have_decl=0
14441fi
14442
14443cat >>confdefs.h <<_ACEOF
14444#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14445_ACEOF
14446ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14447"
14448if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14449 ac_have_decl=1
14450else
14451 ac_have_decl=0
14452fi
14453
14454cat >>confdefs.h <<_ACEOF
14455#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14456_ACEOF
14457ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14458"
14459if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14460 ac_have_decl=1
14461else
14462 ac_have_decl=0
14463fi
14464
14465cat >>confdefs.h <<_ACEOF
14466#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14467_ACEOF
14468
14469
Mark Dickinsonbd792642009-03-18 20:06:12 +000014470# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14472$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014473# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014474if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014475 enableval=$enable_big_digits; case $enable_big_digits in
14476yes)
14477 enable_big_digits=30 ;;
14478no)
14479 enable_big_digits=15 ;;
1448015|30)
14481 ;;
14482*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014483 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 +000014484esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14486$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014487
14488cat >>confdefs.h <<_ACEOF
14489#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14490_ACEOF
14491
14492
14493else
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14495$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014496fi
14497
14498
Guido van Rossumef2255b2000-03-10 22:30:29 +000014499# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014500ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014501if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014505
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014506 wchar_h="yes"
14507
Guido van Rossumef2255b2000-03-10 22:30:29 +000014508else
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014510
14511fi
14512
Michael W. Hudson54241132001-12-07 15:38:26 +000014513
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014515# determine wchar_t size
14516if test "$wchar_h" = yes
14517then
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14521# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14523$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014524if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014526else
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14528"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014529
Martin v. Löwis11437992002-04-12 09:54:03 +000014530else
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 if test "$ac_cv_type_wchar_t" = yes; then
14532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014534as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014535See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536 else
14537 ac_cv_sizeof_wchar_t=0
14538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014540
Martin v. Löwis11437992002-04-12 09:54:03 +000014541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14543$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544
14545
14546
Martin v. Löwis11437992002-04-12 09:54:03 +000014547cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014548#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014549_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014550
Michael W. Hudson54241132001-12-07 15:38:26 +000014551
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014552fi
14553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14555$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014556have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014558/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014559
14560#include <tcl.h>
14561#if TCL_UTF_MAX != 6
14562# error "NOT UCS4_TCL"
14563#endif
14564int
14565main ()
14566{
14567
14568 ;
14569 return 0;
14570}
14571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014573
14574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014576
14577 have_ucs4_tcl=yes
14578
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14582$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014583
Skip Montanaro6dead952003-09-25 14:50:04 +000014584# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014585if test "$wchar_h" = yes
14586then
14587 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14589$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014590 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014592else
14593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014595 ac_cv_wchar_t_signed=yes
14596else
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014598/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014599
14600 #include <wchar.h>
14601 int main()
14602 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014603 /* Success: exit code 0 */
14604 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014605 }
14606
14607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014608if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014609 ac_cv_wchar_t_signed=yes
14610else
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14614 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014615fi
14616
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014617fi
14618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14620$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621fi
14622
Georg Brandl52d168a2008-01-07 18:10:24 +000014623# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014624if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014625 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014626then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014627 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
Georg Brandl52d168a2008-01-07 18:10:24 +000014631else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014632 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014633fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14635$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014636
14637# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14639$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014640if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 ac_cv_c_bigendian=unknown
14644 # See if we're dealing with a universal compiler.
14645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14646/* end confdefs.h. */
14647#ifndef __APPLE_CC__
14648 not a universal capable compiler
14649 #endif
14650 typedef int dummy;
14651
Skip Montanaro6dead952003-09-25 14:50:04 +000014652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014653if ac_fn_c_try_compile "$LINENO"; then :
14654
14655 # Check for potential -arch flags. It is not universal unless
14656 # there are at least two -arch flags with different values.
14657 ac_arch=
14658 ac_prev=
14659 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14660 if test -n "$ac_prev"; then
14661 case $ac_word in
14662 i?86 | x86_64 | ppc | ppc64)
14663 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14664 ac_arch=$ac_word
14665 else
14666 ac_cv_c_bigendian=universal
14667 break
14668 fi
14669 ;;
14670 esac
14671 ac_prev=
14672 elif test "x$ac_word" = "x-arch"; then
14673 ac_prev=arch
14674 fi
14675 done
14676fi
14677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14678 if test $ac_cv_c_bigendian = unknown; then
14679 # See if sys/param.h defines the BYTE_ORDER macro.
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014681/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014682#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014684
Martin v. Löwis11437992002-04-12 09:54:03 +000014685int
14686main ()
14687{
Matthias Kloseb9621712010-04-24 17:59:49 +000014688#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14689 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14690 && LITTLE_ENDIAN)
14691 bogus endian macros
14692 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014693
14694 ;
14695 return 0;
14696}
14697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014698if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014699 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014701/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014702#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704
Martin v. Löwis11437992002-04-12 09:54:03 +000014705int
14706main ()
14707{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014708#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 not big endian
14710 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014711
14712 ;
14713 return 0;
14714}
14715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014717 ac_cv_c_bigendian=yes
14718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014722fi
14723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14724 fi
14725 if test $ac_cv_c_bigendian = unknown; then
14726 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014728/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014729#include <limits.h>
14730
Martin v. Löwis11437992002-04-12 09:54:03 +000014731int
14732main ()
14733{
Matthias Kloseb9621712010-04-24 17:59:49 +000014734#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14735 bogus endian macros
14736 #endif
14737
Martin v. Löwis11437992002-04-12 09:54:03 +000014738 ;
14739 return 0;
14740}
14741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014742if ac_fn_c_try_compile "$LINENO"; then :
14743 # It does; now see whether it defined to _BIG_ENDIAN or not.
14744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14745/* end confdefs.h. */
14746#include <limits.h>
14747
14748int
14749main ()
14750{
14751#ifndef _BIG_ENDIAN
14752 not big endian
14753 #endif
14754
14755 ;
14756 return 0;
14757}
14758_ACEOF
14759if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014760 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014761else
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14765fi
14766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14767 fi
14768 if test $ac_cv_c_bigendian = unknown; then
14769 # Compile a test program.
14770 if test "$cross_compiling" = yes; then :
14771 # Try to guess by grepping values from an object file.
14772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773/* end confdefs.h. */
14774short int ascii_mm[] =
14775 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14776 short int ascii_ii[] =
14777 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14778 int use_ascii (int i) {
14779 return ascii_mm[i] + ascii_ii[i];
14780 }
14781 short int ebcdic_ii[] =
14782 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14783 short int ebcdic_mm[] =
14784 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14785 int use_ebcdic (int i) {
14786 return ebcdic_mm[i] + ebcdic_ii[i];
14787 }
14788 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790int
14791main ()
14792{
14793return use_ascii (foo) == use_ebcdic (foo);
14794 ;
14795 return 0;
14796}
14797_ACEOF
14798if ac_fn_c_try_compile "$LINENO"; then :
14799 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14800 ac_cv_c_bigendian=yes
14801 fi
14802 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14803 if test "$ac_cv_c_bigendian" = unknown; then
14804 ac_cv_c_bigendian=no
14805 else
14806 # finding both strings is unlikely to happen, but who knows?
14807 ac_cv_c_bigendian=unknown
14808 fi
14809 fi
14810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014812else
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014814/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014816int
14817main ()
14818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 /* Are we little or big endian? From Harbison&Steele. */
14821 union
14822 {
14823 long int l;
14824 char c[sizeof (long int)];
14825 } u;
14826 u.l = 1;
14827 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828
14829 ;
14830 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014831}
Martin v. Löwis11437992002-04-12 09:54:03 +000014832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014833if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014834 ac_cv_c_bigendian=no
14835else
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14845$as_echo "$ac_cv_c_bigendian" >&6; }
14846 case $ac_cv_c_bigendian in #(
14847 yes)
14848 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14849;; #(
14850 no)
14851 ;; #(
14852 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 ;; #(
14857 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014858 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014859 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014861
Michael W. Hudson54241132001-12-07 15:38:26 +000014862
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014863# ABI version string for Python extension modules. This appears between the
14864# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14865# from the following attributes which affect the ABI of this Python build (in
14866# this order):
14867#
14868# * The Python implementation (always 'cpython-' for us)
14869# * The major and minor version numbers
14870# * --with-pydebug (adds a 'd')
14871# * --with-pymalloc (adds a 'm')
14872# * --with-wide-unicode (adds a 'u')
14873#
14874# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014875# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14876# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014877
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14879$as_echo_n "checking ABIFLAGS... " >&6; }
14880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14881$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14883$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014884SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14886$as_echo "$SOABI" >&6; }
14887
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014888
14889case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014890 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014891 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14892 *)
14893 EXT_SUFFIX=${SHLIB_SUFFIX};;
14894esac
14895
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14897$as_echo_n "checking LDVERSION... " >&6; }
14898LDVERSION='$(VERSION)$(ABIFLAGS)'
14899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14900$as_echo "$LDVERSION" >&6; }
14901
doko@python.org87421192013-01-26 11:39:31 +010014902
doko@ubuntu.com55532312016-06-14 08:55:19 +020014903if test x$PLATFORM_TRIPLET = x; then
14904 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14905else
14906 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14907fi
doko@python.org87421192013-01-26 11:39:31 +010014908
14909
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014910# Check whether right shifting a negative integer extends the sign bit
14911# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14913$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014914if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014916else
Martin v. Löwis11437992002-04-12 09:54:03 +000014917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014919 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014922/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014923
14924int main()
14925{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014926 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014927}
14928
Martin v. Löwis11437992002-04-12 09:54:03 +000014929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014930if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014931 ac_cv_rshift_extends_sign=yes
14932else
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014937fi
14938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939fi
14940
Matthias Kloseb9621712010-04-24 17:59:49 +000014941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14942$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014943if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014944then
Martin v. Löwis11437992002-04-12 09:54:03 +000014945
Matthias Kloseb9621712010-04-24 17:59:49 +000014946$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014947
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014948fi
14949
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014950# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14952$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014953if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014955else
Martin v. Löwis11437992002-04-12 09:54:03 +000014956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014958/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014959#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014960int
14961main ()
14962{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014963
14964 FILE *f = fopen("/dev/null", "r");
14965 flockfile(f);
14966 getc_unlocked(f);
14967 funlockfile(f);
14968
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ;
14970 return 0;
14971}
14972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014973if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014974 ac_cv_have_getc_unlocked=yes
14975else
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 ac_cv_have_getc_unlocked=no
14977fi
14978rm -f core conftest.err conftest.$ac_objext \
14979 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981
Matthias Kloseb9621712010-04-24 17:59:49 +000014982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14983$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014984if test "$ac_cv_have_getc_unlocked" = yes
14985then
Martin v. Löwis11437992002-04-12 09:54:03 +000014986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014988
14989fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014990
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014991# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014992# save the value of LIBS so we don't actually link Python with readline
14993LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014994
Gregory P. Smith18820942008-09-07 06:24:49 +000014995# On some systems we need to link readline to a termcap compatible
14996# library. NOTE: Keep the precedence of listed libraries synchronised
14997# with setup.py.
14998py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15000$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015001for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015002 if test -z "$py_libtermcap"; then
15003 READLINE_LIBS="-lreadline"
15004 else
15005 READLINE_LIBS="-lreadline -l$py_libtermcap"
15006 fi
15007 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015009/* end confdefs.h. */
15010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011/* Override any GCC internal prototype to avoid an error.
15012 Use char because int might match the return type of a GCC
15013 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015014#ifdef __cplusplus
15015extern "C"
15016#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015017char readline ();
15018int
15019main ()
15020{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015022 ;
15023 return 0;
15024}
15025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015026if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015027 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015029rm -f core conftest.err conftest.$ac_objext \
15030 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015031 if test $py_cv_lib_readline = yes; then
15032 break
15033 fi
15034done
15035# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15036#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015037if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15039$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015040else
Matthias Kloseb9621712010-04-24 17:59:49 +000015041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15042$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015043
Matthias Kloseb9621712010-04-24 17:59:49 +000015044$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015045
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015046fi
15047
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015048# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015050/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015051#include <readline/readline.h>
15052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015053if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015054 have_readline=yes
15055else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015056 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015057
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015058fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015059rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015060if test $have_readline = yes
15061then
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015063/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015064#include <readline/readline.h>
15065
15066_ACEOF
15067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015068 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015069
Matthias Kloseb9621712010-04-24 17:59:49 +000015070$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015071
15072fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015073rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015074
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015076/* end confdefs.h. */
15077#include <readline/readline.h>
15078
15079_ACEOF
15080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015081 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015084
15085fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015086rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015087
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015088fi
15089
Martin v. Löwis0daad592001-09-30 21:09:59 +000015090# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15092$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015093if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015094 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015095else
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015097LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101/* Override any GCC internal prototype to avoid an error.
15102 Use char because int might match the return type of a GCC
15103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015104#ifdef __cplusplus
15105extern "C"
15106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015107char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015108int
15109main ()
15110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 ;
15113 return 0;
15114}
15115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015118else
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015121rm -f core conftest.err conftest.$ac_objext \
15122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015123LIBS=$ac_check_lib_save_LIBS
15124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15126$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015127if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015128
Matthias Kloseb9621712010-04-24 17:59:49 +000015129$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015130
Martin v. Löwis0daad592001-09-30 21:09:59 +000015131fi
15132
Michael W. Hudson54241132001-12-07 15:38:26 +000015133
Thomas Wouters89d996e2007-09-08 17:39:28 +000015134# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15136$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015137if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015138 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015139else
15140 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015141LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015143/* end confdefs.h. */
15144
15145/* Override any GCC internal prototype to avoid an error.
15146 Use char because int might match the return type of a GCC
15147 builtin and then its argument prototype would still apply. */
15148#ifdef __cplusplus
15149extern "C"
15150#endif
15151char rl_completion_display_matches_hook ();
15152int
15153main ()
15154{
15155return rl_completion_display_matches_hook ();
15156 ;
15157 return 0;
15158}
15159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015160if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015161 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015165rm -f core conftest.err conftest.$ac_objext \
15166 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015167LIBS=$ac_check_lib_save_LIBS
15168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15170$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015171if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015174
15175fi
15176
15177
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015178# also in 4.0, but not in editline
15179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15180$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15181if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15182 $as_echo_n "(cached) " >&6
15183else
15184 ac_check_lib_save_LIBS=$LIBS
15185LIBS="-lreadline $READLINE_LIBS $LIBS"
15186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15187/* end confdefs.h. */
15188
15189/* Override any GCC internal prototype to avoid an error.
15190 Use char because int might match the return type of a GCC
15191 builtin and then its argument prototype would still apply. */
15192#ifdef __cplusplus
15193extern "C"
15194#endif
15195char rl_resize_terminal ();
15196int
15197main ()
15198{
15199return rl_resize_terminal ();
15200 ;
15201 return 0;
15202}
15203_ACEOF
15204if ac_fn_c_try_link "$LINENO"; then :
15205 ac_cv_lib_readline_rl_resize_terminal=yes
15206else
15207 ac_cv_lib_readline_rl_resize_terminal=no
15208fi
15209rm -f core conftest.err conftest.$ac_objext \
15210 conftest$ac_exeext conftest.$ac_ext
15211LIBS=$ac_check_lib_save_LIBS
15212fi
15213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15214$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15215if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15216
15217$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15218
15219fi
15220
15221
Martin v. Löwis0daad592001-09-30 21:09:59 +000015222# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15224$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015225if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015227else
Martin v. Löwis11437992002-04-12 09:54:03 +000015228 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015229LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233/* Override any GCC internal prototype to avoid an error.
15234 Use char because int might match the return type of a GCC
15235 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015236#ifdef __cplusplus
15237extern "C"
15238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015239char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015240int
15241main ()
15242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ;
15245 return 0;
15246}
15247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015248if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015250else
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015253rm -f core conftest.err conftest.$ac_objext \
15254 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015255LIBS=$ac_check_lib_save_LIBS
15256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15258$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015259if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015262
Guido van Rossum353ae582001-07-10 16:45:32 +000015263fi
15264
Jack Jansendd19cf82001-12-06 22:36:17 +000015265
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015266# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015268/* end confdefs.h. */
15269#include <readline/readline.h>
15270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015271if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015272 have_readline=yes
15273else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015274 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015275
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015276fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015277rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015278if test $have_readline = yes
15279then
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015281/* end confdefs.h. */
15282#include <readline/readline.h>
15283
15284_ACEOF
15285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015287
Matthias Kloseb9621712010-04-24 17:59:49 +000015288$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015289
15290fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015291rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015292
15293fi
15294
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15296$as_echo_n "checking for append_history in -lreadline... " >&6; }
15297if ${ac_cv_lib_readline_append_history+:} false; then :
15298 $as_echo_n "(cached) " >&6
15299else
15300 ac_check_lib_save_LIBS=$LIBS
15301LIBS="-lreadline $READLINE_LIBS $LIBS"
15302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15303/* end confdefs.h. */
15304
15305/* Override any GCC internal prototype to avoid an error.
15306 Use char because int might match the return type of a GCC
15307 builtin and then its argument prototype would still apply. */
15308#ifdef __cplusplus
15309extern "C"
15310#endif
15311char append_history ();
15312int
15313main ()
15314{
15315return append_history ();
15316 ;
15317 return 0;
15318}
15319_ACEOF
15320if ac_fn_c_try_link "$LINENO"; then :
15321 ac_cv_lib_readline_append_history=yes
15322else
15323 ac_cv_lib_readline_append_history=no
15324fi
15325rm -f core conftest.err conftest.$ac_objext \
15326 conftest$ac_exeext conftest.$ac_ext
15327LIBS=$ac_check_lib_save_LIBS
15328fi
15329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15330$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15331if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15332
15333$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15334
15335fi
15336
15337
Martin v. Löwis82bca632006-02-10 20:49:30 +000015338# End of readline checks: restore LIBS
15339LIBS=$LIBS_no_readline
15340
Matthias Kloseb9621712010-04-24 17:59:49 +000015341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15342$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015343if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015345else
Martin v. Löwis11437992002-04-12 09:54:03 +000015346
Matthias Kloseb9621712010-04-24 17:59:49 +000015347if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015348 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015349else
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015351/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015352
15353int main()
15354{
15355 int val1 = nice(1);
15356 if (val1 != -1 && val1 == nice(2))
15357 exit(0);
15358 exit(1);
15359}
15360
Martin v. Löwis11437992002-04-12 09:54:03 +000015361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015362if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015363 ac_cv_broken_nice=yes
15364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15368 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015369fi
15370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371fi
15372
Matthias Kloseb9621712010-04-24 17:59:49 +000015373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15374$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015375if test "$ac_cv_broken_nice" = yes
15376then
Martin v. Löwis11437992002-04-12 09:54:03 +000015377
Matthias Kloseb9621712010-04-24 17:59:49 +000015378$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015379
15380fi
15381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15383$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015384if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015386else
Matthias Kloseb9621712010-04-24 17:59:49 +000015387 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015388 ac_cv_broken_poll=no
15389else
Matthias Kloseb9621712010-04-24 17:59:49 +000015390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015391/* end confdefs.h. */
15392
15393#include <poll.h>
15394
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015395int main()
15396{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015397 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015398 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015399
15400 close (42);
15401
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015402 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015403 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015404 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015405 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015406 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015407 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015408 return 1;
15409}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015410
15411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015412if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015413 ac_cv_broken_poll=yes
15414else
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15418 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015420
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015421fi
15422
Matthias Kloseb9621712010-04-24 17:59:49 +000015423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15424$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015425if test "$ac_cv_broken_poll" = yes
15426then
15427
Matthias Kloseb9621712010-04-24 17:59:49 +000015428$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015429
15430fi
15431
Brett Cannon43802422005-02-10 20:48:03 +000015432# 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 +000015433# (which is not required by ISO C or UNIX spec) and/or if we support
15434# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015435ac_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 +000015436#include <$ac_cv_struct_tm>
15437
Matthias Kloseb9621712010-04-24 17:59:49 +000015438"
Victor Stinnere0be4232011-10-25 13:06:09 +020015439if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015440
15441cat >>confdefs.h <<_ACEOF
15442#define HAVE_STRUCT_TM_TM_ZONE 1
15443_ACEOF
15444
15445
15446fi
15447
15448if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15449
Matthias Kloseb9621712010-04-24 17:59:49 +000015450$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015451
15452else
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15454"
Victor Stinnere0be4232011-10-25 13:06:09 +020015455if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457else
Matthias Kloseb9621712010-04-24 17:59:49 +000015458 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459fi
15460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015462#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015463_ACEOF
15464
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15466$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015467if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469else
Matthias Kloseb9621712010-04-24 17:59:49 +000015470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015471/* end confdefs.h. */
15472#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015473#if !HAVE_DECL_TZNAME
15474extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015475#endif
15476
15477int
15478main ()
15479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015481 ;
15482 return 0;
15483}
15484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015485if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015486 ac_cv_var_tzname=yes
15487else
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015490rm -f core conftest.err conftest.$ac_objext \
15491 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15494$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015495 if test $ac_cv_var_tzname = yes; then
15496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015498
15499 fi
15500fi
15501
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015502
Martin v. Löwis1d459062005-03-14 21:23:33 +000015503# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15505$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015506if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015508else
15509
Matthias Kloseb9621712010-04-24 17:59:49 +000015510if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015511 ac_cv_working_tzset=no
15512else
Matthias Kloseb9621712010-04-24 17:59:49 +000015513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015515
15516#include <stdlib.h>
15517#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015518#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015519
15520#if HAVE_TZNAME
15521extern char *tzname[];
15522#endif
15523
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015524int main()
15525{
Brett Cannon18367812003-09-19 00:59:16 +000015526 /* Note that we need to ensure that not only does tzset(3)
15527 do 'something' with localtime, but it works as documented
15528 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015529 This includes making sure that tzname is set properly if
15530 tm->tm_zone does not exist since it is the alternative way
15531 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015532
15533 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015534 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015535 */
15536
Martin v. Löwis1d459062005-03-14 21:23:33 +000015537 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015538 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15539
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015540 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015541 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015542 if (localtime(&groundhogday)->tm_hour != 0)
15543 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015544#if HAVE_TZNAME
15545 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15546 if (strcmp(tzname[0], "UTC") ||
15547 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15548 exit(1);
15549#endif
Brett Cannon18367812003-09-19 00:59:16 +000015550
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015551 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015552 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015553 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015554 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015555#if HAVE_TZNAME
15556 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15557 exit(1);
15558#endif
Brett Cannon18367812003-09-19 00:59:16 +000015559
15560 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15561 tzset();
15562 if (localtime(&groundhogday)->tm_hour != 11)
15563 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015564#if HAVE_TZNAME
15565 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15566 exit(1);
15567#endif
15568
15569#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015570 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15571 exit(1);
15572 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15573 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015574#endif
Brett Cannon18367812003-09-19 00:59:16 +000015575
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015576 exit(0);
15577}
15578
15579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015580if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015581 ac_cv_working_tzset=yes
15582else
Matthias Kloseb9621712010-04-24 17:59:49 +000015583 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015587fi
15588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589fi
15590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15592$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015593if test "$ac_cv_working_tzset" = yes
15594then
15595
Matthias Kloseb9621712010-04-24 17:59:49 +000015596$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015597
15598fi
15599
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015600# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15602$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015603if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015605else
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015607/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015608#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015609int
15610main ()
15611{
15612
15613struct stat st;
15614st.st_mtim.tv_nsec = 1;
15615
15616 ;
15617 return 0;
15618}
15619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015621 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015622else
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15626fi
15627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15629$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015630if test "$ac_cv_stat_tv_nsec" = yes
15631then
15632
Matthias Kloseb9621712010-04-24 17:59:49 +000015633$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015634
15635fi
15636
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015637# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15639$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015640if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015642else
Matthias Kloseb9621712010-04-24 17:59:49 +000015643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015644/* end confdefs.h. */
15645#include <sys/stat.h>
15646int
15647main ()
15648{
15649
15650struct stat st;
15651st.st_mtimespec.tv_nsec = 1;
15652
15653 ;
15654 return 0;
15655}
15656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015658 ac_cv_stat_tv_nsec2=yes
15659else
Matthias Kloseb9621712010-04-24 17:59:49 +000015660 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15663fi
15664
Matthias Kloseb9621712010-04-24 17:59:49 +000015665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15666$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015667if test "$ac_cv_stat_tv_nsec2" = yes
15668then
15669
Matthias Kloseb9621712010-04-24 17:59:49 +000015670$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015671
15672fi
15673
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015674# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015675ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015676if test "$cross_compiling" = no; then
15677 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15678fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015679
15680for ac_header in curses.h ncurses.h
15681do :
15682 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15683ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15684if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15685 cat >>confdefs.h <<_ACEOF
15686#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15687_ACEOF
15688
15689fi
15690
15691done
15692
15693
15694# On Solaris, term.h requires curses.h
15695for ac_header in term.h
15696do :
15697 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15698#ifdef HAVE_CURSES_H
15699#include <curses.h>
15700#endif
15701
15702"
15703if test "x$ac_cv_header_term_h" = xyes; then :
15704 cat >>confdefs.h <<_ACEOF
15705#define HAVE_TERM_H 1
15706_ACEOF
15707
15708fi
15709
15710done
15711
15712
Jack Jansen666b1e72001-10-31 12:11:48 +000015713# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15715$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015716if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015718else
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015720/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015721#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015722int
15723main ()
15724{
Jack Jansen666b1e72001-10-31 12:11:48 +000015725
15726 int rtn;
15727 rtn = mvwdelch(0,0,0);
15728
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 ;
15730 return 0;
15731}
15732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015733if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015734 ac_cv_mvwdelch_is_expression=yes
15735else
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15739fi
15740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15742$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015743
15744if test "$ac_cv_mvwdelch_is_expression" = yes
15745then
Martin v. Löwis11437992002-04-12 09:54:03 +000015746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015748
15749fi
15750
Matthias Kloseb9621712010-04-24 17:59:49 +000015751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15752$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015753if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015757/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015758#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015759int
15760main ()
15761{
Jack Jansen666b1e72001-10-31 12:11:48 +000015762
15763 WINDOW *w;
15764 w->_flags = 0;
15765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ;
15767 return 0;
15768}
15769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015770if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015771 ac_cv_window_has_flags=yes
15772else
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15776fi
15777
Matthias Kloseb9621712010-04-24 17:59:49 +000015778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15779$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015780
Jack Jansen666b1e72001-10-31 12:11:48 +000015781
15782if test "$ac_cv_window_has_flags" = yes
15783then
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015786
15787fi
15788
Matthias Kloseb9621712010-04-24 17:59:49 +000015789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15790$as_echo_n "checking for is_term_resized... " >&6; }
15791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015792/* end confdefs.h. */
15793#include <curses.h>
15794int
15795main ()
15796{
15797void *x=is_term_resized
15798 ;
15799 return 0;
15800}
15801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015802if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015803
Matthias Kloseb9621712010-04-24 17:59:49 +000015804$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015805
Matthias Kloseb159a552010-04-25 21:00:44 +000015806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015807$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015808else
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15810$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015811
15812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15816$as_echo_n "checking for resize_term... " >&6; }
15817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015818/* end confdefs.h. */
15819#include <curses.h>
15820int
15821main ()
15822{
15823void *x=resize_term
15824 ;
15825 return 0;
15826}
15827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015828if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015831
Matthias Kloseb159a552010-04-25 21:00:44 +000015832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015833$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015834else
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15836$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015837
15838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15842$as_echo_n "checking for resizeterm... " >&6; }
15843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015844/* end confdefs.h. */
15845#include <curses.h>
15846int
15847main ()
15848{
15849void *x=resizeterm
15850 ;
15851 return 0;
15852}
15853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015854if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015855
Matthias Kloseb9621712010-04-24 17:59:49 +000015856$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015857
Matthias Kloseb159a552010-04-25 21:00:44 +000015858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015859$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015860else
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15862$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015863
15864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015866# last curses configure check
15867CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15870$as_echo "$as_me: checking for device files" >&6;}
15871
15872if test "x$cross_compiling" = xyes; then
15873 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15875$as_echo_n "checking for /dev/ptmx... " >&6; }
15876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15877$as_echo "not set" >&6; }
15878 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15879 fi
15880 if test "${ac_cv_file__dev_ptc+set}" != set; then
15881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15882$as_echo_n "checking for /dev/ptc... " >&6; }
15883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15884$as_echo "not set" >&6; }
15885 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15886 fi
15887fi
15888
Matthias Kloseb9621712010-04-24 17:59:49 +000015889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15890$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015891if ${ac_cv_file__dev_ptmx+:} false; then :
15892 $as_echo_n "(cached) " >&6
15893else
15894 test "$cross_compiling" = yes &&
15895 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15896if test -r "/dev/ptmx"; then
15897 ac_cv_file__dev_ptmx=yes
15898else
15899 ac_cv_file__dev_ptmx=no
15900fi
15901fi
15902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15903$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15904if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015905
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015906fi
15907
15908if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015911
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15914$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015915if ${ac_cv_file__dev_ptc+:} false; then :
15916 $as_echo_n "(cached) " >&6
15917else
15918 test "$cross_compiling" = yes &&
15919 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15920if test -r "/dev/ptc"; then
15921 ac_cv_file__dev_ptc=yes
15922else
15923 ac_cv_file__dev_ptc=no
15924fi
15925fi
15926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15927$as_echo "$ac_cv_file__dev_ptc" >&6; }
15928if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015929
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015930fi
15931
15932if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015933
Matthias Kloseb9621712010-04-24 17:59:49 +000015934$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015935
Neal Norwitz865400f2003-03-21 01:42:58 +000015936fi
15937
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015938if test $ac_sys_system = Darwin
15939then
15940 LIBS="$LIBS -framework CoreFoundation"
15941fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015942
Matthias Kloseb9621712010-04-24 17:59:49 +000015943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15944$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015945if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015947else
Matthias Kloseb9621712010-04-24 17:59:49 +000015948 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015949 ac_cv_have_size_t_format="cross -- assuming yes"
15950
Thomas Wouters477c8d52006-05-27 19:21:47 +000015951else
Matthias Kloseb9621712010-04-24 17:59:49 +000015952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015953/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015954
Thomas Wouters477c8d52006-05-27 19:21:47 +000015955#include <stdio.h>
15956#include <stddef.h>
15957#include <string.h>
15958
Christian Heimes2c181612007-12-17 20:04:13 +000015959#ifdef HAVE_SYS_TYPES_H
15960#include <sys/types.h>
15961#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015962
15963#ifdef HAVE_SSIZE_T
15964typedef ssize_t Py_ssize_t;
15965#elif SIZEOF_VOID_P == SIZEOF_LONG
15966typedef long Py_ssize_t;
15967#else
15968typedef int Py_ssize_t;
15969#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015970
Christian Heimes2c181612007-12-17 20:04:13 +000015971int main()
15972{
15973 char buffer[256];
15974
Thomas Wouters477c8d52006-05-27 19:21:47 +000015975 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15976 return 1;
15977
Thomas Wouters89f507f2006-12-13 04:49:30 +000015978 if (strcmp(buffer, "123"))
15979 return 1;
15980
15981 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15982 return 1;
15983
15984 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015985 return 1;
15986
15987 return 0;
15988}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015989
Thomas Wouters477c8d52006-05-27 19:21:47 +000015990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015991if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015992 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015993else
Matthias Kloseb9621712010-04-24 17:59:49 +000015994 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015998fi
15999
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16002$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016003if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016004
Matthias Kloseb9621712010-04-24 17:59:49 +000016005$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016006
16007fi
16008
Matthias Kloseb9621712010-04-24 17:59:49 +000016009ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016010#ifdef HAVE_SYS_TYPES_H
16011#include <sys/types.h>
16012#endif
16013#ifdef HAVE_SYS_SOCKET_H
16014#include <sys/socket.h>
16015#endif
16016
Matthias Kloseb9621712010-04-24 17:59:49 +000016017"
Victor Stinnere0be4232011-10-25 13:06:09 +020016018if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016021
Matthias Kloseb9621712010-04-24 17:59:49 +000016022$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016023
16024fi
16025
Michael W. Hudson54241132001-12-07 15:38:26 +000016026
Matthias Kloseb9621712010-04-24 17:59:49 +000016027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16028$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016029if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016030 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016031else
Matthias Kloseb9621712010-04-24 17:59:49 +000016032 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016033 ac_cv_broken_mbstowcs=no
16034else
Matthias Kloseb9621712010-04-24 17:59:49 +000016035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016036/* end confdefs.h. */
16037
Stefan Krah19c21392012-11-22 23:47:32 +010016038#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016039#include<stdlib.h>
16040int main() {
16041 size_t len = -1;
16042 const char *str = "text";
16043 len = mbstowcs(NULL, str, 0);
16044 return (len != 4);
16045}
16046
16047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016048if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016049 ac_cv_broken_mbstowcs=no
16050else
Matthias Kloseb9621712010-04-24 17:59:49 +000016051 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16054 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016055fi
16056
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016057fi
16058
Matthias Kloseb9621712010-04-24 17:59:49 +000016059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16060$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016061if test "$ac_cv_broken_mbstowcs" = yes
16062then
16063
Matthias Kloseb9621712010-04-24 17:59:49 +000016064$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016065
16066fi
16067
Antoine Pitroub52ec782009-01-25 16:34:23 +000016068# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16070$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016071
16072# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016073if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016074 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016075if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016076then
16077
Matthias Kloseb9621712010-04-24 17:59:49 +000016078$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016079
Matthias Kloseb9621712010-04-24 17:59:49 +000016080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16081$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016082fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016083if test "$withval" = no
16084then
16085
16086$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16089$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016090fi
16091
Antoine Pitrou042b1282010-08-13 21:15:58 +000016092else
16093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16094$as_echo "no value specified" >&6; }
16095fi
16096
Antoine Pitroub52ec782009-01-25 16:34:23 +000016097
Matthias Kloseb17289e2012-03-15 19:51:34 +010016098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16099$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16100if ${ac_cv_computed_gotos+:} false; then :
16101 $as_echo_n "(cached) " >&6
16102else
16103 if test "$cross_compiling" = yes; then :
16104 if test "${with_computed_gotos+set}" = set; then
16105 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16106 else
16107 ac_cv_computed_gotos=no
16108 fi
16109else
16110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16111/* end confdefs.h. */
16112
16113int main(int argc, char **argv)
16114{
16115 static void *targets[1] = { &&LABEL1 };
16116 goto LABEL2;
16117LABEL1:
16118 return 0;
16119LABEL2:
16120 goto *targets[0];
16121 return 1;
16122}
16123
16124_ACEOF
16125if ac_fn_c_try_run "$LINENO"; then :
16126 ac_cv_computed_gotos=yes
16127else
16128 ac_cv_computed_gotos=no
16129fi
16130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16131 conftest.$ac_objext conftest.beam conftest.$ac_ext
16132fi
16133
16134fi
16135
16136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16137$as_echo "$ac_cv_computed_gotos" >&6; }
16138case "$ac_cv_computed_gotos" in yes*)
16139
16140$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16141
16142esac
16143
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016144case $ac_sys_system in
16145AIX*)
16146
16147$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16148 ;;
16149esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016150
Michael W. Hudson54241132001-12-07 15:38:26 +000016151
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016152
16153
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016154for h in `(cd $srcdir;echo Python/thread_*.h)`
16155do
16156 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16157done
16158
Michael W. Hudson54241132001-12-07 15:38:26 +000016159
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016160SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16162$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016163for dir in $SRCDIRS; do
16164 if test ! -d $dir; then
16165 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016166 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016167done
Matthias Kloseb9621712010-04-24 17:59:49 +000016168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16169$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016170
Stefan Krah1919b7e2012-03-21 18:25:23 +010016171# Availability of -O2:
16172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16173$as_echo_n "checking for -O2... " >&6; }
16174saved_cflags="$CFLAGS"
16175CFLAGS="-O2"
16176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177/* end confdefs.h. */
16178
16179int
16180main ()
16181{
16182
16183
16184 ;
16185 return 0;
16186}
16187_ACEOF
16188if ac_fn_c_try_compile "$LINENO"; then :
16189 have_O2=yes
16190else
16191 have_O2=no
16192fi
16193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16195$as_echo "$have_O2" >&6; }
16196CFLAGS="$saved_cflags"
16197
16198# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16199# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16201$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16202saved_cflags="$CFLAGS"
16203CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16204if test "$have_O2" = no; then
16205 CFLAGS=""
16206fi
16207if test "$cross_compiling" = yes; then :
16208 have_glibc_memmove_bug=undefined
16209else
16210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16211/* end confdefs.h. */
16212
16213#include <stdio.h>
16214#include <stdlib.h>
16215#include <string.h>
16216void foo(void *p, void *q) { memmove(p, q, 19); }
16217int main() {
16218 char a[32] = "123456789000000000";
16219 foo(&a[9], a);
16220 if (strcmp(a, "123456789123456789000000000") != 0)
16221 return 1;
16222 foo(a, &a[9]);
16223 if (strcmp(a, "123456789000000000") != 0)
16224 return 1;
16225 return 0;
16226}
16227
16228_ACEOF
16229if ac_fn_c_try_run "$LINENO"; then :
16230 have_glibc_memmove_bug=no
16231else
16232 have_glibc_memmove_bug=yes
16233fi
16234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16235 conftest.$ac_objext conftest.beam conftest.$ac_ext
16236fi
16237
16238CFLAGS="$saved_cflags"
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16240$as_echo "$have_glibc_memmove_bug" >&6; }
16241if test "$have_glibc_memmove_bug" = yes; then
16242
16243$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16244
16245fi
16246
16247if test "$have_gcc_asm_for_x87" = yes; then
16248 # Some versions of gcc miscompile inline asm:
16249 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16250 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16251 case $CC in
16252 *gcc*)
16253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16254$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16255 saved_cflags="$CFLAGS"
16256 CFLAGS="-O2"
16257 if test "$cross_compiling" = yes; then :
16258 have_ipa_pure_const_bug=undefined
16259else
16260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16261/* end confdefs.h. */
16262
16263 __attribute__((noinline)) int
16264 foo(int *p) {
16265 int r;
16266 asm ( "movl \$6, (%1)\n\t"
16267 "xorl %0, %0\n\t"
16268 : "=r" (r) : "r" (p) : "memory"
16269 );
16270 return r;
16271 }
16272 int main() {
16273 int p = 8;
16274 if ((foo(&p) ? : p) != 6)
16275 return 1;
16276 return 0;
16277 }
16278
16279_ACEOF
16280if ac_fn_c_try_run "$LINENO"; then :
16281 have_ipa_pure_const_bug=no
16282else
16283 have_ipa_pure_const_bug=yes
16284fi
16285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16286 conftest.$ac_objext conftest.beam conftest.$ac_ext
16287fi
16288
16289 CFLAGS="$saved_cflags"
16290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16291$as_echo "$have_ipa_pure_const_bug" >&6; }
16292 if test "$have_ipa_pure_const_bug" = yes; then
16293
16294$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16295
16296 fi
16297 ;;
16298 esac
16299fi
16300
Victor Stinner4f5366e2015-01-09 02:13:19 +010016301# Check for stdatomic.h
16302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16303$as_echo_n "checking for stdatomic.h... " >&6; }
16304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16305/* end confdefs.h. */
16306
16307
16308 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016309 atomic_int value = ATOMIC_VAR_INIT(1);
16310 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016311 int main() {
16312 int loaded_value = atomic_load(&value);
16313 return 0;
16314 }
16315
16316
16317_ACEOF
16318if ac_fn_c_try_link "$LINENO"; then :
16319 have_stdatomic_h=yes
16320else
16321 have_stdatomic_h=no
16322fi
16323rm -f core conftest.err conftest.$ac_objext \
16324 conftest$ac_exeext conftest.$ac_ext
16325
16326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16327$as_echo "$have_stdatomic_h" >&6; }
16328
16329if test "$have_stdatomic_h" = yes; then
16330
16331$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16332
16333fi
16334
16335# Check for GCC >= 4.7 __atomic builtins
16336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16337$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16339/* end confdefs.h. */
16340
16341
16342 volatile int val = 1;
16343 int main() {
16344 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16345 return 0;
16346 }
16347
16348
16349_ACEOF
16350if ac_fn_c_try_link "$LINENO"; then :
16351 have_builtin_atomic=yes
16352else
16353 have_builtin_atomic=no
16354fi
16355rm -f core conftest.err conftest.$ac_objext \
16356 conftest$ac_exeext conftest.$ac_ext
16357
16358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16359$as_echo "$have_builtin_atomic" >&6; }
16360
16361if test "$have_builtin_atomic" = yes; then
16362
16363$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16364
16365fi
16366
Ned Deily322f5ba2013-11-21 23:01:59 -080016367# ensurepip option
16368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16369$as_echo_n "checking for ensurepip... " >&6; }
16370
16371# Check whether --with-ensurepip was given.
16372if test "${with_ensurepip+set}" = set; then :
16373 withval=$with_ensurepip;
16374else
16375 with_ensurepip=upgrade
16376fi
16377
16378case $with_ensurepip in #(
16379 yes|upgrade) :
16380 ENSUREPIP=upgrade ;; #(
16381 install) :
16382 ENSUREPIP=install ;; #(
16383 no) :
16384 ENSUREPIP=no ;; #(
16385 *) :
16386 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16387esac
16388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16389$as_echo "$ENSUREPIP" >&6; }
16390
16391
Victor Stinner35a97c02015-03-08 02:59:09 +010016392# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16394$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396/* end confdefs.h. */
16397
16398
16399 #include <dirent.h>
16400
16401 int main() {
16402 struct dirent entry;
16403 return entry.d_type == DT_UNKNOWN;
16404 }
16405
16406
16407_ACEOF
16408if ac_fn_c_try_link "$LINENO"; then :
16409 have_dirent_d_type=yes
16410else
16411 have_dirent_d_type=no
16412fi
16413rm -f core conftest.err conftest.$ac_objext \
16414 conftest$ac_exeext conftest.$ac_ext
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16416$as_echo "$have_dirent_d_type" >&6; }
16417
16418if test "$have_dirent_d_type" = yes; then
16419
16420$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16421
16422fi
16423
Victor Stinner9eb57c52015-03-19 22:21:49 +010016424# check if the Linux getrandom() syscall is available
16425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16426$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16428/* end confdefs.h. */
16429
16430
Victor Stinner1b80b242016-04-12 22:34:58 +020016431 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016432 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016433 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016434
16435 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016436 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016437 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016438 const int flags = GRND_NONBLOCK;
16439 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016440 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016441 return 0;
16442 }
16443
16444
16445_ACEOF
16446if ac_fn_c_try_link "$LINENO"; then :
16447 have_getrandom_syscall=yes
16448else
16449 have_getrandom_syscall=no
16450fi
16451rm -f core conftest.err conftest.$ac_objext \
16452 conftest$ac_exeext conftest.$ac_ext
16453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16454$as_echo "$have_getrandom_syscall" >&6; }
16455
16456if test "$have_getrandom_syscall" = yes; then
16457
16458$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16459
16460fi
16461
Victor Stinner3abf44e2015-09-18 15:38:37 +020016462# check if the getrandom() function is available
16463# the test was written for the Solaris function of <sys/random.h>
16464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16465$as_echo_n "checking for the getrandom() function... " >&6; }
16466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16467/* end confdefs.h. */
16468
16469
16470 #include <sys/random.h>
16471
16472 int main() {
16473 char buffer[1];
16474 const size_t buflen = sizeof(buffer);
16475 const int flags = 0;
16476 /* ignore the result, Python checks for ENOSYS at runtime */
16477 (void)getrandom(buffer, buflen, flags);
16478 return 0;
16479 }
16480
16481
16482_ACEOF
16483if ac_fn_c_try_link "$LINENO"; then :
16484 have_getrandom=yes
16485else
16486 have_getrandom=no
16487fi
16488rm -f core conftest.err conftest.$ac_objext \
16489 conftest$ac_exeext conftest.$ac_ext
16490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16491$as_echo "$have_getrandom" >&6; }
16492
16493if test "$have_getrandom" = yes; then
16494
16495$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16496
16497fi
16498
Guido van Rossum627b2d71993-12-24 10:39:16 +000016499# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016500ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016501
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016502ac_config_files="$ac_config_files Modules/ld_so_aix"
16503
Martin v. Löwis11437992002-04-12 09:54:03 +000016504cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016505# This file is a shell script that caches the results of configure
16506# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016507# scripts and configure runs, see configure's option --config-cache.
16508# It is not useful on other systems. If it contains results you don't
16509# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016510#
Martin v. Löwis11437992002-04-12 09:54:03 +000016511# config.status only pays attention to the cache file if you give it
16512# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016513#
Skip Montanaro6dead952003-09-25 14:50:04 +000016514# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016515# loading this file, other *unset* `ac_cv_foo' will be assigned the
16516# following values.
16517
16518_ACEOF
16519
Guido van Rossumf78abae1997-01-21 22:02:36 +000016520# The following way of writing the cache mishandles newlines in values,
16521# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016523# Ultrix sh set writes to stderr and can't be redirected directly,
16524# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016525(
16526 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16527 eval ac_val=\$$ac_var
16528 case $ac_val in #(
16529 *${as_nl}*)
16530 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016531 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16532$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 esac
16534 case $ac_var in #(
16535 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016536 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16537 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 esac ;;
16539 esac
16540 done
16541
Martin v. Löwis11437992002-04-12 09:54:03 +000016542 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16544 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 # `set' does not quote correctly, so add quotes: double-quote
16546 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016548 "s/'/'\\\\''/g;
16549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 *)
16552 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 esac |
16556 sort
16557) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016559 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016562 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16563 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16565 :end' >>confcache
16566if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16567 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016568 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16570$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016571 if test ! -f "$cache_file" || test -h "$cache_file"; then
16572 cat confcache >"$cache_file"
16573 else
16574 case $cache_file in #(
16575 */* | ?:*)
16576 mv -f confcache "$cache_file"$$ &&
16577 mv -f "$cache_file"$$ "$cache_file" ;; #(
16578 *)
16579 mv -f confcache "$cache_file" ;;
16580 esac
16581 fi
16582 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016583 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016584 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16585$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016586 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016587fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016588rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016590test "x$prefix" = xNONE && prefix=$ac_default_prefix
16591# Let make expand exec_prefix.
16592test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016594DEFS=-DHAVE_CONFIG_H
16595
Skip Montanaro6dead952003-09-25 14:50:04 +000016596ac_libobjs=
16597ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016598U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016599for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16600 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016602 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16604 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016605 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16606 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016607done
16608LIBOBJS=$ac_libobjs
16609
16610LTLIBOBJS=$ac_ltlibobjs
16611
16612
Martin v. Löwis11437992002-04-12 09:54:03 +000016613
Matthias Kloseb9621712010-04-24 17:59:49 +000016614
Victor Stinnere0be4232011-10-25 13:06:09 +020016615: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016616ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016617ac_clean_files_save=$ac_clean_files
16618ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016619{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16620$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16621as_write_fail=0
16622cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016623#! $SHELL
16624# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016625# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016626# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016627# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016628
Martin v. Löwis11437992002-04-12 09:54:03 +000016629debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016630ac_cs_recheck=false
16631ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016632
Matthias Kloseb9621712010-04-24 17:59:49 +000016633SHELL=\${CONFIG_SHELL-$SHELL}
16634export SHELL
16635_ASEOF
16636cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16637## -------------------- ##
16638## M4sh Initialization. ##
16639## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641# Be more Bourne compatible
16642DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016643if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 emulate sh
16645 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016646 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016647 # is contrary to our usage. Disable this feature.
16648 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016650else
Matthias Kloseb9621712010-04-24 17:59:49 +000016651 case `(set -o) 2>/dev/null` in #(
16652 *posix*) :
16653 set -o posix ;; #(
16654 *) :
16655 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016657fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016658
16659
Matthias Kloseb9621712010-04-24 17:59:49 +000016660as_nl='
16661'
16662export as_nl
16663# Printing a long string crashes Solaris 7 /usr/bin/printf.
16664as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16665as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16666as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16667# Prefer a ksh shell builtin over an external printf program on Solaris,
16668# but without wasting forks for bash or zsh.
16669if test -z "$BASH_VERSION$ZSH_VERSION" \
16670 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16671 as_echo='print -r --'
16672 as_echo_n='print -rn --'
16673elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16674 as_echo='printf %s\n'
16675 as_echo_n='printf %s'
16676else
16677 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16678 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16679 as_echo_n='/usr/ucb/echo -n'
16680 else
16681 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16682 as_echo_n_body='eval
16683 arg=$1;
16684 case $arg in #(
16685 *"$as_nl"*)
16686 expr "X$arg" : "X\\(.*\\)$as_nl";
16687 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16688 esac;
16689 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16690 '
16691 export as_echo_n_body
16692 as_echo_n='sh -c $as_echo_n_body as_echo'
16693 fi
16694 export as_echo_body
16695 as_echo='sh -c $as_echo_body as_echo'
16696fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016697
16698# The user is always right.
16699if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016700 PATH_SEPARATOR=:
16701 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16702 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16703 PATH_SEPARATOR=';'
16704 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707
16708# IFS
16709# We need space, tab and new line, in precisely that order. Quoting is
16710# there to prevent editors from complaining about space-tab.
16711# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16712# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016713IFS=" "" $as_nl"
16714
16715# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016716as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016717case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016718 *[\\/]* ) as_myself=$0 ;;
16719 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016720for as_dir in $PATH
16721do
16722 IFS=$as_save_IFS
16723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728 ;;
16729esac
16730# We did not find ourselves, most probably we were run as `sh COMMAND'
16731# in which case we are not to be found in the path.
16732if test "x$as_myself" = x; then
16733 as_myself=$0
16734fi
16735if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016736 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16737 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016738fi
16739
Matthias Kloseb9621712010-04-24 17:59:49 +000016740# Unset variables that we do not need and which cause bugs (e.g. in
16741# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16742# suppresses any "Segmentation fault" message there. '((' could
16743# trigger a bug in pdksh 5.2.14.
16744for as_var in BASH_ENV ENV MAIL MAILPATH
16745do eval test x\${$as_var+set} = xset \
16746 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747done
16748PS1='$ '
16749PS2='> '
16750PS4='+ '
16751
16752# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016753LC_ALL=C
16754export LC_ALL
16755LANGUAGE=C
16756export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757
Matthias Kloseb9621712010-04-24 17:59:49 +000016758# CDPATH.
16759(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16760
16761
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016762# as_fn_error STATUS ERROR [LINENO LOG_FD]
16763# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016764# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16765# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016766# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016767as_fn_error ()
16768{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016769 as_status=$1; test $as_status -eq 0 && as_status=1
16770 if test "$4"; then
16771 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16772 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016773 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016774 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016775 as_fn_exit $as_status
16776} # as_fn_error
16777
16778
16779# as_fn_set_status STATUS
16780# -----------------------
16781# Set $? to STATUS, without forking.
16782as_fn_set_status ()
16783{
16784 return $1
16785} # as_fn_set_status
16786
16787# as_fn_exit STATUS
16788# -----------------
16789# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16790as_fn_exit ()
16791{
16792 set +e
16793 as_fn_set_status $1
16794 exit $1
16795} # as_fn_exit
16796
16797# as_fn_unset VAR
16798# ---------------
16799# Portably unset VAR.
16800as_fn_unset ()
16801{
16802 { eval $1=; unset $1;}
16803}
16804as_unset=as_fn_unset
16805# as_fn_append VAR VALUE
16806# ----------------------
16807# Append the text in VALUE to the end of the definition contained in VAR. Take
16808# advantage of any shell optimizations that allow amortized linear growth over
16809# repeated appends, instead of the typical quadratic growth present in naive
16810# implementations.
16811if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16812 eval 'as_fn_append ()
16813 {
16814 eval $1+=\$2
16815 }'
16816else
16817 as_fn_append ()
16818 {
16819 eval $1=\$$1\$2
16820 }
16821fi # as_fn_append
16822
16823# as_fn_arith ARG...
16824# ------------------
16825# Perform arithmetic evaluation on the ARGs, and store the result in the
16826# global $as_val. Take advantage of shells that can avoid forks. The arguments
16827# must be portable across $(()) and expr.
16828if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16829 eval 'as_fn_arith ()
16830 {
16831 as_val=$(( $* ))
16832 }'
16833else
16834 as_fn_arith ()
16835 {
16836 as_val=`expr "$@" || test $? -eq 1`
16837 }
16838fi # as_fn_arith
16839
16840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016841if expr a : '\(a\)' >/dev/null 2>&1 &&
16842 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16843 as_expr=expr
16844else
16845 as_expr=false
16846fi
16847
16848if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16849 as_basename=basename
16850else
16851 as_basename=false
16852fi
16853
Matthias Kloseb9621712010-04-24 17:59:49 +000016854if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16855 as_dirname=dirname
16856else
16857 as_dirname=false
16858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860as_me=`$as_basename -- "$0" ||
16861$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16862 X"$0" : 'X\(//\)$' \| \
16863 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016864$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865 sed '/^.*\/\([^/][^/]*\)\/*$/{
16866 s//\1/
16867 q
16868 }
16869 /^X\/\(\/\/\)$/{
16870 s//\1/
16871 q
16872 }
16873 /^X\/\(\/\).*/{
16874 s//\1/
16875 q
16876 }
16877 s/.*/./; q'`
16878
Matthias Kloseb9621712010-04-24 17:59:49 +000016879# Avoid depending upon Character Ranges.
16880as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16881as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16882as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16883as_cr_digits='0123456789'
16884as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885
16886ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016887case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016889 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016891 xy) ECHO_C='\c';;
16892 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16893 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894 esac;;
16895*)
16896 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016897esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016898
Martin v. Löwis11437992002-04-12 09:54:03 +000016899rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900if test -d conf$$.dir; then
16901 rm -f conf$$.dir/conf$$.file
16902else
16903 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016906if (echo >conf$$.file) 2>/dev/null; then
16907 if ln -s conf$$.file conf$$ 2>/dev/null; then
16908 as_ln_s='ln -s'
16909 # ... but there are two gotchas:
16910 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16911 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016912 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016913 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016914 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016915 elif ln conf$$.file conf$$ 2>/dev/null; then
16916 as_ln_s=ln
16917 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016918 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016920else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016921 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16924rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016925
Matthias Kloseb9621712010-04-24 17:59:49 +000016926
16927# as_fn_mkdir_p
16928# -------------
16929# Create "$as_dir" as a directory, including parents if necessary.
16930as_fn_mkdir_p ()
16931{
16932
16933 case $as_dir in #(
16934 -*) as_dir=./$as_dir;;
16935 esac
16936 test -d "$as_dir" || eval $as_mkdir_p || {
16937 as_dirs=
16938 while :; do
16939 case $as_dir in #(
16940 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16941 *) as_qdir=$as_dir;;
16942 esac
16943 as_dirs="'$as_qdir' $as_dirs"
16944 as_dir=`$as_dirname -- "$as_dir" ||
16945$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16946 X"$as_dir" : 'X\(//\)[^/]' \| \
16947 X"$as_dir" : 'X\(//\)$' \| \
16948 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16949$as_echo X"$as_dir" |
16950 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16951 s//\1/
16952 q
16953 }
16954 /^X\(\/\/\)[^/].*/{
16955 s//\1/
16956 q
16957 }
16958 /^X\(\/\/\)$/{
16959 s//\1/
16960 q
16961 }
16962 /^X\(\/\).*/{
16963 s//\1/
16964 q
16965 }
16966 s/.*/./; q'`
16967 test -d "$as_dir" && break
16968 done
16969 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016970 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016971
16972
16973} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016974if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016975 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016976else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016977 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016978 as_mkdir_p=false
16979fi
16980
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016981
16982# as_fn_executable_p FILE
16983# -----------------------
16984# Test if FILE is an executable regular file.
16985as_fn_executable_p ()
16986{
16987 test -f "$1" && test -x "$1"
16988} # as_fn_executable_p
16989as_test_x='test -x'
16990as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016991
16992# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016993as_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 +000016994
16995# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016996as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016997
16998
Martin v. Löwis11437992002-04-12 09:54:03 +000016999exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017000## ----------------------------------- ##
17001## Main body of $CONFIG_STATUS script. ##
17002## ----------------------------------- ##
17003_ASEOF
17004test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017005
Matthias Kloseb9621712010-04-24 17:59:49 +000017006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17007# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017008# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017009# values after options handling.
17010ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017011This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017012generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
17014 CONFIG_FILES = $CONFIG_FILES
17015 CONFIG_HEADERS = $CONFIG_HEADERS
17016 CONFIG_LINKS = $CONFIG_LINKS
17017 CONFIG_COMMANDS = $CONFIG_COMMANDS
17018 $ $0 $@
17019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020on `(hostname || uname -n) 2>/dev/null | sed 1q`
17021"
17022
Martin v. Löwis11437992002-04-12 09:54:03 +000017023_ACEOF
17024
Matthias Kloseb9621712010-04-24 17:59:49 +000017025case $ac_config_files in *"
17026"*) set x $ac_config_files; shift; ac_config_files=$*;;
17027esac
17028
17029case $ac_config_headers in *"
17030"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17031esac
17032
17033
17034cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017035# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017036config_files="$ac_config_files"
17037config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017040
Matthias Kloseb9621712010-04-24 17:59:49 +000017041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017042ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017043\`$as_me' instantiates files and other configuration actions
17044from templates according to the current configuration. Unless the files
17045and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017046
Matthias Kloseb9621712010-04-24 17:59:49 +000017047Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
17049 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017051 --config print configuration, then exit
17052 -q, --quiet, --silent
17053 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 -d, --debug don't remove temporary files
17055 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 --file=FILE[:TEMPLATE]
17057 instantiate the configuration file FILE
17058 --header=FILE[:TEMPLATE]
17059 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017060
17061Configuration files:
17062$config_files
17063
17064Configuration headers:
17065$config_headers
17066
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017067Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017070cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17071ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017072ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017073python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017074configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017075 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017076
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017077Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017078This config.status script is free software; the Free Software Foundation
17079gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080
17081ac_pwd='$ac_pwd'
17082srcdir='$srcdir'
17083INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017084MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017085test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017086_ACEOF
17087
Matthias Kloseb9621712010-04-24 17:59:49 +000017088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17089# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017090ac_need_defaults=:
17091while test $# != 0
17092do
17093 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017094 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17096 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017097 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017098 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017099 --*=)
17100 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17101 ac_optarg=
17102 ac_shift=:
17103 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017105 ac_option=$1
17106 ac_optarg=$2
17107 ac_shift=shift
17108 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 esac
17110
Skip Montanaro6dead952003-09-25 14:50:04 +000017111 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017113 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17114 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017116 $as_echo "$ac_cs_version"; exit ;;
17117 --config | --confi | --conf | --con | --co | --c )
17118 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017120 debug=: ;;
17121 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017122 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017123 case $ac_optarg in
17124 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017125 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017126 esac
17127 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 ac_need_defaults=false;;
17129 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017130 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 case $ac_optarg in
17132 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17133 esac
17134 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017135 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 --he | --h)
17137 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017138 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017139Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017141 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17143 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17144 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017145
17146 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017147 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017148Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017149
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017152
17153 esac
17154 shift
17155done
17156
Skip Montanaro6dead952003-09-25 14:50:04 +000017157ac_configure_extra_args=
17158
17159if $ac_cs_silent; then
17160 exec 6>/dev/null
17161 ac_configure_extra_args="$ac_configure_extra_args --silent"
17162fi
17163
17164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017165cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017166if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017167 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017168 shift
17169 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17170 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017172 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017173fi
17174
Martin v. Löwis11437992002-04-12 09:54:03 +000017175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017177exec 5>>config.log
17178{
17179 echo
17180 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17181## Running $as_me. ##
17182_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017183 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017187cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017189
Matthias Kloseb9621712010-04-24 17:59:49 +000017190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191
17192# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017193for ac_config_target in $ac_config_targets
17194do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195 case $ac_config_target in
17196 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17197 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17198 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017199 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17200 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017202 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017203 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017204 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205
Victor Stinnere0be4232011-10-25 13:06:09 +020017206 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017207 esac
17208done
17209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210
Martin v. Löwis11437992002-04-12 09:54:03 +000017211# If the user did not use the arguments to specify the items to instantiate,
17212# then the envvar interface is used. Set only those that are not.
17213# We use the long form for the default assignment because of an extremely
17214# bizarre bug on SunOS 4.1.3.
17215if $ac_need_defaults; then
17216 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17217 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17218fi
17219
Skip Montanaro6dead952003-09-25 14:50:04 +000017220# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017222# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017223# Hook for its removal unless debugging.
17224# Note that there is a small window in which the directory will not be cleaned:
17225# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017226$debug ||
17227{
Victor Stinnere0be4232011-10-25 13:06:09 +020017228 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017230 : "${ac_tmp:=$tmp}"
17231 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017233 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017234}
Martin v. Löwis11437992002-04-12 09:54:03 +000017235# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017236
Martin v. Löwis11437992002-04-12 09:54:03 +000017237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017239 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017240} ||
17241{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017242 tmp=./conf$$-$RANDOM
17243 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017244} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017245ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017246
Matthias Kloseb9621712010-04-24 17:59:49 +000017247# Set up the scripts for CONFIG_FILES section.
17248# No need to generate them if there are no CONFIG_FILES.
17249# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017251
Matthias Kloseb9621712010-04-24 17:59:49 +000017252
17253ac_cr=`echo X | tr X '\015'`
17254# On cygwin, bash can eat \r inside `` if the user requested igncr.
17255# But we know of no other shell where ac_cr would be empty at this
17256# point, so we can use a bashism as a fallback.
17257if test "x$ac_cr" = x; then
17258 eval ac_cr=\$\'\\r\'
17259fi
17260ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17261if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017262 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017263else
17264 ac_cs_awk_cr=$ac_cr
17265fi
17266
Victor Stinnere0be4232011-10-25 13:06:09 +020017267echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017268_ACEOF
17269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270
Matthias Kloseb9621712010-04-24 17:59:49 +000017271{
17272 echo "cat >conf$$subs.awk <<_ACEOF" &&
17273 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17274 echo "_ACEOF"
17275} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017276 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17277ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278ac_delim='%!_!# '
17279for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017280 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017281 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17284 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 break
17286 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017287 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017288 else
17289 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017290 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291done
Matthias Kloseb9621712010-04-24 17:59:49 +000017292rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293
Matthias Kloseb9621712010-04-24 17:59:49 +000017294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017295cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017297sed -n '
17298h
17299s/^/S["/; s/!.*/"]=/
17300p
17301g
17302s/^[^!]*!//
17303:repl
17304t repl
17305s/'"$ac_delim"'$//
17306t delim
17307:nl
17308h
17309s/\(.\{148\}\)..*/\1/
17310t more1
17311s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17312p
17313n
17314b repl
17315:more1
17316s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17317p
17318g
17319s/.\{148\}//
17320t nl
17321:delim
17322h
17323s/\(.\{148\}\)..*/\1/
17324t more2
17325s/["\\]/\\&/g; s/^/"/; s/$/"/
17326p
17327b
17328:more2
17329s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17330p
17331g
17332s/.\{148\}//
17333t delim
17334' <conf$$subs.awk | sed '
17335/^[^""]/{
17336 N
17337 s/\n//
17338}
17339' >>$CONFIG_STATUS || ac_write_fail=1
17340rm -f conf$$subs.awk
17341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17342_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017343cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017344 for (key in S) S_is_set[key] = 1
17345 FS = ""
17346
17347}
17348{
17349 line = $ 0
17350 nfields = split(line, field, "@")
17351 substed = 0
17352 len = length(field[1])
17353 for (i = 2; i < nfields; i++) {
17354 key = field[i]
17355 keylen = length(key)
17356 if (S_is_set[key]) {
17357 value = S[key]
17358 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17359 len += length(value) + length(field[++i])
17360 substed = 1
17361 } else
17362 len += 1 + keylen
17363 }
17364
17365 print line
17366}
17367
17368_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17371if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17372 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17373else
17374 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017375fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017376 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017377_ACEOF
17378
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017379# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17380# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381# trailing colons and then remove the whole line if VPATH becomes empty
17382# (actually we leave an empty line to preserve line numbers).
17383if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017384 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17385h
17386s///
17387s/^/:/
17388s/[ ]*$/:/
17389s/:\$(srcdir):/:/g
17390s/:\${srcdir}:/:/g
17391s/:@srcdir@:/:/g
17392s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017394x
17395s/\(=[ ]*\).*/\1/
17396G
17397s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398s/^[^=]*=[ ]*$//
17399}'
17400fi
17401
Matthias Kloseb9621712010-04-24 17:59:49 +000017402cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017403fi # test -n "$CONFIG_FILES"
17404
Matthias Kloseb9621712010-04-24 17:59:49 +000017405# Set up the scripts for CONFIG_HEADERS section.
17406# No need to generate them if there are no CONFIG_HEADERS.
17407# This happens for instance with `./config.status Makefile'.
17408if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017409cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017410BEGIN {
17411_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412
Matthias Kloseb9621712010-04-24 17:59:49 +000017413# Transform confdefs.h into an awk script `defines.awk', embedded as
17414# here-document in config.status, that substitutes the proper values into
17415# config.h.in to produce config.h.
17416
17417# Create a delimiter string that does not exist in confdefs.h, to ease
17418# handling of long lines.
17419ac_delim='%!_!# '
17420for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017421 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17422 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 break
17424 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017425 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017426 else
17427 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17428 fi
17429done
17430
17431# For the awk script, D is an array of macro values keyed by name,
17432# likewise P contains macro parameters if any. Preserve backslash
17433# newline sequences.
17434
17435ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17436sed -n '
17437s/.\{148\}/&'"$ac_delim"'/g
17438t rset
17439:rset
17440s/^[ ]*#[ ]*define[ ][ ]*/ /
17441t def
17442d
17443:def
17444s/\\$//
17445t bsnl
17446s/["\\]/\\&/g
17447s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17448D["\1"]=" \3"/p
17449s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17450d
17451:bsnl
17452s/["\\]/\\&/g
17453s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17454D["\1"]=" \3\\\\\\n"\\/p
17455t cont
17456s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17457t cont
17458d
17459:cont
17460n
17461s/.\{148\}/&'"$ac_delim"'/g
17462t clear
17463:clear
17464s/\\$//
17465t bsnlc
17466s/["\\]/\\&/g; s/^/"/; s/$/"/p
17467d
17468:bsnlc
17469s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17470b cont
17471' <confdefs.h | sed '
17472s/'"$ac_delim"'/"\\\
17473"/g' >>$CONFIG_STATUS || ac_write_fail=1
17474
17475cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17476 for (key in D) D_is_set[key] = 1
17477 FS = ""
17478}
17479/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17480 line = \$ 0
17481 split(line, arg, " ")
17482 if (arg[1] == "#") {
17483 defundef = arg[2]
17484 mac1 = arg[3]
17485 } else {
17486 defundef = substr(arg[1], 2)
17487 mac1 = arg[2]
17488 }
17489 split(mac1, mac2, "(") #)
17490 macro = mac2[1]
17491 prefix = substr(line, 1, index(line, defundef) - 1)
17492 if (D_is_set[macro]) {
17493 # Preserve the white space surrounding the "#".
17494 print prefix "define", macro P[macro] D[macro]
17495 next
17496 } else {
17497 # Replace #undef with comments. This is necessary, for example,
17498 # in the case of _POSIX_SOURCE, which is predefined and required
17499 # on some systems where configure will not decide to define it.
17500 if (defundef == "undef") {
17501 print "/*", prefix defundef, macro, "*/"
17502 next
17503 }
17504 }
17505}
17506{ print }
17507_ACAWK
17508_ACEOF
17509cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017510 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017511fi # test -n "$CONFIG_HEADERS"
17512
17513
17514eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17515shift
17516for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517do
17518 case $ac_tag in
17519 :[FHLC]) ac_mode=$ac_tag; continue;;
17520 esac
17521 case $ac_mode$ac_tag in
17522 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017523 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524 :[FH]-) ac_tag=-:-;;
17525 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17526 esac
17527 ac_save_IFS=$IFS
17528 IFS=:
17529 set x $ac_tag
17530 IFS=$ac_save_IFS
17531 shift
17532 ac_file=$1
17533 shift
17534
17535 case $ac_mode in
17536 :L) ac_source=$1;;
17537 :[FH])
17538 ac_file_inputs=
17539 for ac_f
17540 do
17541 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017542 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543 *) # Look for the file first in the build tree, then in the source tree
17544 # (if the path is not absolute). The absolute path cannot be DOS-style,
17545 # because $ac_f cannot contain `:'.
17546 test -f "$ac_f" ||
17547 case $ac_f in
17548 [\\/$]*) false;;
17549 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17550 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017551 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017553 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17554 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 done
17556
17557 # Let's still pretend it is `configure' which instantiates (i.e., don't
17558 # use $as_me), people would be surprised to read:
17559 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017560 configure_input='Generated from '`
17561 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17562 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563 if test x"$ac_file" != x-; then
17564 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017565 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17566$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 # Neutralize special characters interpreted by sed in replacement strings.
17569 case $configure_input in #(
17570 *\&* | *\|* | *\\* )
17571 ac_sed_conf_input=`$as_echo "$configure_input" |
17572 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17573 *) ac_sed_conf_input=$configure_input;;
17574 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575
17576 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017577 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17578 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 esac
17580 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 esac
17582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017584$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017585 X"$ac_file" : 'X\(//\)[^/]' \| \
17586 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017588$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017589 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17590 s//\1/
17591 q
17592 }
17593 /^X\(\/\/\)[^/].*/{
17594 s//\1/
17595 q
17596 }
17597 /^X\(\/\/\)$/{
17598 s//\1/
17599 q
17600 }
17601 /^X\(\/\).*/{
17602 s//\1/
17603 q
17604 }
17605 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017606 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017607 ac_builddir=.
17608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609case "$ac_dir" in
17610.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17611*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017612 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017614 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615 case $ac_top_builddir_sub in
17616 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17617 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17618 esac ;;
17619esac
17620ac_abs_top_builddir=$ac_pwd
17621ac_abs_builddir=$ac_pwd$ac_dir_suffix
17622# for backward compatibility:
17623ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017624
17625case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017628 ac_top_srcdir=$ac_top_builddir_sub
17629 ac_abs_top_srcdir=$ac_pwd ;;
17630 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017631 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017632 ac_top_srcdir=$srcdir
17633 ac_abs_top_srcdir=$srcdir ;;
17634 *) # Relative name.
17635 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17636 ac_top_srcdir=$ac_top_build_prefix$srcdir
17637 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017638esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017639ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017640
Martin v. Löwis11437992002-04-12 09:54:03 +000017641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642 case $ac_mode in
17643 :F)
17644 #
17645 # CONFIG_FILE
17646 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017647
17648 case $INSTALL in
17649 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017651 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017652 ac_MKDIR_P=$MKDIR_P
17653 case $MKDIR_P in
17654 [\\/$]* | ?:[\\/]* ) ;;
17655 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17656 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017657_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658
Matthias Kloseb9621712010-04-24 17:59:49 +000017659cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660# If the template does not know about datarootdir, expand it.
17661# FIXME: This hack should be removed a few years after 2.60.
17662ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017663ac_sed_dataroot='
17664/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665 p
17666 q
17667}
17668/@datadir@/p
17669/@docdir@/p
17670/@infodir@/p
17671/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017672/@mandir@/p'
17673case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674*datarootdir*) ac_datarootdir_seen=yes;;
17675*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17677$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017679cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017680 ac_datarootdir_hack='
17681 s&@datadir@&$datadir&g
17682 s&@docdir@&$docdir&g
17683 s&@infodir@&$infodir&g
17684 s&@localedir@&$localedir&g
17685 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017686 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687esac
17688_ACEOF
17689
17690# Neutralize VPATH when `$srcdir' = `.'.
17691# Shell code in configure.ac might set extrasub.
17692# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17694ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017695$extrasub
17696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017698:t
17699/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017700s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017702s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703s&@srcdir@&$ac_srcdir&;t t
17704s&@abs_srcdir@&$ac_abs_srcdir&;t t
17705s&@top_srcdir@&$ac_top_srcdir&;t t
17706s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17707s&@builddir@&$ac_builddir&;t t
17708s&@abs_builddir@&$ac_abs_builddir&;t t
17709s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17710s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017711s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017713"
Victor Stinnere0be4232011-10-25 13:06:09 +020017714eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17715 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017718 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17719 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17720 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017722which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017723$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017724which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017725
Victor Stinnere0be4232011-10-25 13:06:09 +020017726 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017727 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017728 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17729 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017730 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017731 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732 ;;
17733 :H)
17734 #
17735 # CONFIG_HEADER
17736 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017738 {
17739 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017740 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17741 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017742 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017743 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017744 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17745$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017747 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017748 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017749 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017750 fi
17751 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017752 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017753 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017754 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017755 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758
17759 esac
17760
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017761
17762 case $ac_file$ac_mode in
17763 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17764
17765 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766done # for ac_tag
17767
Guido van Rossum627b2d71993-12-24 10:39:16 +000017768
Matthias Kloseb9621712010-04-24 17:59:49 +000017769as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017770_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017771ac_clean_files=$ac_clean_files_save
17772
Matthias Kloseb9621712010-04-24 17:59:49 +000017773test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017774 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017775
Martin v. Löwis11437992002-04-12 09:54:03 +000017776
17777# configure is writing to config.log, and then calls config.status.
17778# config.status does its own redirection, appending to config.log.
17779# Unfortunately, on DOS this fails, as config.log is still kept open
17780# by configure, so config.status won't be able to write to it; its
17781# output is simply discarded. So we exec the FD to /dev/null,
17782# effectively closing config.log, so it can be properly (re)opened and
17783# appended to by config.status. When coming back to configure, we
17784# need to make the FD available again.
17785if test "$no_create" != yes; then
17786 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017787 ac_config_status_args=
17788 test "$silent" = yes &&
17789 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017790 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017791 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017792 exec 5>>config.log
17793 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17794 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017795 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017796fi
17797if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17799$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017800fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017801
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017802
Christian Heimes75ed8902013-11-20 01:11:18 +010017803echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017804if test ! -f Modules/Setup
17805then
17806 cp $srcdir/Modules/Setup.dist Modules/Setup
17807fi
17808
Christian Heimes75ed8902013-11-20 01:11:18 +010017809echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017810if test ! -f Modules/Setup.local
17811then
17812 echo "# Edit this file for local setup changes" >Modules/Setup.local
17813fi
17814
Christian Heimes75ed8902013-11-20 01:11:18 +010017815echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017816$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017817 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017818 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017819mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017820
17821if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17822 echo "" >&6
17823 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070017824 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 +000017825 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017826 echo "" >&6
17827 echo "" >&6
17828fi
17829