blob: 5904b54c3eda80a7595b29f74202f3c08cecde6e [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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
784localstatedir
785sharedstatedir
786sysconfdir
787datadir
788datarootdir
789libexecdir
790sbindir
791bindir
792program_transform_name
793prefix
794exec_prefix
795PACKAGE_URL
796PACKAGE_BUGREPORT
797PACKAGE_STRING
798PACKAGE_VERSION
799PACKAGE_TARNAME
800PACKAGE_NAME
801PATH_SEPARATOR
802SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000803ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000804ac_user_opts='
805enable_option_checking
806enable_universalsdk
807with_universal_archs
808with_framework_name
809enable_framework
810with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600811with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_libs
823with_system_expat
824with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100825with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000826enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700827with_tcltk_includes
828with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000830enable_ipv6
831with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000833with_c_locale_coercion
834with_c_locale_warning
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700836with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_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
Christian Heimesff5be6e2018-01-20 13:19:21 +0100842with_openssl
Matthias Kloseb9621712010-04-24 17:59:49 +0000843'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 ac_precious_vars='build_alias
845host_alias
846target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100847MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848CC
849CFLAGS
850LDFLAGS
851LIBS
852CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100853CPP
854PKG_CONFIG
855PKG_CONFIG_PATH
856PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
Guido van Rossum627b2d71993-12-24 10:39:16 +0000858
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860ac_init_help=
861ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000862ac_unrecognized_opts=
863ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# The variables have the same names as the options, with
865# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000866cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869no_recursion=
870prefix=NONE
871program_prefix=NONE
872program_suffix=NONE
873program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878x_includes=NONE
879x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881# Installation directory options.
882# These are left unexpanded so users can "make install exec_prefix=/foo"
883# and all the variables that are supposed to be based on exec_prefix
884# by default will actually change.
885# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887bindir='${exec_prefix}/bin'
888sbindir='${exec_prefix}/sbin'
889libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890datarootdir='${prefix}/share'
891datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892sysconfdir='${prefix}/etc'
893sharedstatedir='${prefix}/com'
894localstatedir='${prefix}/var'
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
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148 ac_prev=sbindir ;;
1149 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152
1153 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155 | --sharedst | --shareds | --shared | --share | --shar \
1156 | --sha | --sh)
1157 ac_prev=sharedstatedir ;;
1158 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 -site | --site | --sit)
1165 ac_prev=site ;;
1166 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170 ac_prev=srcdir ;;
1171 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175 | --syscon | --sysco | --sysc | --sys | --sy)
1176 ac_prev=sysconfdir ;;
1177 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187 verbose=yes ;;
1188
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 -version | --version | --versio | --versi | --vers | -V)
1190 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt_orig=$ac_useropt
1214 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215 case $ac_user_opts in
1216 *"
1217"with_$ac_useropt"
1218"*) ;;
1219 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1220 ac_unrecognized_sep=', ';;
1221 esac
1222 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 --x)
1225 # Obsolete; use --with-x.
1226 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1229 | --x-incl | --x-inc | --x-in | --x-i)
1230 ac_prev=x_includes ;;
1231 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1232 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1236 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1237 ac_prev=x_libraries ;;
1238 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1239 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001242 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1243Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ;;
1245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 *=*)
1247 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1248 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 case $ac_envvar in #(
1250 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 export $ac_envvar ;;
1255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001256 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001261 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 ;;
1263
1264 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265done
1266
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270fi
1271
Matthias Kloseb9621712010-04-24 17:59:49 +00001272if test -n "$ac_unrecognized_opts"; then
1273 case $enable_option_checking in
1274 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001275 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1277 esac
1278fi
1279
1280# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1282 datadir sysconfdir sharedstatedir localstatedir includedir \
1283 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimesff5be6e2018-01-20 13:19:21 +01001284 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001287 # Remove trailing slashes.
1288 case $ac_val in
1289 */ )
1290 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1291 eval $ac_var=\$ac_val;;
1292 esac
1293 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 [\\/$]* | ?:[\\/]* ) continue;;
1296 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001299done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# There might be people who depend on the old broken behavior: `$host'
1302# used to hold the argument of --host etc.
1303# FIXME: To remove some day.
1304build=$build_alias
1305host=$host_alias
1306target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# FIXME: To remove some day.
1309if test "x$host_alias" != x; then
1310 if test "x$build_alias" = x; then
1311 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 elif test "x$build_alias" != "x$host_alias"; then
1313 cross_compiling=yes
1314 fi
1315fi
1316
1317ac_tool_prefix=
1318test -n "$host_alias" && ac_tool_prefix=$host_alias-
1319
1320test "$silent" = yes && exec 6>/dev/null
1321
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323ac_pwd=`pwd` && test -n "$ac_pwd" &&
1324ac_ls_di=`ls -di .` &&
1325ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001326 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331# Find the source files, if location was not specified.
1332if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001335 ac_confdir=`$as_dirname -- "$as_myself" ||
1336$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1337 X"$as_myself" : 'X\(//\)[^/]' \| \
1338 X"$as_myself" : 'X\(//\)$' \| \
1339 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1340$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\/\)[^/].*/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\).*/{
1354 s//\1/
1355 q
1356 }
1357 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001358 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360 srcdir=..
1361 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362else
1363 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365if test ! -r "$srcdir/$ac_unique_file"; then
1366 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001367 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1370ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 pwd)`
1373# When building in place, set srcdir=.
1374if test "$ac_abs_confdir" = "$ac_pwd"; then
1375 srcdir=.
1376fi
1377# Remove unnecessary trailing slashes from srcdir.
1378# Double slashes in file names in object file debugging info
1379# mess up M-x gdb in Emacs.
1380case $srcdir in
1381*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1382esac
1383for ac_var in $ac_precious_vars; do
1384 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1385 eval ac_env_${ac_var}_value=\$${ac_var}
1386 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1388done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390#
1391# Report the --help message.
1392#
1393if test "$ac_init_help" = "long"; then
1394 # Omit some internal or obsolete options to make the list less imposing.
1395 # This message is too long to be a string in the A/UX 3.1 sh.
1396 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001397\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399Usage: $0 [OPTION]... [VAR=VALUE]...
1400
1401To assign environment variables (e.g., CC, CFLAGS...), specify them as
1402VAR=VALUE. See below for descriptions of some of the useful variables.
1403
1404Defaults for the options are specified in brackets.
1405
1406Configuration:
1407 -h, --help display this help and exit
1408 --help=short display options specific to this package
1409 --help=recursive display the short help of all the included packages
1410 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001411 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 --cache-file=FILE cache test results in FILE [disabled]
1413 -C, --config-cache alias for \`--cache-file=config.cache'
1414 -n, --no-create do not create output files
1415 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1416
Martin v. Löwis11437992002-04-12 09:54:03 +00001417Installation directories:
1418 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001419 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
1423By default, \`make install' will install all the files in
1424\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1425an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1426for instance \`--prefix=\$HOME'.
1427
1428For better control, use the options below.
1429
1430Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 --bindir=DIR user executables [EPREFIX/bin]
1432 --sbindir=DIR system admin executables [EPREFIX/sbin]
1433 --libexecdir=DIR program executables [EPREFIX/libexec]
1434 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1435 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1436 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1437 --libdir=DIR object code libraries [EPREFIX/lib]
1438 --includedir=DIR C header files [PREFIX/include]
1439 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1440 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1441 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1442 --infodir=DIR info documentation [DATAROOTDIR/info]
1443 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1444 --mandir=DIR man documentation [DATAROOTDIR/man]
1445 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1446 --htmldir=DIR html documentation [DOCDIR]
1447 --dvidir=DIR dvi documentation [DOCDIR]
1448 --pdfdir=DIR pdf documentation [DOCDIR]
1449 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
1451
1452 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001453
1454System types:
1455 --build=BUILD configure for building on BUILD [guessed]
1456 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001457 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
1459fi
1460
1461if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001462 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001463 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 cat <<\_ACEOF
1466
1467Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1470 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001471 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001472 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --enable-framework[=INSTALLDIR]
1474 Build (MacOSX|Darwin) framework
1475 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001476 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001477 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1478 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001479 --enable-loadable-sqlite-extensions
1480 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --enable-ipv6 Enable ipv6 (with ipv4) support
1482 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001483 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486Optional Packages:
1487 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1488 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001489 --with-universal-archs=ARCH
1490 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001491 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001492 --with-framework-name=FRAMEWORK
1493 specify an alternate name of the framework built
1494 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001496 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001497 --with-cxx-main=<compiler>
1498 compile main() and link python executable with C++
1499 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-suffix=.exe set executable suffix
1501 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001502 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001503 --with-lto Enable Link Time Optimization in any build. Disabled
1504 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001505 --with-hash-algorithm=[fnv|siphash24]
1506 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001507 --with-address-sanitizer
1508 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001510 --with-system-expat build pyexpat module using an installed expat
1511 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001512 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001513 --with-system-libmpdec build _decimal module using an installed libmpdec
1514 library
Ned Deilyd819b932013-09-06 01:07:05 -07001515 --with-tcltk-includes='-I...'
1516 override search for Tcl and Tk include files
1517 --with-tcltk-libs='-L...'
1518 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001519 --with-dbmliborder=db1:db2:...
1520 order to check db backends for dbm. Valid value is a
1521 colon separated string with the backend names
1522 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001523 --with(out)-doc-strings disable/enable documentation strings
1524 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001525 --with(out)-c-locale-coercion
1526 disable/enable C locale coercion to a UTF-8 based
1527 locale
1528 --with(out)-c-locale-warning
1529 disable/enable locale compatibility warning in the C
1530 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001531 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001532 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001540 --with-openssl=DIR root of the OpenSSL directory
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001624python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($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_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
Matthias Kloseb9621712010-04-24 17:59:49 +00001977# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1978# --------------------------------------------
1979# Tries to find the compile-time value of EXPR in a program that includes
1980# INCLUDES, setting VAR accordingly. Returns whether the value could be
1981# computed
1982ac_fn_c_compute_int ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 if test "$cross_compiling" = yes; then
1986 # Depending upon the size, compute the lo and hi bounds.
1987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988/* end confdefs.h. */
1989$4
1990int
1991main ()
1992{
1993static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 ac_lo=0 ac_mid=0
2003 while :; do
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 ac_hi=$ac_mid; break
2020else
2021 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2022 if test $ac_lo -le $ac_mid; then
2023 ac_lo= ac_hi=
2024 break
2025 fi
2026 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029 done
2030else
2031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2032/* end confdefs.h. */
2033$4
2034int
2035main ()
2036{
2037static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002038test_array [0] = 0;
2039return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_hi=-1 ac_mid=-1
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_func LINENO FUNC VAR
2161# ----------------------------------
2162# Tests whether FUNC exists, setting the cache variable VAR accordingly
2163ac_fn_c_check_func ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2167$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002168if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002169 $as_echo_n "(cached) " >&6
2170else
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h. */
2173/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2174 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2175#define $2 innocuous_$2
2176
2177/* System header to define __stub macros and hopefully few prototypes,
2178 which can conflict with char $2 (); below.
2179 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2180 <limits.h> exists even on freestanding compilers. */
2181
2182#ifdef __STDC__
2183# include <limits.h>
2184#else
2185# include <assert.h>
2186#endif
2187
2188#undef $2
2189
2190/* Override any GCC internal prototype to avoid an error.
2191 Use char because int might match the return type of a GCC
2192 builtin and then its argument prototype would still apply. */
2193#ifdef __cplusplus
2194extern "C"
2195#endif
2196char $2 ();
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined __stub_$2 || defined __stub___$2
2201choke me
2202#endif
2203
2204int
2205main ()
2206{
2207return $2 ();
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_link "$LINENO"; then :
2213 eval "$3=yes"
2214else
2215 eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext \
2218 conftest$ac_exeext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224
2225} # ac_fn_c_check_func
2226
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002227# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2228# ---------------------------------------------
2229# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2230# accordingly.
2231ac_fn_c_check_decl ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 as_decl_name=`echo $2|sed 's/ *(.*//'`
2235 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2237$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2238if eval \${$3+:} false; then :
2239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243$4
2244int
2245main ()
2246{
2247#ifndef $as_decl_name
2248#ifdef __cplusplus
2249 (void) $as_decl_use;
2250#else
2251 (void) $as_decl_name;
2252#endif
2253#endif
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_compile "$LINENO"; then :
2260 eval "$3=yes"
2261else
2262 eval "$3=no"
2263fi
2264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2265fi
2266eval ac_res=\$$3
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2268$as_echo "$ac_res" >&6; }
2269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2270
2271} # ac_fn_c_check_decl
2272
Matthias Kloseb9621712010-04-24 17:59:49 +00002273# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2274# ----------------------------------------------------
2275# Tries to find if the field MEMBER exists in type AGGR, after including
2276# INCLUDES, setting cache variable VAR accordingly.
2277ac_fn_c_check_member ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2281$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002282if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287$5
2288int
2289main ()
2290{
2291static $2 ac_aggr;
2292if (ac_aggr.$3)
2293return 0;
2294 ;
2295 return 0;
2296}
2297_ACEOF
2298if ac_fn_c_try_compile "$LINENO"; then :
2299 eval "$4=yes"
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$5
2304int
2305main ()
2306{
2307static $2 ac_aggr;
2308if (sizeof ac_aggr.$3)
2309return 0;
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$4=yes"
2316else
2317 eval "$4=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322fi
2323eval ac_res=\$$4
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002326 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002327
2328} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002329cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002330This file contains any messages produced by compilers while
2331running configure, to aid debugging if configure makes a mistake.
2332
Ned Deily4829bc62016-09-12 17:29:04 -04002333It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002334generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002335
2336 $ $0 $@
2337
2338_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002340{
2341cat <<_ASUNAME
2342## --------- ##
2343## Platform. ##
2344## --------- ##
2345
2346hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2347uname -m = `(uname -m) 2>/dev/null || echo unknown`
2348uname -r = `(uname -r) 2>/dev/null || echo unknown`
2349uname -s = `(uname -s) 2>/dev/null || echo unknown`
2350uname -v = `(uname -v) 2>/dev/null || echo unknown`
2351
2352/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2353/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2354
2355/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2356/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2357/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002359/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2360/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2361/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2362
2363_ASUNAME
2364
2365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2366for as_dir in $PATH
2367do
2368 IFS=$as_save_IFS
2369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002370 $as_echo "PATH: $as_dir"
2371 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374} >&5
2375
2376cat >&5 <<_ACEOF
2377
2378
2379## ----------- ##
2380## Core tests. ##
2381## ----------- ##
2382
2383_ACEOF
2384
2385
2386# Keep a trace of the command line.
2387# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002390# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002391ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_configure_args0=
2393ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002394ac_must_keep_next=false
2395for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002396do
Skip Montanaro6dead952003-09-25 14:50:04 +00002397 for ac_arg
2398 do
2399 case $ac_arg in
2400 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2402 | -silent | --silent | --silen | --sile | --sil)
2403 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002404 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002405 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 esac
2407 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002414 case $ac_arg in
2415 *=* | --config-cache | -C | -disable-* | --disable-* \
2416 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2417 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2418 | -with-* | --with-* | -without-* | --without-* | --x)
2419 case "$ac_configure_args0 " in
2420 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2421 esac
2422 ;;
2423 -* ) ac_must_keep_next=true ;;
2424 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 ;;
2428 esac
2429 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002430done
Matthias Kloseb9621712010-04-24 17:59:49 +00002431{ ac_configure_args0=; unset ac_configure_args0;}
2432{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434# When interrupted or exit'd, cleanup temporary files, and complete
2435# config.log. We remove comments because anyway the quotes in there
2436# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437# WARNING: Use '\'' to represent an apostrophe within the trap.
2438# 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 +00002439trap 'exit_status=$?
2440 # Save into config.log some information that might help in debugging.
2441 {
2442 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002443
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002444 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002446## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002480 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002481## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 echo
2484 for ac_var in $ac_subst_vars
2485 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 eval ac_val=\$$ac_var
2487 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 done | sort
2492 echo
2493
2494 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002495 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002497## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo
2499 for ac_var in $ac_subst_files
2500 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 eval ac_val=\$$ac_var
2502 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 done | sort
2507 echo
2508 fi
2509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Matthias Kloseb9621712010-04-24 17:59:49 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Matthias Kloseb9621712010-04-24 17:59:49 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568 # We do not want a PATH search for config.site.
2569 case $CONFIG_SITE in #((
2570 -*) ac_site_file1=./$CONFIG_SITE;;
2571 */*) ac_site_file1=$CONFIG_SITE;;
2572 *) ac_site_file1=./$CONFIG_SITE;;
2573 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 ac_site_file1=$prefix/share/config.site
2576 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577else
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 ac_site_file1=$ac_default_prefix/share/config.site
2579 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002581for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582do
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 test "x$ac_site_file" = xNONE && continue
2584 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2585 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2586$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 . "$ac_site_file" \
2589 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2591as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002592See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$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 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002668 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Trent Nelson4d4ec652012-10-16 08:51:24 -04002682
Christian Heimesff5be6e2018-01-20 13:19:21 +01002683
2684
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002685if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002686 # If we're building out-of-tree, we need to make sure the following
2687 # resources get picked up before their $srcdir counterparts.
2688 # Objects/ -> typeslots.inc
2689 # Include/ -> Python-ast.h, graminit.h
2690 # Python/ -> importlib.h
2691 # (A side effect of this is that these resources will automatically be
2692 # regenerated when building out-of-tree, regardless of whether or not
2693 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2694 # off.)
2695 BASECPPFLAGS="-IObjects -IInclude -IPython"
2696else
2697 BASECPPFLAGS=""
2698fi
2699
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002700
2701
2702
2703
Victor Stinner9ed34a82017-05-02 22:35:58 +02002704if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002705then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002706# Extract the first word of "git", so it can be a program name with args.
2707set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2709$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002710if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711 $as_echo_n "(cached) " >&6
2712else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713 if test -n "$HAS_GIT"; then
2714 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715else
2716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2717for as_dir in $PATH
2718do
2719 IFS=$as_save_IFS
2720 test -z "$as_dir" && as_dir=.
2721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2725 break 2
2726 fi
2727done
2728 done
2729IFS=$as_save_IFS
2730
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732fi
2733fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734HAS_GIT=$ac_cv_prog_HAS_GIT
2735if test -n "$HAS_GIT"; then
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2737$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738else
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2740$as_echo "no" >&6; }
2741fi
2742
2743
2744else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002747if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748then
Ned Deily554626a2017-03-20 23:41:52 -04002749 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2750 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753 GITVERSION=""
2754 GITTAG=""
2755 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756fi
2757
2758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002760
2761
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002762ac_aux_dir=
2763for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2764 if test -f "$ac_dir/install-sh"; then
2765 ac_aux_dir=$ac_dir
2766 ac_install_sh="$ac_aux_dir/install-sh -c"
2767 break
2768 elif test -f "$ac_dir/install.sh"; then
2769 ac_aux_dir=$ac_dir
2770 ac_install_sh="$ac_aux_dir/install.sh -c"
2771 break
2772 elif test -f "$ac_dir/shtool"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/shtool install -c"
2775 break
2776 fi
2777done
2778if test -z "$ac_aux_dir"; then
2779 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2780fi
2781
2782# These three variables are undocumented and unsupported,
2783# and are intended to be withdrawn in a future Autoconf release.
2784# They can cause serious problems if a builder's source tree is in a directory
2785# whose full name contains unusual characters.
2786ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2787ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2788ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2789
2790
2791# Make sure we can run config.sub.
2792$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2793 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2794
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2796$as_echo_n "checking build system type... " >&6; }
2797if ${ac_cv_build+:} false; then :
2798 $as_echo_n "(cached) " >&6
2799else
2800 ac_build_alias=$build_alias
2801test "x$ac_build_alias" = x &&
2802 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2803test "x$ac_build_alias" = x &&
2804 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2805ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2806 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2807
2808fi
2809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2810$as_echo "$ac_cv_build" >&6; }
2811case $ac_cv_build in
2812*-*-*) ;;
2813*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2814esac
2815build=$ac_cv_build
2816ac_save_IFS=$IFS; IFS='-'
2817set x $ac_cv_build
2818shift
2819build_cpu=$1
2820build_vendor=$2
2821shift; shift
2822# Remember, the first character of IFS is used to create $*,
2823# except with old shells:
2824build_os=$*
2825IFS=$ac_save_IFS
2826case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2827
2828
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2830$as_echo_n "checking host system type... " >&6; }
2831if ${ac_cv_host+:} false; then :
2832 $as_echo_n "(cached) " >&6
2833else
2834 if test "x$host_alias" = x; then
2835 ac_cv_host=$ac_cv_build
2836else
2837 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2838 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2839fi
2840
2841fi
2842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2843$as_echo "$ac_cv_host" >&6; }
2844case $ac_cv_host in
2845*-*-*) ;;
2846*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2847esac
2848host=$ac_cv_host
2849ac_save_IFS=$IFS; IFS='-'
2850set x $ac_cv_host
2851shift
2852host_cpu=$1
2853host_vendor=$2
2854shift; shift
2855# Remember, the first character of IFS is used to create $*,
2856# except with old shells:
2857host_os=$*
2858IFS=$ac_save_IFS
2859case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2860
2861
2862
doko@python.orga10e4a92013-01-25 18:45:12 +01002863
2864
Ned Deilyfcbc2462014-08-22 13:32:49 -07002865# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2866rm -f pybuilddir.txt
2867
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002868for ac_prog in python$PACKAGE_VERSION python3 python
2869do
2870 # Extract the first word of "$ac_prog", so it can be a program name with args.
2871set dummy $ac_prog; ac_word=$2
2872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2873$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002874if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002875 $as_echo_n "(cached) " >&6
2876else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002877 if test -n "$PYTHON_FOR_REGEN"; then
2878 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002879else
2880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2881for as_dir in $PATH
2882do
2883 IFS=$as_save_IFS
2884 test -z "$as_dir" && as_dir=.
2885 for ac_exec_ext in '' $ac_executable_extensions; do
2886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002887 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2889 break 2
2890 fi
2891done
2892 done
2893IFS=$as_save_IFS
2894
2895fi
2896fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2898if test -n "$PYTHON_FOR_REGEN"; then
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2900$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002901else
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2903$as_echo "no" >&6; }
2904fi
2905
2906
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002908done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002909test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911
2912
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002913if test "$cross_compiling" = yes; then
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2915$as_echo_n "checking for python interpreter for cross build... " >&6; }
2916 if test -z "$PYTHON_FOR_BUILD"; then
2917 for interp in python$PACKAGE_VERSION python3 python; do
2918 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002919 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 +02002920 break
2921 fi
2922 interp=
2923 done
2924 if test x$interp = x; then
2925 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2926 fi
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2928$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002929 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 +02002930 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002931elif test "$cross_compiling" = maybe; then
2932 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002933else
2934 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2935fi
2936
2937
Martin v. Löwis11437992002-04-12 09:54:03 +00002938
Benjamin Petersond23f8222009-04-05 19:13:16 +00002939if test "$prefix" != "/"; then
2940 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
2945
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002946# We don't use PACKAGE_ variables, and they cause conflicts
2947# with other autoconf-based packages that include Python.h
2948grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2949rm confdefs.h
2950mv confdefs.h.new confdefs.h
2951
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002952
Ned Deily4829bc62016-09-12 17:29:04 -04002953VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002954
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002955# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002956
2957SOVERSION=1.0
2958
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002959# The later defininition of _XOPEN_SOURCE disables certain features
2960# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2961
Matthias Kloseb9621712010-04-24 17:59:49 +00002962$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002963
2964
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002965# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2966# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2967# them.
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970
2971
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977
2978
Martin v. Löwisd6320502004-08-12 13:45:08 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002980# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002984
2985
2986
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002987define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002988
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002989# Arguments passed to configure.
2990
2991CONFIG_ARGS="$ac_configure_args"
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2994$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002996if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002997 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002998 case $enableval in
2999 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003000 # Locate the best usable SDK, see Mac/README.txt for more
3001 # information
3002 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003003 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003004 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003005 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3006 if test ! -d "${enableval}"
3007 then
3008 enableval=/
3009 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003010 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003011 ;;
3012 esac
3013 case $enableval in
3014 no)
3015 UNIVERSALSDK=
3016 enable_universalsdk=
3017 ;;
3018 *)
3019 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020 if test ! -d "${UNIVERSALSDK}"
3021 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003022 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 ;;
3025 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003026
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027
Thomas Wouters477c8d52006-05-27 19:21:47 +00003028else
3029
3030 UNIVERSALSDK=
3031 enable_universalsdk=
3032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035if test -n "${UNIVERSALSDK}"
3036then
Matthias Kloseb9621712010-04-24 17:59:49 +00003037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3038$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039else
Matthias Kloseb9621712010-04-24 17:59:49 +00003040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3041$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003045
Ned Deily87adb6e2013-10-18 21:09:56 -07003046ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003047
Ned Deilycbfb9a52012-06-23 16:02:19 -07003048# For backward compatibility reasons we prefer to select '32-bit' if available,
3049# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003050UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051if test "`uname -s`" = "Darwin"
3052then
3053 if test -n "${UNIVERSALSDK}"
3054 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003055 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056 then
3057 UNIVERSAL_ARCHS="intel"
3058 fi
3059 fi
3060fi
3061
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003062
Matthias Kloseb9621712010-04-24 17:59:49 +00003063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3064$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003065
3066# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003067if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003069 UNIVERSAL_ARCHS="$withval"
3070
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071fi
3072
Ned Deily87adb6e2013-10-18 21:09:56 -07003073if test -n "${UNIVERSALSDK}"
3074then
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3076$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3077else
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3079$as_echo "no" >&6; }
3080fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003082
3083# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003084if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003085 withval=$with_framework_name;
3086 PYTHONFRAMEWORK=${withval}
3087 PYTHONFRAMEWORKDIR=${withval}.framework
3088 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3089
3090else
3091
3092 PYTHONFRAMEWORK=Python
3093 PYTHONFRAMEWORKDIR=Python.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3095
3096fi
3097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003098# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003099if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003100 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003101 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003102 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003103 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003104 esac
3105 case $enableval in
3106 no)
3107 PYTHONFRAMEWORK=
3108 PYTHONFRAMEWORKDIR=no-framework
3109 PYTHONFRAMEWORKPREFIX=
3110 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003111 FRAMEWORKINSTALLFIRST=
3112 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003113 FRAMEWORKALTINSTALLFIRST=
3114 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003115 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003116 if test "x${prefix}" = "xNONE"; then
3117 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3118 else
3119 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3120 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003122 ;;
3123 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003124 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003127 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003128 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3129 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003130 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003131 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003133 if test "x${prefix}" = "xNONE" ; then
3134 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003135
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003139
3140 case "${enableval}" in
3141 /System*)
3142 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3143 if test "${prefix}" = "NONE" ; then
3144 # See below
3145 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3146 fi
3147 ;;
3148
3149 /Library*)
3150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3151 ;;
3152
3153 */Library/Frameworks)
3154 MDIR="`dirname "${enableval}"`"
3155 MDIR="`dirname "${MDIR}"`"
3156 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3157
3158 if test "${prefix}" = "NONE"; then
3159 # User hasn't specified the
3160 # --prefix option, but wants to install
3161 # the framework in a non-default location,
3162 # ensure that the compatibility links get
3163 # installed relative to that prefix as well
3164 # instead of in /usr/local.
3165 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3166 fi
3167 ;;
3168
3169 *)
3170 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3171 ;;
3172 esac
3173
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003176 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003182 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3183
3184 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3185
Jack Jansene578a632001-08-15 01:27:14 +00003186 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003187
Guido van Rossum563e7081996-09-10 18:20:48 +00003188else
Martin v. Löwis11437992002-04-12 09:54:03 +00003189
Jack Jansene578a632001-08-15 01:27:14 +00003190 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003191 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003192 PYTHONFRAMEWORKPREFIX=
3193 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194 FRAMEWORKINSTALLFIRST=
3195 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003196 FRAMEWORKALTINSTALLFIRST=
3197 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003198 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003199 if test "x${prefix}" = "xNONE" ; then
3200 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3201 else
3202 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3203 fi
Jack Jansene578a632001-08-15 01:27:14 +00003204 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003205
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207fi
3208
Thomas Wouters477c8d52006-05-27 19:21:47 +00003209
3210
Michael W. Hudson54241132001-12-07 15:38:26 +00003211
3212
3213
3214
Jack Jansene578a632001-08-15 01:27:14 +00003215
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003216
3217
3218
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003219
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003220
Ned Deilyb8f944f2013-11-21 22:42:25 -08003221
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003222
3223cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003224#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003225_ACEOF
3226
3227
Jack Jansene578a632001-08-15 01:27:14 +00003228##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003229## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003230## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003231##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003232# Set name for machine-dependent library files
3233
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3235$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003236if test -z "$MACHDEP"
3237then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003238 # avoid using uname for cross builds
3239 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003240 # ac_sys_system and ac_sys_release are used for setting
3241 # a lot of different things including 'define_xopen_source'
3242 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003244 *-*-linux-android*)
3245 ac_sys_system=Linux-android
3246 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 *-*-linux*)
3248 ac_sys_system=Linux
3249 ;;
3250 *-*-cygwin*)
3251 ac_sys_system=Cygwin
3252 ;;
3253 *)
3254 # for now, limit cross builds to known configurations
3255 MACHDEP="unknown"
3256 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3257 esac
3258 ac_sys_release=
3259 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003260 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003261 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003262 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003263 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003264 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003265 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003266 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003267 fi
3268 ac_md_system=`echo $ac_sys_system |
3269 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3270 ac_md_release=`echo $ac_sys_release |
3271 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3272 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003273
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003275 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003276 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003277 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003278 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003280fi
Guido van Rossum91922671997-10-09 20:24:13 +00003281
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003282
3283if test "$cross_compiling" = yes; then
3284 case "$host" in
3285 *-*-linux*)
3286 case "$host_cpu" in
3287 arm*)
3288 _host_cpu=arm
3289 ;;
3290 *)
3291 _host_cpu=$host_cpu
3292 esac
3293 ;;
3294 *-*-cygwin*)
3295 _host_cpu=
3296 ;;
3297 *)
3298 # for now, limit cross builds to known configurations
3299 MACHDEP="unknown"
3300 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3301 esac
3302 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3303fi
3304
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003305# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3306# disable features if it is defined, without any means to access these
3307# features as extensions. For these systems, we skip the definition of
3308# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3309# some feature, make sure there is no alternative way to access this
3310# feature. Also, when using wildcards, make sure you have verified the
3311# need for not defining _XOPEN_SOURCE on all systems matching the
3312# wildcard, and that the wildcard does not include future systems
3313# (which may remove their limitations).
3314case $ac_sys_system/$ac_sys_release in
3315 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3316 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003317 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003318 # In addition, Stefan Krah confirms that issue #1244610 exists through
3319 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003320 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003321 define_xopen_source=no
3322 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3323 # also defined. This can be overridden by defining _BSD_SOURCE
3324 # As this has a different meaning on Linux, only define it on OpenBSD
3325
Matthias Kloseb9621712010-04-24 17:59:49 +00003326$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003327
3328 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003329 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003330 # 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
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003335
3336 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003337 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3338 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3339 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003340 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 +00003341 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003342 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3343 # request to enable features supported by the standard as a request
3344 # to disable features not supported by the standard. The best way
3345 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3346 # entirely and define __EXTENSIONS__ instead.
3347 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003348 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003349 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3350 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003351 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003352 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003353 define_xopen_source=no;;
3354 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003355 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003357 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003358 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3359 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3360 # identifies itself as Darwin/7.*
3361 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3362 # disables platform specific features beyond repair.
3363 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3364 # has no effect, don't bother defining them
3365 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003366 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003367 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003368 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003369 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3370 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3371 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003372 AIX/4)
3373 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003374 AIX/5)
3375 if test `uname -r` -eq 1; then
3376 define_xopen_source=no
3377 fi
3378 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003379 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3380 # defining NI_NUMERICHOST.
3381 QNX/6.3.2)
3382 define_xopen_source=no
3383 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003384
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003385esac
3386
3387if test $define_xopen_source = yes
3388then
Victor Stinner14d098d2011-09-07 22:29:43 +02003389 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003390
Victor Stinner14d098d2011-09-07 22:29:43 +02003391$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003392
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
3394 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3395 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3396 # several APIs are not declared. Since this is also needed in some
3397 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003398
Matthias Kloseb9621712010-04-24 17:59:49 +00003399$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003400
3401
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003403$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405fi
3406
Christian Heimes647cd872013-12-07 23:39:33 +01003407# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3408case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003409 hp*|HP*)
3410 define_stdc_a1=yes;;
3411 *)
3412 define_stdc_a1=no;;
3413esac
3414
3415if test $define_stdc_a1 = yes
3416then
Christian Heimes647cd872013-12-07 23:39:33 +01003417
3418$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3419
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420fi
Christian Heimes647cd872013-12-07 23:39:33 +01003421
Jack Jansen6b08a402004-06-03 12:41:45 +00003422# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3423# it may influence the way we can build extensions, so distutils
3424# needs to check it
3425
Thomas Wouters477c8d52006-05-27 19:21:47 +00003426
Jack Jansen6b08a402004-06-03 12:41:45 +00003427CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003428EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003429
Guido van Rossum627b2d71993-12-24 10:39:16 +00003430# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003431
3432# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3433# for debug/optimization stuff. BASECFLAGS is for flags that are required
3434# just to get things to compile and link. Users are free to override OPT
3435# when running configure or make. The build should not break if they do.
3436# BASECFLAGS should generally not be messed with, however.
3437
3438# XXX shouldn't some/most/all of this code be merged with the stuff later
3439# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3441$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003443# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003444if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003446 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003447 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003448 without_gcc=yes;;
3449 yes) CC=gcc
3450 without_gcc=no;;
3451 *) CC=$withval
3452 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003453 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003454else
Martin v. Löwis11437992002-04-12 09:54:03 +00003455
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003456 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003457 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003458 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003459 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003460 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461fi
3462
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3464$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003465
Zachary Ware5af85642015-12-21 12:09:17 -06003466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3467$as_echo_n "checking for --with-icc... " >&6; }
3468
3469# Check whether --with-icc was given.
3470if test "${with_icc+set}" = set; then :
3471 withval=$with_icc;
3472 case $withval in
3473 no) CC=${CC:-cc}
3474 with_icc=no;;
3475 yes) CC=icc
3476 CXX=icpc
3477 with_icc=yes;;
3478 *) CC=$withval
3479 with_icc=$withval;;
3480 esac
3481else
3482
3483 with_icc=no
3484fi
3485
3486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3487$as_echo "$with_icc" >&6; }
3488
Guido van Rossum8b131c51995-03-09 14:10:13 +00003489# If the user switches compilers, we can't believe the cache
3490if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3491then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003492 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003493(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003494fi
3495
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003496# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3497# when the compiler supports them, but we don't always want -O2, and
3498# we set -g later.
3499if test -z "$CFLAGS"; then
3500 CFLAGS=
3501fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003502
3503if test "$ac_sys_system" = "Darwin"
3504then
3505 # Compiler selection on MacOSX is more complicated than
3506 # AC_PROG_CC can handle, see Mac/README.txt for more
3507 # information
3508 if test -z "${CC}"
3509 then
3510 found_gcc=
3511 found_clang=
3512 as_save_IFS=$IFS; IFS=:
3513 for as_dir in $PATH
3514 do
3515 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003516 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003517 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003518 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003519 fi
3520 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003521 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003522 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003523 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524 fi
3525 fi
3526 done
3527 IFS=$as_save_IFS
3528
3529 if test -n "$found_gcc" -a -n "$found_clang"
3530 then
3531 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3532 then
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3534$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3535 CC="$found_clang"
3536 CXX="$found_clang++"
3537 fi
3538
3539
3540 elif test -z "$found_gcc" -a -n "$found_clang"
3541 then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3543$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3544 CC="$found_clang"
3545 CXX="$found_clang++"
3546
3547 elif test -z "$found_gcc" -a -z "$found_clang"
3548 then
3549 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3550 if test -n "${found_clang}"
3551 then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3553$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3554 CC="${found_clang}"
3555 CXX="`/usr/bin/xcrun -find clang++`"
3556
3557 # else: use default behaviour
3558 fi
3559 fi
3560 fi
3561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562ac_ext=c
3563ac_cpp='$CPP $CPPFLAGS'
3564ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3565ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3566ac_compiler_gnu=$ac_cv_c_compiler_gnu
3567if test -n "$ac_tool_prefix"; then
3568 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3569set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003572if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003574else
3575 if test -n "$CC"; then
3576 ac_cv_prog_CC="$CC" # Let the user override the test.
3577else
Martin v. Löwis11437992002-04-12 09:54:03 +00003578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579for as_dir in $PATH
3580do
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $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 +00003587 break 2
3588 fi
3589done
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003592
Jack Jansendd19cf82001-12-06 22:36:17 +00003593fi
3594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003596if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3598$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003599else
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605fi
3606if test -z "$ac_cv_prog_CC"; then
3607 ac_ct_CC=$CC
3608 # Extract the first word of "gcc", so it can be a program name with args.
3609set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3611$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003612if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003614else
3615 if test -n "$ac_ct_CC"; then
3616 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3617else
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH
3620do
3621 IFS=$as_save_IFS
3622 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 $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 +00003627 break 2
3628 fi
3629done
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003632
3633fi
3634fi
3635ac_ct_CC=$ac_cv_prog_ac_ct_CC
3636if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3638$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003642fi
3643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 if test "x$ac_ct_CC" = x; then
3645 CC=""
3646 else
3647 case $cross_compiling:$ac_tool_warned in
3648yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651ac_tool_warned=yes ;;
3652esac
3653 CC=$ac_ct_CC
3654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003657fi
3658
Jack Jansendd19cf82001-12-06 22:36:17 +00003659if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 if test -n "$ac_tool_prefix"; then
3661 # 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 +00003662set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Martin v. Löwis11437992002-04-12 09:54:03 +00003671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $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 +00003680 break 2
3681 fi
3682done
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003685
3686fi
3687fi
3688CC=$ac_cv_prog_CC
3689if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3691$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003692else
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003695fi
3696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700if test -z "$CC"; then
3701 # Extract the first word of "cc", so it can be a program name with args.
3702set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3704$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003705if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003707else
3708 if test -n "$CC"; then
3709 ac_cv_prog_CC="$CC" # Let the user override the test.
3710else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003711 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3720 ac_prog_rejected=yes
3721 continue
3722 fi
3723 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $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 +00003725 break 2
3726 fi
3727done
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003730
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731if test $ac_prog_rejected = yes; then
3732 # We found a bogon in the path, so make sure we never use it.
3733 set dummy $ac_cv_prog_CC
3734 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736 # We chose a different compiler from the bogus one.
3737 # However, it has the same basename, so the bogon will be chosen
3738 # first if we set CC to just the basename; use the full file name.
3739 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003740 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 fi
3742fi
3743fi
3744fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003745CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755fi
3756if test -z "$CC"; then
3757 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 do
3760 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3761set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003764if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003766else
3767 if test -n "$CC"; then
3768 ac_cv_prog_CC="$CC" # Let the user override the test.
3769else
Martin v. Löwis11437992002-04-12 09:54:03 +00003770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3771for as_dir in $PATH
3772do
3773 IFS=$as_save_IFS
3774 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $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 +00003779 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003781done
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003784
3785fi
3786fi
3787CC=$ac_cv_prog_CC
3788if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3790$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 test -n "$CC" && break
3798 done
3799fi
3800if test -z "$CC"; then
3801 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003803do
3804 # Extract the first word of "$ac_prog", so it can be a program name with args.
3805set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003808if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003810else
3811 if test -n "$ac_ct_CC"; then
3812 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3813else
3814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3815for as_dir in $PATH
3816do
3817 IFS=$as_save_IFS
3818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $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 +00003823 break 2
3824 fi
3825done
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829fi
3830fi
3831ac_ct_CC=$ac_cv_prog_ac_ct_CC
3832if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3834$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835else
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3837$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 test -n "$ac_ct_CC" && break
3842done
Michael W. Hudson54241132001-12-07 15:38:26 +00003843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 if test "x$ac_ct_CC" = x; then
3845 CC=""
3846 else
3847 case $cross_compiling:$ac_tool_warned in
3848yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851ac_tool_warned=yes ;;
3852esac
3853 CC=$ac_ct_CC
3854 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003855fi
3856
3857fi
3858
3859
Matthias Kloseb9621712010-04-24 17:59:49 +00003860test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003862as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003863See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003864
3865# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003866$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3867set X $ac_compile
3868ac_compiler=$2
3869for ac_option in --version -v -V -qversion; do
3870 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871case "(($ac_try" in
3872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3873 *) ac_try_echo=$ac_try;;
3874esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3876$as_echo "$ac_try_echo"; } >&5
3877 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 if test -s conftest.err; then
3880 sed '10a\
3881... rest of stderr output deleted ...
3882 10q' conftest.err >conftest.er1
3883 cat conftest.er1 >&5
3884 fi
3885 rm -f conftest.er1 conftest.err
3886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3887 test $ac_status = 0; }
3888done
Martin v. Löwis11437992002-04-12 09:54:03 +00003889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003891/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893int
3894main ()
3895{
3896
3897 ;
3898 return 0;
3899}
3900_ACEOF
3901ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003902ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003903# Try to create an executable without -o first, disregard a.out.
3904# It will help us diagnose broken compilers, and finding out an intuition
3905# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3907$as_echo_n "checking whether the C compiler works... " >&6; }
3908ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3909
3910# The possible output files:
3911ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913ac_rmfiles=
3914for ac_file in $ac_files
3915do
3916 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3919 esac
3920done
3921rm -f $ac_rmfiles
3922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924case "(($ac_try" in
3925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3926 *) ac_try_echo=$ac_try;;
3927esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3929$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3933 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3935# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3936# in a Makefile. We should not override ac_cv_exeext if it was cached,
3937# so that the user can short-circuit this test for compilers unknown to
3938# Autoconf.
3939for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003940do
3941 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003944 ;;
3945 [ab].out )
3946 # We found the default executable, but exeext='' is most
3947 # certainly right.
3948 break;;
3949 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 then :; else
3952 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3953 fi
3954 # We set ac_cv_exeext here because the later test for it is not
3955 # safe: cross compilers may not add the suffix if given an `-o'
3956 # argument, so we may need to know it at that point already.
3957 # Even if this section looks crufty: it has the advantage of
3958 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959 break;;
3960 * )
3961 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 esac
3963done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964test "$ac_cv_exeext" = no && ac_cv_exeext=
3965
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003966else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 ac_file=''
3968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003969if test -z "$ac_file"; then :
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3971$as_echo "no" >&6; }
3972$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003973sed 's/^/| /' conftest.$ac_ext >&5
3974
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003977as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003978See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003979else
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3981$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3984$as_echo_n "checking for C compiler default output file name... " >&6; }
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3986$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3992$as_echo_n "checking for suffix of executables... " >&6; }
3993if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994case "(($ac_try" in
3995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3996 *) ac_try_echo=$ac_try;;
3997esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3999$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4003 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4005# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4006# work properly (i.e., refer to `conftest.exe'), while it won't with
4007# `rm'.
4008for ac_file in conftest.exe conftest conftest.*; do
4009 test -f "$ac_file" || continue
4010 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4013 break;;
4014 * ) break;;
4015 esac
4016done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017else
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004023rm -f conftest conftest$ac_cv_exeext
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4025$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
4027rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004028EXEEXT=$ac_cv_exeext
4029ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4031/* end confdefs.h. */
4032#include <stdio.h>
4033int
4034main ()
4035{
4036FILE *f = fopen ("conftest.out", "w");
4037 return ferror (f) || fclose (f) != 0;
4038
4039 ;
4040 return 0;
4041}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004043ac_clean_files="$ac_clean_files conftest.out"
4044# Check that the compiler produces executables we can run. If not, either
4045# the compiler is broken, or we cross compile.
4046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4047$as_echo_n "checking whether we are cross compiling... " >&6; }
4048if test "$cross_compiling" != yes; then
4049 { { ac_try="$ac_link"
4050case "(($ac_try" in
4051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052 *) ac_try_echo=$ac_try;;
4053esac
4054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4055$as_echo "$ac_try_echo"; } >&5
4056 (eval "$ac_link") 2>&5
4057 ac_status=$?
4058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4059 test $ac_status = 0; }
4060 if { ac_try='./conftest$ac_cv_exeext'
4061 { { case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
4065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_try") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }; }; then
4071 cross_compiling=no
4072 else
4073 if test "$cross_compiling" = maybe; then
4074 cross_compiling=yes
4075 else
4076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004078as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004079If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004080See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 fi
4082 fi
4083fi
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4085$as_echo "$cross_compiling" >&6; }
4086
4087rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4088ac_clean_files=$ac_clean_files_save
4089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4090$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004091if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo_n "(cached) " >&6
4093else
4094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095/* end confdefs.h. */
4096
4097int
4098main ()
4099{
4100
4101 ;
4102 return 0;
4103}
4104_ACEOF
4105rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004106if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107case "(($ac_try" in
4108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109 *) ac_try_echo=$ac_try;;
4110esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4112$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4116 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117 for ac_file in conftest.o conftest.obj conftest.*; do
4118 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4122 break;;
4123 esac
4124done
4125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004127sed 's/^/| /' conftest.$ac_ext >&5
4128
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004131as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004132See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4137$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004138OBJEXT=$ac_cv_objext
4139ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4141$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004142if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004144else
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004147
Martin v. Löwis11437992002-04-12 09:54:03 +00004148int
4149main ()
4150{
4151#ifndef __GNUC__
4152 choke me
4153#endif
4154
4155 ;
4156 return 0;
4157}
4158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 ac_compiler_gnu=yes
4161else
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004165ac_cv_c_compiler_gnu=$ac_compiler_gnu
4166
4167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4169$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4170if test $ac_compiler_gnu = yes; then
4171 GCC=yes
4172else
4173 GCC=
4174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004175ac_test_CFLAGS=${CFLAGS+set}
4176ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4178$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004179if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004181else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182 ac_save_c_werror_flag=$ac_c_werror_flag
4183 ac_c_werror_flag=yes
4184 ac_cv_prog_cc_g=no
4185 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004198 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 CFLAGS=""
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213
Matthias Kloseb9621712010-04-24 17:59:49 +00004214else
4215 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* end confdefs.h. */
4219
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4236 ac_c_werror_flag=$ac_save_c_werror_flag
4237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4239$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004242elif test $ac_cv_prog_cc_g = yes; then
4243 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004244 CFLAGS="-g -O2"
4245 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004246 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247 fi
4248else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249 if test "$GCC" = yes; then
4250 CFLAGS="-O2"
4251 else
4252 CFLAGS=
4253 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4256$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004257if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004259else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004261ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
4264#include <stdarg.h>
4265#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004266struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004267/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4268struct buf { int x; };
4269FILE * (*rcsopen) (struct buf *, struct stat *, int);
4270static char *e (p, i)
4271 char **p;
4272 int i;
4273{
4274 return p[i];
4275}
4276static char *f (char * (*g) (char **, int), char **p, ...)
4277{
4278 char *s;
4279 va_list v;
4280 va_start (v,p);
4281 s = g (p, va_arg (v,int));
4282 va_end (v);
4283 return s;
4284}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285
4286/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4287 function prototypes and stuff, but not '\xHH' hex character constants.
4288 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004290 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4291 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4296 inside strings and character constants. */
4297#define FOO(x) 'x'
4298int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4299
Skip Montanaro6dead952003-09-25 14:50:04 +00004300int test (int i, double x);
4301struct s1 {int (*f) (int a);};
4302struct s2 {int (*f) (double a);};
4303int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4304int argc;
4305char **argv;
4306int
4307main ()
4308{
4309return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4310 ;
4311 return 0;
4312}
4313_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4315 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004316do
4317 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321rm -f core conftest.err conftest.$ac_objext
4322 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004323done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004325CC=$ac_save_CC
4326
4327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328# AC_CACHE_VAL
4329case "x$ac_cv_prog_cc_c89" in
4330 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4332$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4335$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004336 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4339$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004341if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004342
Matthias Kloseb9621712010-04-24 17:59:49 +00004343fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004344
Martin v. Löwis11437992002-04-12 09:54:03 +00004345ac_ext=c
4346ac_cpp='$CPP $CPPFLAGS'
4347ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4348ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4349ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004351ac_ext=c
4352ac_cpp='$CPP $CPPFLAGS'
4353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4355ac_compiler_gnu=$ac_cv_c_compiler_gnu
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4357$as_echo_n "checking how to run the C preprocessor... " >&6; }
4358# On Suns, sometimes $CPP names a directory.
4359if test -n "$CPP" && test -d "$CPP"; then
4360 CPP=
4361fi
4362if test -z "$CPP"; then
4363 if ${ac_cv_prog_CPP+:} false; then :
4364 $as_echo_n "(cached) " >&6
4365else
4366 # Double quotes because CPP needs to be expanded
4367 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4368 do
4369 ac_preproc_ok=false
4370for ac_c_preproc_warn_flag in '' yes
4371do
4372 # Use a header file that comes with gcc, so configuring glibc
4373 # with a fresh cross-compiler works.
4374 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4375 # <limits.h> exists even on freestanding compilers.
4376 # On the NeXT, cc -E runs the code through the compiler's parser,
4377 # not just through cpp. "Syntax error" is here to catch this case.
4378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4379/* end confdefs.h. */
4380#ifdef __STDC__
4381# include <limits.h>
4382#else
4383# include <assert.h>
4384#endif
4385 Syntax error
4386_ACEOF
4387if ac_fn_c_try_cpp "$LINENO"; then :
4388
4389else
4390 # Broken: fails on valid input.
4391continue
4392fi
4393rm -f conftest.err conftest.i conftest.$ac_ext
4394
4395 # OK, works on sane cases. Now check whether nonexistent headers
4396 # can be detected and how.
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398/* end confdefs.h. */
4399#include <ac_nonexistent.h>
4400_ACEOF
4401if ac_fn_c_try_cpp "$LINENO"; then :
4402 # Broken: success on invalid input.
4403continue
4404else
4405 # Passes both tests.
4406ac_preproc_ok=:
4407break
4408fi
4409rm -f conftest.err conftest.i conftest.$ac_ext
4410
4411done
4412# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4413rm -f conftest.i conftest.err conftest.$ac_ext
4414if $ac_preproc_ok; then :
4415 break
4416fi
4417
4418 done
4419 ac_cv_prog_CPP=$CPP
4420
4421fi
4422 CPP=$ac_cv_prog_CPP
4423else
4424 ac_cv_prog_CPP=$CPP
4425fi
4426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4427$as_echo "$CPP" >&6; }
4428ac_preproc_ok=false
4429for ac_c_preproc_warn_flag in '' yes
4430do
4431 # Use a header file that comes with gcc, so configuring glibc
4432 # with a fresh cross-compiler works.
4433 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4434 # <limits.h> exists even on freestanding compilers.
4435 # On the NeXT, cc -E runs the code through the compiler's parser,
4436 # not just through cpp. "Syntax error" is here to catch this case.
4437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4438/* end confdefs.h. */
4439#ifdef __STDC__
4440# include <limits.h>
4441#else
4442# include <assert.h>
4443#endif
4444 Syntax error
4445_ACEOF
4446if ac_fn_c_try_cpp "$LINENO"; then :
4447
4448else
4449 # Broken: fails on valid input.
4450continue
4451fi
4452rm -f conftest.err conftest.i conftest.$ac_ext
4453
4454 # OK, works on sane cases. Now check whether nonexistent headers
4455 # can be detected and how.
4456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4457/* end confdefs.h. */
4458#include <ac_nonexistent.h>
4459_ACEOF
4460if ac_fn_c_try_cpp "$LINENO"; then :
4461 # Broken: success on invalid input.
4462continue
4463else
4464 # Passes both tests.
4465ac_preproc_ok=:
4466break
4467fi
4468rm -f conftest.err conftest.i conftest.$ac_ext
4469
4470done
4471# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4472rm -f conftest.i conftest.err conftest.$ac_ext
4473if $ac_preproc_ok; then :
4474
4475else
4476 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4478as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4479See \`config.log' for more details" "$LINENO" 5; }
4480fi
4481
4482ac_ext=c
4483ac_cpp='$CPP $CPPFLAGS'
4484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4486ac_compiler_gnu=$ac_cv_c_compiler_gnu
4487
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4489$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4490if ${ac_cv_path_GREP+:} false; then :
4491 $as_echo_n "(cached) " >&6
4492else
4493 if test -z "$GREP"; then
4494 ac_path_GREP_found=false
4495 # Loop through the user's path and test for each of PROGNAME-LIST
4496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4498do
4499 IFS=$as_save_IFS
4500 test -z "$as_dir" && as_dir=.
4501 for ac_prog in grep ggrep; do
4502 for ac_exec_ext in '' $ac_executable_extensions; do
4503 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4504 as_fn_executable_p "$ac_path_GREP" || continue
4505# Check for GNU ac_path_GREP and select it if it is found.
4506 # Check for GNU $ac_path_GREP
4507case `"$ac_path_GREP" --version 2>&1` in
4508*GNU*)
4509 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4510*)
4511 ac_count=0
4512 $as_echo_n 0123456789 >"conftest.in"
4513 while :
4514 do
4515 cat "conftest.in" "conftest.in" >"conftest.tmp"
4516 mv "conftest.tmp" "conftest.in"
4517 cp "conftest.in" "conftest.nl"
4518 $as_echo 'GREP' >> "conftest.nl"
4519 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4520 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4521 as_fn_arith $ac_count + 1 && ac_count=$as_val
4522 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4523 # Best one so far, save it but keep looking for a better one
4524 ac_cv_path_GREP="$ac_path_GREP"
4525 ac_path_GREP_max=$ac_count
4526 fi
4527 # 10*(2^10) chars as input seems more than enough
4528 test $ac_count -gt 10 && break
4529 done
4530 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4531esac
4532
4533 $ac_path_GREP_found && break 3
4534 done
4535 done
4536 done
4537IFS=$as_save_IFS
4538 if test -z "$ac_cv_path_GREP"; then
4539 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4540 fi
4541else
4542 ac_cv_path_GREP=$GREP
4543fi
4544
4545fi
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4547$as_echo "$ac_cv_path_GREP" >&6; }
4548 GREP="$ac_cv_path_GREP"
4549
4550
Łukasz Langaa785c872016-09-09 17:37:37 -07004551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4552$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4553if ${ac_cv_path_SED+:} false; then :
4554 $as_echo_n "(cached) " >&6
4555else
4556 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4557 for ac_i in 1 2 3 4 5 6 7; do
4558 ac_script="$ac_script$as_nl$ac_script"
4559 done
4560 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4561 { ac_script=; unset ac_script;}
4562 if test -z "$SED"; then
4563 ac_path_SED_found=false
4564 # Loop through the user's path and test for each of PROGNAME-LIST
4565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566for as_dir in $PATH
4567do
4568 IFS=$as_save_IFS
4569 test -z "$as_dir" && as_dir=.
4570 for ac_prog in sed gsed; do
4571 for ac_exec_ext in '' $ac_executable_extensions; do
4572 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4573 as_fn_executable_p "$ac_path_SED" || continue
4574# Check for GNU ac_path_SED and select it if it is found.
4575 # Check for GNU $ac_path_SED
4576case `"$ac_path_SED" --version 2>&1` in
4577*GNU*)
4578 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4579*)
4580 ac_count=0
4581 $as_echo_n 0123456789 >"conftest.in"
4582 while :
4583 do
4584 cat "conftest.in" "conftest.in" >"conftest.tmp"
4585 mv "conftest.tmp" "conftest.in"
4586 cp "conftest.in" "conftest.nl"
4587 $as_echo '' >> "conftest.nl"
4588 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4589 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4590 as_fn_arith $ac_count + 1 && ac_count=$as_val
4591 if test $ac_count -gt ${ac_path_SED_max-0}; then
4592 # Best one so far, save it but keep looking for a better one
4593 ac_cv_path_SED="$ac_path_SED"
4594 ac_path_SED_max=$ac_count
4595 fi
4596 # 10*(2^10) chars as input seems more than enough
4597 test $ac_count -gt 10 && break
4598 done
4599 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4600esac
4601
4602 $ac_path_SED_found && break 3
4603 done
4604 done
4605 done
4606IFS=$as_save_IFS
4607 if test -z "$ac_cv_path_SED"; then
4608 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4609 fi
4610else
4611 ac_cv_path_SED=$SED
4612fi
4613
4614fi
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4616$as_echo "$ac_cv_path_SED" >&6; }
4617 SED="$ac_cv_path_SED"
4618 rm -f conftest.sed
4619
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004620
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004621
4622
Matthias Kloseb9621712010-04-24 17:59:49 +00004623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4624$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004626# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004627if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004628 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004629
4630 case $withval in
4631 no) with_cxx_main=no
4632 MAINCC='$(CC)';;
4633 yes) with_cxx_main=yes
4634 MAINCC='$(CXX)';;
4635 *) with_cxx_main=yes
4636 MAINCC=$withval
4637 if test -z "$CXX"
4638 then
4639 CXX=$withval
4640 fi;;
4641 esac
4642else
4643
4644 with_cxx_main=no
4645 MAINCC='$(CC)'
4646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004647fi
4648
Matthias Kloseb9621712010-04-24 17:59:49 +00004649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4650$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651
4652preset_cxx="$CXX"
4653if test -z "$CXX"
4654then
4655 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656 gcc) if test -n "$ac_tool_prefix"; then
4657 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4658set dummy ${ac_tool_prefix}g++; ac_word=$2
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660$as_echo_n "checking for $ac_word... " >&6; }
4661if ${ac_cv_path_CXX+:} false; then :
4662 $as_echo_n "(cached) " >&6
4663else
4664 case $CXX in
4665 [\\/]* | ?:[\\/]*)
4666 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4667 ;;
4668 *)
4669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670for as_dir in notfound
4671do
4672 IFS=$as_save_IFS
4673 test -z "$as_dir" && as_dir=.
4674 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004676 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678 break 2
4679 fi
4680done
4681 done
4682IFS=$as_save_IFS
4683
4684 ;;
4685esac
4686fi
4687CXX=$ac_cv_path_CXX
4688if test -n "$CXX"; then
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4690$as_echo "$CXX" >&6; }
4691else
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
4694fi
4695
4696
4697fi
4698if test -z "$ac_cv_path_CXX"; then
4699 ac_pt_CXX=$CXX
4700 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004701set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4703$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004704if ${ac_cv_path_ac_pt_CXX+:} false; then :
4705 $as_echo_n "(cached) " >&6
4706else
4707 case $ac_pt_CXX in
4708 [\\/]* | ?:[\\/]*)
4709 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4710 ;;
4711 *)
4712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4713for as_dir in notfound
4714do
4715 IFS=$as_save_IFS
4716 test -z "$as_dir" && as_dir=.
4717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004719 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4721 break 2
4722 fi
4723done
4724 done
4725IFS=$as_save_IFS
4726
4727 ;;
4728esac
4729fi
4730ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4731if test -n "$ac_pt_CXX"; then
4732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4733$as_echo "$ac_pt_CXX" >&6; }
4734else
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736$as_echo "no" >&6; }
4737fi
4738
4739 if test "x$ac_pt_CXX" = x; then
4740 CXX="g++"
4741 else
4742 case $cross_compiling:$ac_tool_warned in
4743yes:)
4744{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4745$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4746ac_tool_warned=yes ;;
4747esac
4748 CXX=$ac_pt_CXX
4749 fi
4750else
4751 CXX="$ac_cv_path_CXX"
4752fi
4753 ;;
4754 cc) if test -n "$ac_tool_prefix"; then
4755 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4756set dummy ${ac_tool_prefix}c++; ac_word=$2
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4758$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004759if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761else
4762 case $CXX in
4763 [\\/]* | ?:[\\/]*)
4764 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4765 ;;
4766 *)
4767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4768for as_dir in notfound
4769do
4770 IFS=$as_save_IFS
4771 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004774 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776 break 2
4777 fi
4778done
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004780IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782 ;;
4783esac
4784fi
4785CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004786if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4788$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004789else
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004793
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794
4795fi
4796if test -z "$ac_cv_path_CXX"; then
4797 ac_pt_CXX=$CXX
4798 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4801$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004802if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004807 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 +00004808 ;;
4809 *)
4810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4811for as_dir in notfound
4812do
4813 IFS=$as_save_IFS
4814 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004815 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004819 break 2
4820 fi
4821done
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004823IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825 ;;
4826esac
4827fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4829if test -n "$ac_pt_CXX"; then
4830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4831$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004832else
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4834$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004836
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004837 if test "x$ac_pt_CXX" = x; then
4838 CXX="c++"
4839 else
4840 case $cross_compiling:$ac_tool_warned in
4841yes:)
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4844ac_tool_warned=yes ;;
4845esac
4846 CXX=$ac_pt_CXX
4847 fi
4848else
4849 CXX="$ac_cv_path_CXX"
4850fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852 clang|*/clang) if test -n "$ac_tool_prefix"; then
4853 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4854set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4856$as_echo_n "checking for $ac_word... " >&6; }
4857if ${ac_cv_path_CXX+:} false; then :
4858 $as_echo_n "(cached) " >&6
4859else
4860 case $CXX in
4861 [\\/]* | ?:[\\/]*)
4862 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4863 ;;
4864 *)
4865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866for as_dir in notfound
4867do
4868 IFS=$as_save_IFS
4869 test -z "$as_dir" && as_dir=.
4870 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004872 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4874 break 2
4875 fi
4876done
4877 done
4878IFS=$as_save_IFS
4879
Ned Deilycbfb9a52012-06-23 16:02:19 -07004880 ;;
4881esac
4882fi
4883CXX=$ac_cv_path_CXX
4884if test -n "$CXX"; then
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4886$as_echo "$CXX" >&6; }
4887else
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4889$as_echo "no" >&6; }
4890fi
4891
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004892
4893fi
4894if test -z "$ac_cv_path_CXX"; then
4895 ac_pt_CXX=$CXX
4896 # Extract the first word of "clang++", so it can be a program name with args.
4897set dummy clang++; ac_word=$2
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899$as_echo_n "checking for $ac_word... " >&6; }
4900if ${ac_cv_path_ac_pt_CXX+:} false; then :
4901 $as_echo_n "(cached) " >&6
4902else
4903 case $ac_pt_CXX in
4904 [\\/]* | ?:[\\/]*)
4905 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4906 ;;
4907 *)
4908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909for as_dir in notfound
4910do
4911 IFS=$as_save_IFS
4912 test -z "$as_dir" && as_dir=.
4913 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004915 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917 break 2
4918 fi
4919done
4920 done
4921IFS=$as_save_IFS
4922
4923 ;;
4924esac
4925fi
4926ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4927if test -n "$ac_pt_CXX"; then
4928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4929$as_echo "$ac_pt_CXX" >&6; }
4930else
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932$as_echo "no" >&6; }
4933fi
4934
4935 if test "x$ac_pt_CXX" = x; then
4936 CXX="clang++"
4937 else
4938 case $cross_compiling:$ac_tool_warned in
4939yes:)
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4941$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4942ac_tool_warned=yes ;;
4943esac
4944 CXX=$ac_pt_CXX
4945 fi
4946else
4947 CXX="$ac_cv_path_CXX"
4948fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004949 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004950 icc|*/icc) if test -n "$ac_tool_prefix"; then
4951 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4952set dummy ${ac_tool_prefix}icpc; ac_word=$2
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4954$as_echo_n "checking for $ac_word... " >&6; }
4955if ${ac_cv_path_CXX+:} false; then :
4956 $as_echo_n "(cached) " >&6
4957else
4958 case $CXX in
4959 [\\/]* | ?:[\\/]*)
4960 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4961 ;;
4962 *)
4963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4964for as_dir in notfound
4965do
4966 IFS=$as_save_IFS
4967 test -z "$as_dir" && as_dir=.
4968 for ac_exec_ext in '' $ac_executable_extensions; do
4969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4970 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4972 break 2
4973 fi
4974done
4975 done
4976IFS=$as_save_IFS
4977
4978 ;;
4979esac
4980fi
4981CXX=$ac_cv_path_CXX
4982if test -n "$CXX"; then
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4984$as_echo "$CXX" >&6; }
4985else
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987$as_echo "no" >&6; }
4988fi
4989
4990
4991fi
4992if test -z "$ac_cv_path_CXX"; then
4993 ac_pt_CXX=$CXX
4994 # Extract the first word of "icpc", so it can be a program name with args.
4995set dummy icpc; ac_word=$2
4996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4997$as_echo_n "checking for $ac_word... " >&6; }
4998if ${ac_cv_path_ac_pt_CXX+:} false; then :
4999 $as_echo_n "(cached) " >&6
5000else
5001 case $ac_pt_CXX in
5002 [\\/]* | ?:[\\/]*)
5003 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5004 ;;
5005 *)
5006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007for as_dir in notfound
5008do
5009 IFS=$as_save_IFS
5010 test -z "$as_dir" && as_dir=.
5011 for ac_exec_ext in '' $ac_executable_extensions; do
5012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5013 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5015 break 2
5016 fi
5017done
5018 done
5019IFS=$as_save_IFS
5020
5021 ;;
5022esac
5023fi
5024ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5025if test -n "$ac_pt_CXX"; then
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5027$as_echo "$ac_pt_CXX" >&6; }
5028else
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5030$as_echo "no" >&6; }
5031fi
5032
5033 if test "x$ac_pt_CXX" = x; then
5034 CXX="icpc"
5035 else
5036 case $cross_compiling:$ac_tool_warned in
5037yes:)
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5040ac_tool_warned=yes ;;
5041esac
5042 CXX=$ac_pt_CXX
5043 fi
5044else
5045 CXX="$ac_cv_path_CXX"
5046fi
5047 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005048 esac
5049 if test "$CXX" = "notfound"
5050 then
5051 CXX=""
5052 fi
5053fi
5054if test -z "$CXX"
5055then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005056 if test -n "$ac_tool_prefix"; then
5057 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5058 do
5059 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5060set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005063if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005065else
5066 if test -n "$CXX"; then
5067 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5068else
5069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005076 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005078 break 2
5079 fi
5080done
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005082IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005083
5084fi
5085fi
5086CXX=$ac_cv_prog_CXX
5087if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5089$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005093fi
5094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005096 test -n "$CXX" && break
5097 done
5098fi
5099if test -z "$CXX"; then
5100 ac_ct_CXX=$CXX
5101 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5102do
5103 # Extract the first word of "$ac_prog", so it can be a program name with args.
5104set dummy $ac_prog; ac_word=$2
5105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5106$as_echo_n "checking for $ac_word... " >&6; }
5107if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5108 $as_echo_n "(cached) " >&6
5109else
5110 if test -n "$ac_ct_CXX"; then
5111 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5112else
5113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH
5115do
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
5118 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005120 ac_cv_prog_ac_ct_CXX="$ac_prog"
5121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5122 break 2
5123 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005125 done
5126IFS=$as_save_IFS
5127
5128fi
5129fi
5130ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5131if test -n "$ac_ct_CXX"; then
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5133$as_echo "$ac_ct_CXX" >&6; }
5134else
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5136$as_echo "no" >&6; }
5137fi
5138
5139
5140 test -n "$ac_ct_CXX" && break
5141done
5142
5143 if test "x$ac_ct_CXX" = x; then
5144 CXX="notfound"
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147yes:)
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5150ac_tool_warned=yes ;;
5151esac
5152 CXX=$ac_ct_CXX
5153 fi
5154fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005155
5156 if test "$CXX" = "notfound"
5157 then
5158 CXX=""
5159 fi
5160fi
5161if test "$preset_cxx" != "$CXX"
5162then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005163 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005164
5165 By default, distutils will build C++ extension modules with \"$CXX\".
5166 If this is not intended, then set CXX on the configure command line.
5167 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005168$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005169
5170 By default, distutils will build C++ extension modules with \"$CXX\".
5171 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005172 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005173fi
5174
5175
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005176MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5177
5178
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5180$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5181cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005182#undef bfin
5183#undef cris
5184#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005185#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005186#undef hppa
5187#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005188#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005189#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005190#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005191#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005192#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005193#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005194 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005195#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005196# if defined(__x86_64__) && defined(__LP64__)
5197 x86_64-linux-gnu
5198# elif defined(__x86_64__) && defined(__ILP32__)
5199 x86_64-linux-gnux32
5200# elif defined(__i386__)
5201 i386-linux-gnu
5202# elif defined(__aarch64__) && defined(__AARCH64EL__)
5203# if defined(__ILP32__)
5204 aarch64_ilp32-linux-gnu
5205# else
5206 aarch64-linux-gnu
5207# endif
5208# elif defined(__aarch64__) && defined(__AARCH64EB__)
5209# if defined(__ILP32__)
5210 aarch64_be_ilp32-linux-gnu
5211# else
5212 aarch64_be-linux-gnu
5213# endif
5214# elif defined(__alpha__)
5215 alpha-linux-gnu
5216# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5217# if defined(__ARMEL__)
5218 arm-linux-gnueabihf
5219# else
5220 armeb-linux-gnueabihf
5221# endif
5222# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5223# if defined(__ARMEL__)
5224 arm-linux-gnueabi
5225# else
5226 armeb-linux-gnueabi
5227# endif
5228# elif defined(__hppa__)
5229 hppa-linux-gnu
5230# elif defined(__ia64__)
5231 ia64-linux-gnu
5232# elif defined(__m68k__) && !defined(__mcoldfire__)
5233 m68k-linux-gnu
5234# elif defined(__mips_hard_float) && defined(_MIPSEL)
5235# if _MIPS_SIM == _ABIO32
5236 mipsel-linux-gnu
5237# elif _MIPS_SIM == _ABIN32
5238 mips64el-linux-gnuabin32
5239# elif _MIPS_SIM == _ABI64
5240 mips64el-linux-gnuabi64
5241# else
5242# error unknown platform triplet
5243# endif
5244# elif defined(__mips_hard_float)
5245# if _MIPS_SIM == _ABIO32
5246 mips-linux-gnu
5247# elif _MIPS_SIM == _ABIN32
5248 mips64-linux-gnuabin32
5249# elif _MIPS_SIM == _ABI64
5250 mips64-linux-gnuabi64
5251# else
5252# error unknown platform triplet
5253# endif
5254# elif defined(__or1k__)
5255 or1k-linux-gnu
5256# elif defined(__powerpc__) && defined(__SPE__)
5257 powerpc-linux-gnuspe
5258# elif defined(__powerpc64__)
5259# if defined(__LITTLE_ENDIAN__)
5260 powerpc64le-linux-gnu
5261# else
5262 powerpc64-linux-gnu
5263# endif
5264# elif defined(__powerpc__)
5265 powerpc-linux-gnu
5266# elif defined(__s390x__)
5267 s390x-linux-gnu
5268# elif defined(__s390__)
5269 s390-linux-gnu
5270# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5271 sh4-linux-gnu
5272# elif defined(__sparc__) && defined(__arch64__)
5273 sparc64-linux-gnu
5274# elif defined(__sparc__)
5275 sparc-linux-gnu
5276# else
5277# error unknown platform triplet
5278# endif
5279#elif defined(__FreeBSD_kernel__)
5280# if defined(__LP64__)
5281 x86_64-kfreebsd-gnu
5282# elif defined(__i386__)
5283 i386-kfreebsd-gnu
5284# else
5285# error unknown platform triplet
5286# endif
5287#elif defined(__gnu_hurd__)
5288 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005289#elif defined(__APPLE__)
5290 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005291#else
5292# error unknown platform triplet
5293#endif
5294
5295EOF
5296
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005297if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5300$as_echo "$PLATFORM_TRIPLET" >&6; }
5301else
5302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5303$as_echo "none" >&6; }
5304fi
5305rm -f conftest.c conftest.out
5306
5307if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5308 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5309 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5310 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005311elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5312 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005314
doko@ubuntu.com55532312016-06-14 08:55:19 +02005315if test x$MULTIARCH != x; then
5316 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5317fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005318
5319
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5321$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5322save_LDFLAGS="$LDFLAGS"
5323LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005324
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5326/* end confdefs.h. */
5327
5328int
5329main ()
5330{
5331
5332 ;
5333 return 0;
5334}
5335_ACEOF
5336if ac_fn_c_try_link "$LINENO"; then :
5337 NO_AS_NEEDED="-Wl,--no-as-needed"
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5339$as_echo "yes" >&6; }
5340else
5341 NO_AS_NEEDED=""
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
5344fi
5345rm -f core conftest.err conftest.$ac_objext \
5346 conftest$ac_exeext conftest.$ac_ext
5347LDFLAGS="$save_LDFLAGS"
5348
5349
5350
5351# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352
Matthias Kloseb9621712010-04-24 17:59:49 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5354$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005355if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357else
5358 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5359 then ac_cv_path_EGREP="$GREP -E"
5360 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 # Loop through the user's path and test for each of PROGNAME-LIST
5364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005365for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5366do
5367 IFS=$as_save_IFS
5368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 for ac_prog in egrep; do
5370 for ac_exec_ext in '' $ac_executable_extensions; do
5371 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005372 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005373# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 # Check for GNU $ac_path_EGREP
5375case `"$ac_path_EGREP" --version 2>&1` in
5376*GNU*)
5377 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5378*)
5379 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 while :
5382 do
5383 cat "conftest.in" "conftest.in" >"conftest.tmp"
5384 mv "conftest.tmp" "conftest.in"
5385 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5388 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5391 # Best one so far, save it but keep looking for a better one
5392 ac_cv_path_EGREP="$ac_path_EGREP"
5393 ac_path_EGREP_max=$ac_count
5394 fi
5395 # 10*(2^10) chars as input seems more than enough
5396 test $ac_count -gt 10 && break
5397 done
5398 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5399esac
5400
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 $ac_path_EGREP_found && break 3
5402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005407 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 +00005408 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409else
5410 ac_cv_path_EGREP=$EGREP
5411fi
5412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 fi
5414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5416$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005418
5419
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5421$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005422if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 $as_echo_n "(cached) " >&6
5424else
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005426/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005427#include <stdlib.h>
5428#include <stdarg.h>
5429#include <string.h>
5430#include <float.h>
5431
5432int
5433main ()
5434{
5435
5436 ;
5437 return 0;
5438}
5439_ACEOF
5440if ac_fn_c_try_compile "$LINENO"; then :
5441 ac_cv_header_stdc=yes
5442else
5443 ac_cv_header_stdc=no
5444fi
5445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5446
5447if test $ac_cv_header_stdc = yes; then
5448 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5450/* end confdefs.h. */
5451#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005452
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005453_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005457else
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005459fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005460rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462fi
5463
5464if test $ac_cv_header_stdc = yes; then
5465 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5467/* end confdefs.h. */
5468#include <stdlib.h>
5469
5470_ACEOF
5471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5472 $EGREP "free" >/dev/null 2>&1; then :
5473
5474else
5475 ac_cv_header_stdc=no
5476fi
5477rm -f conftest*
5478
5479fi
5480
5481if test $ac_cv_header_stdc = yes; then
5482 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5483 if test "$cross_compiling" = yes; then :
5484 :
5485else
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5487/* end confdefs.h. */
5488#include <ctype.h>
5489#include <stdlib.h>
5490#if ((' ' & 0x0FF) == 0x020)
5491# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5492# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5493#else
5494# define ISLOWER(c) \
5495 (('a' <= (c) && (c) <= 'i') \
5496 || ('j' <= (c) && (c) <= 'r') \
5497 || ('s' <= (c) && (c) <= 'z'))
5498# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5499#endif
5500
5501#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5502int
5503main ()
5504{
5505 int i;
5506 for (i = 0; i < 256; i++)
5507 if (XOR (islower (i), ISLOWER (i))
5508 || toupper (i) != TOUPPER (i))
5509 return 2;
5510 return 0;
5511}
5512_ACEOF
5513if ac_fn_c_try_run "$LINENO"; then :
5514
5515else
5516 ac_cv_header_stdc=no
5517fi
5518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5519 conftest.$ac_objext conftest.beam conftest.$ac_ext
5520fi
5521
5522fi
5523fi
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5525$as_echo "$ac_cv_header_stdc" >&6; }
5526if test $ac_cv_header_stdc = yes; then
5527
5528$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5529
5530fi
5531
5532# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5533for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5534 inttypes.h stdint.h unistd.h
5535do :
5536 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5537ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5538"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005539if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 cat >>confdefs.h <<_ACEOF
5541#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5542_ACEOF
5543
5544fi
5545
5546done
5547
5548
5549
5550 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 +02005551if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 MINIX=yes
5553else
5554 MINIX=
5555fi
5556
5557
5558 if test "$MINIX" = yes; then
5559
5560$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5561
5562
5563$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5564
5565
5566$as_echo "#define _MINIX 1" >>confdefs.h
5567
5568 fi
5569
5570
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5572$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005573if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 $as_echo_n "(cached) " >&6
5575else
5576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577/* end confdefs.h. */
5578
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005579# define __EXTENSIONS__ 1
5580 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005581int
5582main ()
5583{
5584
5585 ;
5586 return 0;
5587}
5588_ACEOF
5589if ac_fn_c_try_compile "$LINENO"; then :
5590 ac_cv_safe_to_define___extensions__=yes
5591else
5592 ac_cv_safe_to_define___extensions__=no
5593fi
5594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5595fi
5596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5597$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5598 test $ac_cv_safe_to_define___extensions__ = yes &&
5599 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5600
5601 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5602
5603 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5604
5605 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5606
5607 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5608
5609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610
Xavier de Gaye95750b12016-07-09 11:05:42 +02005611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5612$as_echo_n "checking for the Android API level... " >&6; }
5613cat >> conftest.c <<EOF
5614#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005615android_api = __ANDROID_API__
5616arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005617#else
5618#error not Android
5619#endif
5620EOF
5621
5622if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005623 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5624 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5626$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005627 if test -z "$ANDROID_API_LEVEL"; then
5628 echo 'Fatal: you must define __ANDROID_API__'
5629 exit 1
5630 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005631
5632cat >>confdefs.h <<_ACEOF
5633#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5634_ACEOF
5635
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005636
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5638$as_echo_n "checking for the Android arm ABI... " >&6; }
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5640$as_echo "$_arm_arch" >&6; }
5641 if test "$_arm_arch" = 7; then
5642 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5643 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5644 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005645else
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5647$as_echo "not Android" >&6; }
5648fi
5649rm -f conftest.c conftest.out
5650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651# Check for unsupported systems
5652case $ac_sys_system/$ac_sys_release in
5653atheos*|Linux*/1*)
5654 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5655 echo See README for details.
5656 exit 1;;
5657esac
5658
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5661$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005664if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 withval=$with_suffix;
5666 case $withval in
5667 no) EXEEXT=;;
5668 yes) EXEEXT=.exe;;
5669 *) EXEEXT=$withval;;
5670 esac
5671fi
5672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5674$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676# Test whether we're running on a non-case-sensitive system, in which
5677# case we give a warning if no ext is given
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5680$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681if test ! -d CaseSensitiveTestDir; then
5682mkdir CaseSensitiveTestDir
5683fi
5684
5685if test -d casesensitivetestdir
5686then
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5688$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 BUILDEXEEXT=.exe
5690else
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 BUILDEXEEXT=$EXEEXT
5694fi
5695rmdir CaseSensitiveTestDir
5696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697case $ac_sys_system in
5698hp*|HP*)
5699 case $CC in
5700 cc|*/cc) CC="$CC -Ae";;
5701 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702esac
5703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5706$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707if test -z "$LIBRARY"
5708then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005709 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5712$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# LDLIBRARY is the name of the library to link against (as opposed to the
5715# name of the library into which to insert object files). BLDLIBRARY is also
5716# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5717# is blank as the main program is not linked directly against LDLIBRARY.
5718# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5719# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5720# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5721# DLLLIBRARY is the shared (i.e., DLL) library.
5722#
5723# RUNSHARED is used to run shared python without installed libraries
5724#
5725# INSTSONAME is the name of the shared library that will be use to install
5726# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005727#
5728# LDVERSION is the shared library version number, normally the Python version
5729# with the ABI build flags appended.
5730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731
5732
5733
5734
5735
5736
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738LDLIBRARY="$LIBRARY"
5739BLDLIBRARY='$(LDLIBRARY)'
5740INSTSONAME='$(LDLIBRARY)'
5741DLLLIBRARY=''
5742LDLIBRARYDIR=''
5743RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005744LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
5746# LINKCC is the command that links the python executable -- default is $(CC).
5747# If CXX is set, and if it is needed to link a main function that was
5748# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5749# python might then depend on the C++ runtime
5750# This is altered for AIX in order to build the export list before
5751# linking.
5752
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5754$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755if test -z "$LINKCC"
5756then
5757 LINKCC='$(PURIFY) $(MAINCC)'
5758 case $ac_sys_system in
5759 AIX*)
5760 exp_extra="\"\""
5761 if test $ac_sys_release -ge 5 -o \
5762 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5763 exp_extra="."
5764 fi
5765 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 QNX*)
5767 # qcc must be used because the other compilers do not
5768 # support -N.
5769 LINKCC=qcc;;
5770 esac
5771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5773$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
5775# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5776# make sure we default having it set to "no": this is used by
5777# distutils.unixccompiler to know if it should add --enable-new-dtags
5778# to linker command lines, and failing to detect GNU ld simply results
5779# in the same bahaviour as before.
5780
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5782$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783ac_prog=ld
5784if test "$GCC" = yes; then
5785 ac_prog=`$CC -print-prog-name=ld`
5786fi
5787case `"$ac_prog" -V 2>&1 < /dev/null` in
5788 *GNU*)
5789 GNULD=yes;;
5790 *)
5791 GNULD=no;;
5792esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5794$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5797$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005799if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 enableval=$enable_shared;
5801fi
5802
5803
5804if test -z "$enable_shared"
5805then
5806 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005807 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 enable_shared="yes";;
5809 *)
5810 enable_shared="no";;
5811 esac
5812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5814$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815
Matthias Kloseb9621712010-04-24 17:59:49 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5817$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005819if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005820 enableval=$enable_profiling;
5821fi
5822
5823if test "x$enable_profiling" = xyes; then
5824 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005825 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827/* end confdefs.h. */
5828int main() { return 0; }
5829_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005830if ac_fn_c_try_link "$LINENO"; then :
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005833 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005835rm -f core conftest.err conftest.$ac_objext \
5836 conftest$ac_exeext conftest.$ac_ext
5837 CC="$ac_save_cc"
5838else
5839 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5842$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844if test "x$enable_profiling" = xyes; then
5845 BASECFLAGS="-pg $BASECFLAGS"
5846 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
5848
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5850$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
5852# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5853# library that we build, but we do not want to link against it (we
5854# will find it with a -framework option). For this reason there is an
5855# extra variable BLDLIBRARY against which Python and the extension
5856# modules are linked, BLDLIBRARY. This is normally the same as
5857# LDLIBRARY, but empty for MacOSX framework builds.
5858if test "$enable_framework"
5859then
5860 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005861 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862 BLDLIBRARY=''
5863else
5864 BLDLIBRARY='$(LDLIBRARY)'
5865fi
5866
5867# Other platforms follow
5868if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005869 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870
Matthias Kloseb9621712010-04-24 17:59:49 +00005871$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872
5873 case $ac_sys_system in
5874 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005875 LDLIBRARY='libpython$(LDVERSION).dll.a'
5876 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 ;;
5878 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005879 LDLIBRARY='libpython$(LDVERSION).so'
5880 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005881 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005883 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005884 then
5885 PY3LIBRARY=libpython3.so
5886 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005888 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).so'
5890 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005891 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005893 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005894 then
5895 PY3LIBRARY=libpython3.so
5896 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
5898 hp*|HP*)
5899 case `uname -m` in
5900 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005901 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
5903 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
5906 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005908 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).dylib'
5912 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005915 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005916 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005918 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
5920 esac
5921else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005922 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 case $ac_sys_system in
5924 CYGWIN*)
5925 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
5928 esac
5929fi
5930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005931if test "$cross_compiling" = yes; then
5932 RUNSHARED=
5933fi
5934
Matthias Kloseb9621712010-04-24 17:59:49 +00005935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5936$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005939if test -n "$ac_tool_prefix"; then
5940 for ac_prog in ar aal
5941 do
5942 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5943set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005946if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
5949 if test -n "$AR"; then
5950 ac_cv_prog_AR="$AR" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005959 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 break 2
5962 fi
5963done
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965IFS=$as_save_IFS
5966
5967fi
5968fi
5969AR=$ac_cv_prog_AR
5970if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5972$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973else
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976fi
5977
5978
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005979 test -n "$AR" && break
5980 done
5981fi
5982if test -z "$AR"; then
5983 ac_ct_AR=$AR
5984 for ac_prog in ar aal
5985do
5986 # Extract the first word of "$ac_prog", so it can be a program name with args.
5987set dummy $ac_prog; ac_word=$2
5988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5989$as_echo_n "checking for $ac_word... " >&6; }
5990if ${ac_cv_prog_ac_ct_AR+:} false; then :
5991 $as_echo_n "(cached) " >&6
5992else
5993 if test -n "$ac_ct_AR"; then
5994 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5995else
5996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997for as_dir in $PATH
5998do
5999 IFS=$as_save_IFS
6000 test -z "$as_dir" && as_dir=.
6001 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006003 ac_cv_prog_ac_ct_AR="$ac_prog"
6004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005 break 2
6006 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006008 done
6009IFS=$as_save_IFS
6010
6011fi
6012fi
6013ac_ct_AR=$ac_cv_prog_ac_ct_AR
6014if test -n "$ac_ct_AR"; then
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6016$as_echo "$ac_ct_AR" >&6; }
6017else
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6019$as_echo "no" >&6; }
6020fi
6021
6022
6023 test -n "$ac_ct_AR" && break
6024done
6025
6026 if test "x$ac_ct_AR" = x; then
6027 AR="ar"
6028 else
6029 case $cross_compiling:$ac_tool_warned in
6030yes:)
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6032$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6033ac_tool_warned=yes ;;
6034esac
6035 AR=$ac_ct_AR
6036 fi
6037fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038
6039
6040# tweak ARFLAGS only if the user didn't set it on the command line
6041
6042if test -z "$ARFLAGS"
6043then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006044 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045fi
6046
doko@ubuntu.com58844492012-06-30 18:25:32 +02006047if test -n "$ac_tool_prefix"; then
6048 for ac_prog in readelf
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
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if ${ac_cv_prog_READELF+:} false; then :
6055 $as_echo_n "(cached) " >&6
6056else
6057 if test -n "$READELF"; then
6058 ac_cv_prog_READELF="$READELF" # 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=.
6065 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.com58844492012-06-30 18:25:32 +02006067 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069 break 2
6070 fi
6071done
6072 done
6073IFS=$as_save_IFS
6074
6075fi
6076fi
6077READELF=$ac_cv_prog_READELF
6078if test -n "$READELF"; then
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6080$as_echo "$READELF" >&6; }
6081else
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
6084fi
6085
6086
6087 test -n "$READELF" && break
6088 done
6089fi
6090if test -z "$READELF"; then
6091 ac_ct_READELF=$READELF
6092 for ac_prog in readelf
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_READELF+:} false; then :
6099 $as_echo_n "(cached) " >&6
6100else
6101 if test -n "$ac_ct_READELF"; then
6102 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # 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 Lagerwall1b863eb2012-10-29 17:31:54 +00006110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006111 ac_cv_prog_ac_ct_READELF="$ac_prog"
6112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6113 break 2
6114 fi
6115done
6116 done
6117IFS=$as_save_IFS
6118
6119fi
6120fi
6121ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6122if test -n "$ac_ct_READELF"; then
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6124$as_echo "$ac_ct_READELF" >&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_READELF" && break
6132done
6133
6134 if test "x$ac_ct_READELF" = x; then
6135 READELF=":"
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 READELF=$ac_ct_READELF
6144 fi
6145fi
6146
6147if test "$cross_compiling" = yes; then
6148 case "$READELF" in
6149 readelf|:)
6150 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6151 ;;
6152 esac
6153fi
6154
6155
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006158hp*|HP*)
6159 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160 if test -z "$INSTALL"
6161 then
6162 INSTALL="${srcdir}/install-sh -c"
6163 fi
6164esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165# Find a good install program. We prefer a C program (faster),
6166# so one script is as good as another. But avoid the broken or
6167# incompatible versions:
6168# SysV /etc/install, /usr/sbin/install
6169# SunOS /usr/etc/install
6170# IRIX /sbin/install
6171# AIX /bin/install
6172# AmigaOS /C/install, which installs bootblocks on floppy discs
6173# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6174# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6175# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6176# OS/2's system install, which has a completely different semantic
6177# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006178# Reject install programs that cannot install multiple files.
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6180$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006182if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184else
6185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188 IFS=$as_save_IFS
6189 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 # Account for people who put trailing slashes in PATH elements.
6191case $as_dir/ in #((
6192 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 /usr/ucb/* ) ;;
6196 *)
6197 # OSF1 and SCO ODT 3.0 have their own names for install.
6198 # Don't use installbsd from OSF since it installs stuff as root
6199 # by default.
6200 for ac_prog in ginstall scoinst install; do
6201 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006202 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203 if test $ac_prog = install &&
6204 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6205 # AIX install. It has an incompatible calling convention.
6206 :
6207 elif test $ac_prog = install &&
6208 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6209 # program-specific install script used by HP pwplus--don't use.
6210 :
6211 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 rm -rf conftest.one conftest.two conftest.dir
6213 echo one > conftest.one
6214 echo two > conftest.two
6215 mkdir conftest.dir
6216 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6217 test -s conftest.one && test -s conftest.two &&
6218 test -s conftest.dir/conftest.one &&
6219 test -s conftest.dir/conftest.two
6220 then
6221 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6222 break 3
6223 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224 fi
6225 fi
6226 done
6227 done
6228 ;;
6229esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006230
6231 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232IFS=$as_save_IFS
6233
Matthias Kloseb9621712010-04-24 17:59:49 +00006234rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235
6236fi
6237 if test "${ac_cv_path_install+set}" = set; then
6238 INSTALL=$ac_cv_path_install
6239 else
6240 # As a last resort, use the slow shell script. Don't cache a
6241 # value for INSTALL within a source directory, because that will
6242 # break other packages using the cache if that directory is
6243 # removed, or if the value is a relative name.
6244 INSTALL=$ac_install_sh
6245 fi
6246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6248$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6251# It thinks the first close brace ends the variable substitution.
6252test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6253
6254test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6255
6256test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6257
Matthias Klose93a0ef12012-03-15 18:08:34 +01006258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6259$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6260if test -z "$MKDIR_P"; then
6261 if ${ac_cv_path_mkdir+:} false; then :
6262 $as_echo_n "(cached) " >&6
6263else
6264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6266do
6267 IFS=$as_save_IFS
6268 test -z "$as_dir" && as_dir=.
6269 for ac_prog in mkdir gmkdir; do
6270 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006271 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006272 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6273 'mkdir (GNU coreutils) '* | \
6274 'mkdir (coreutils) '* | \
6275 'mkdir (fileutils) '4.1*)
6276 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6277 break 3;;
6278 esac
6279 done
6280 done
6281 done
6282IFS=$as_save_IFS
6283
6284fi
6285
6286 test -d ./--version && rmdir ./--version
6287 if test "${ac_cv_path_mkdir+set}" = set; then
6288 MKDIR_P="$ac_cv_path_mkdir -p"
6289 else
6290 # As a last resort, use the slow shell script. Don't cache a
6291 # value for MKDIR_P within a source directory, because that will
6292 # break other packages using the cache if that directory is
6293 # removed, or if the value is a relative name.
6294 MKDIR_P="$ac_install_sh -d"
6295 fi
6296fi
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6298$as_echo "$MKDIR_P" >&6; }
6299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
6301# Not every filesystem supports hard links
6302
6303if test -z "$LN" ; then
6304 case $ac_sys_system in
6305 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306 *) LN=ln;;
6307 esac
6308fi
6309
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006310# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006311
6312ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006313
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6316$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317
6318# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006319if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 withval=$with_pydebug;
6321if test "$withval" != no
6322then
6323
Matthias Kloseb9621712010-04-24 17:59:49 +00006324$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
Matthias Kloseb9621712010-04-24 17:59:49 +00006326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6327$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006329 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006330else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332fi
6333else
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336fi
6337
6338
T. Woutersddbfa2c2017-05-23 01:30:49 +02006339# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6340# the ABI. This allows enabling assertions without changing the ABI.
6341assertions='false'
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6343$as_echo_n "checking for --with-assertions... " >&6; }
6344
6345# Check whether --with-assertions was given.
6346if test "${with_assertions+set}" = set; then :
6347 withval=$with_assertions;
6348if test "$withval" != no
6349then
6350 assertions='true'
6351fi
6352fi
6353
6354if test "$assertions" = 'true'; then
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6356$as_echo "yes" >&6; }
6357elif test "$Py_DEBUG" = 'true'; then
6358 assertions='true'
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6360$as_echo "implied by --with-pydebug" >&6; }
6361else
6362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363$as_echo "no" >&6; }
6364fi
6365
Brett Cannon63d98bc2016-09-06 17:12:40 -07006366# Enable optimization flags
6367
6368
6369Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6371$as_echo_n "checking for --enable-optimizations... " >&6; }
6372# Check whether --enable-optimizations was given.
6373if test "${enable_optimizations+set}" = set; then :
6374 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006375if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006376then
6377 Py_OPT='true'
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6379$as_echo "yes" >&6; };
6380else
6381 Py_OPT='false'
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383$as_echo "no" >&6; };
6384fi
6385else
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
6390if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006391 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6392 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006393 # 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 +00006394 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006395 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006396 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006397 DEF_MAKE_RULE="build_all"
6398else
6399 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006400 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006401 DEF_MAKE_RULE="all"
6402fi
6403
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006404# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6406$as_echo_n "checking for --with-lto... " >&6; }
6407
6408# Check whether --with-lto was given.
6409if test "${with_lto+set}" = set; then :
6410 withval=$with_lto;
6411if test "$withval" != no
6412then
6413 Py_LTO='true'
6414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6415$as_echo "yes" >&6; };
6416else
6417 Py_LTO='false'
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6419$as_echo "no" >&6; };
6420fi
6421else
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426if test "$Py_LTO" = 'true' ; then
6427 case $CC in
6428 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006429 case $ac_sys_system in
6430 Darwin*)
6431 # Any changes made here should be reflected in the GCC+Darwin case below
6432 LTOFLAGS="-flto -Wl,-export_dynamic"
6433 ;;
6434 *)
6435 LTOFLAGS="-flto"
6436 ;;
6437 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006438 ;;
6439 *gcc*)
6440 case $ac_sys_system in
6441 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006442 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006443 ;;
6444 *)
6445 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6446 ;;
6447 esac
6448 ;;
6449 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006450 CFLAGS="$CFLAGS $LTOFLAGS"
6451 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006452fi
6453
Brett Cannon7188a3e2015-09-18 15:13:44 -07006454# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006455
6456
6457
6458
6459
Gregory P. Smith799520c2016-09-07 16:10:00 -07006460# Make this work on systems where llvm tools are not installed with their
6461# normal names in the default $PATH (ie: Ubuntu). They exist under the
6462# non-suffixed name in their versioned llvm directory.
6463llvm_bin_dir=''
6464llvm_path="${PATH}"
6465if test "${CC}" = "clang"
6466then
6467 clang_bin=`which clang`
6468 # Some systems install clang elsewhere as a symlink to the real path
6469 # which is where the related llvm tools are located.
6470 if test -L "${clang_bin}"
6471 then
6472 clang_dir=`dirname "${clang_bin}"`
6473 clang_bin=`readlink "${clang_bin}"`
6474 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6475 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6476 fi
6477fi
Zachary Ware5af85642015-12-21 12:09:17 -06006478
Gregory P. Smith799520c2016-09-07 16:10:00 -07006479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6480$as_echo_n "checking target system type... " >&6; }
6481if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006482 $as_echo_n "(cached) " >&6
6483else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006484 if test "x$target_alias" = x; then
6485 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006486else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006487 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6488 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6489fi
6490
6491fi
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6493$as_echo "$ac_cv_target" >&6; }
6494case $ac_cv_target in
6495*-*-*) ;;
6496*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6497esac
6498target=$ac_cv_target
6499ac_save_IFS=$IFS; IFS='-'
6500set x $ac_cv_target
6501shift
6502target_cpu=$1
6503target_vendor=$2
6504shift; shift
6505# Remember, the first character of IFS is used to create $*,
6506# except with old shells:
6507target_os=$*
6508IFS=$ac_save_IFS
6509case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6510
6511
6512# The aliases save the names the user supplied, while $host etc.
6513# will get canonicalized.
6514test -n "$target_alias" &&
6515 test "$program_prefix$program_suffix$program_transform_name" = \
6516 NONENONEs,x,x, &&
6517 program_prefix=${target_alias}-
6518# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6519set dummy $target_alias-llvm-profdata; ac_word=$2
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6521$as_echo_n "checking for $ac_word... " >&6; }
6522if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6523 $as_echo_n "(cached) " >&6
6524else
6525 case $LLVM_PROFDATA in
6526 [\\/]* | ?:[\\/]*)
6527 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6528 ;;
6529 *)
6530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6531for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006532do
6533 IFS=$as_save_IFS
6534 test -z "$as_dir" && as_dir=.
6535 for ac_exec_ext in '' $ac_executable_extensions; do
6536 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006537 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6539 break 2
6540 fi
6541done
6542 done
6543IFS=$as_save_IFS
6544
Gregory P. Smith799520c2016-09-07 16:10:00 -07006545 ;;
6546esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006547fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006548LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6549if test -n "$LLVM_PROFDATA"; then
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6551$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006552else
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6554$as_echo "no" >&6; }
6555fi
6556
6557
Gregory P. Smith799520c2016-09-07 16:10:00 -07006558if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6559 if test "$build" = "$target"; then
6560 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6561 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6562set dummy llvm-profdata; ac_word=$2
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6564$as_echo_n "checking for $ac_word... " >&6; }
6565if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6566 $as_echo_n "(cached) " >&6
6567else
6568 case $ac_pt_LLVM_PROFDATA in
6569 [\\/]* | ?:[\\/]*)
6570 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6571 ;;
6572 *)
6573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6574for as_dir in ${llvm_path}
6575do
6576 IFS=$as_save_IFS
6577 test -z "$as_dir" && as_dir=.
6578 for ac_exec_ext in '' $ac_executable_extensions; do
6579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6580 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6582 break 2
6583 fi
6584done
6585 done
6586IFS=$as_save_IFS
6587
6588 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6589 ;;
6590esac
6591fi
6592ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6593if test -n "$ac_pt_LLVM_PROFDATA"; then
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6595$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6596else
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6598$as_echo "no" >&6; }
6599fi
6600
6601 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6602 else
6603 LLVM_PROFDATA="''"
6604 fi
6605else
6606 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6607fi
6608
6609
6610if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6611then
6612 LLVM_PROF_FOUND="found"
6613else
6614 LLVM_PROF_FOUND="not-found"
6615fi
6616if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6617then
6618 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6619 if test -n "${found_llvm_profdata}"
6620 then
6621 # llvm-profdata isn't directly in $PATH in some cases.
6622 # https://apple.stackexchange.com/questions/197053/
6623 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6624 LLVM_PROF_FOUND=found
6625 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6626$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6627 fi
6628fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006629LLVM_PROF_ERR=no
6630case $CC in
6631 *clang*)
6632 # Any changes made here should be reflected in the GCC+Darwin case below
6633 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6634 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006636 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6637 if test $LLVM_PROF_FOUND = not-found
6638 then
6639 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006640 if test "${REQUIRE_PGO}" = "yes"
6641 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006642 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 -07006643 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006644 fi
6645 ;;
6646 *gcc*)
6647 case $ac_sys_system in
6648 Darwin*)
6649 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6650 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006651 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006652 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006653 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006654 then
6655 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006656 if test "${REQUIRE_PGO}" = "yes"
6657 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006658 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 -07006659 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006660 fi
6661 ;;
6662 *)
6663 PGO_PROF_GEN_FLAG="-fprofile-generate"
6664 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6665 LLVM_PROF_MERGER="true"
6666 LLVM_PROF_FILE=""
6667 ;;
6668 esac
6669 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006670 *icc*)
6671 PGO_PROF_GEN_FLAG="-prof-gen"
6672 PGO_PROF_USE_FLAG="-prof-use"
6673 LLVM_PROF_MERGER="true"
6674 LLVM_PROF_FILE=""
6675 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006676esac
6677
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6679# merged with this chunk of code?
6680
6681# Optimizer/debugger flags
6682# ------------------------
6683# (The following bit of code is complicated enough - please keep things
6684# indented properly. Just pretend you're editing Python code. ;-)
6685
6686# There are two parallel sets of case statements below, one that checks to
6687# see if OPT was set and one that does BASECFLAGS setting based upon
6688# compiler and platform. BASECFLAGS tweaks need to be made even if the
6689# user set OPT.
6690
6691# tweak OPT based on compiler and platform, only if the user didn't set
6692# it on the command line
6693
Victor Stinner9ed34a82017-05-02 22:35:58 +02006694
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006695if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696then
6697 case $GCC in
6698 yes)
6699 if test "$CC" != 'g++' ; then
6700 STRICT_PROTO="-Wstrict-prototypes"
6701 fi
6702 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6703 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6704 WRAP="-fwrapv"
6705 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006706
Stefan Krahaf04ff22011-12-08 22:20:31 +01006707 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006708 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006709 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006710 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006711 *)
6712 if $CC --version 2>&1 | grep -q clang
6713 then
6714 cc_is_clang=1
6715 else
6716 cc_is_clang=
6717 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006718 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006719
Victor Stinner35f3d242017-04-21 12:35:24 +02006720 if test -n "${cc_is_clang}"
6721 then
6722 # Clang also needs -fwrapv
6723 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006724 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6725 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006726 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006727 fi
6728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729 case $ac_cv_prog_cc_g in
6730 yes)
6731 if test "$Py_DEBUG" = 'true' ; then
6732 # Optimization messes up debuggers, so turn it off for
6733 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006734 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006735 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006736 else
Victor Stinner28205b22017-04-21 11:24:34 +02006737 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006738 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739 else
Victor Stinner28205b22017-04-21 11:24:34 +02006740 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741 fi
6742 ;;
6743 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006744 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745 ;;
6746 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006747
Victor Stinner826f83f2017-04-28 15:07:10 +02006748 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750 case $ac_sys_system in
6751 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6752 ;;
6753 esac
6754 ;;
6755
6756 *)
6757 OPT="-O"
6758 ;;
6759 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
6761
6762
6763
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006765# The -arch flags for universal builds on OSX
6766UNIVERSAL_ARCH_FLAGS=
6767
6768
6769# tweak BASECFLAGS based on compiler and platform
6770case $GCC in
6771yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006772 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006773
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6775$as_echo_n "checking for -Wextra... " >&6; }
6776 ac_save_cc="$CC"
6777 CC="$CC -Wextra -Werror"
6778 if ${ac_cv_extra_warnings+:} false; then :
6779 $as_echo_n "(cached) " >&6
6780else
6781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6782/* end confdefs.h. */
6783
6784
6785int
6786main ()
6787{
6788
6789 ;
6790 return 0;
6791}
6792
6793_ACEOF
6794if ac_fn_c_try_compile "$LINENO"; then :
6795
6796 ac_cv_extra_warnings=yes
6797
6798else
6799
6800 ac_cv_extra_warnings=no
6801
6802fi
6803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6804fi
6805
6806 CC="$ac_save_cc"
6807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6808$as_echo "$ac_cv_extra_warnings" >&6; }
6809
6810 if test $ac_cv_extra_warnings = yes
6811 then
6812 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6813 fi
6814
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006815 # Python doesn't violate C99 aliasing rules, but older versions of
6816 # GCC produce warnings for legal Python code. Enable
6817 # -fno-strict-aliasing on versions of GCC that support but produce
6818 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6820$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821 ac_save_cc="$CC"
6822 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006823 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006824 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006829
Matthias Kloseb159a552010-04-25 21:00:44 +00006830
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006831int
6832main ()
6833{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006834
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006835 ;
6836 return 0;
6837}
Matthias Kloseb159a552010-04-25 21:00:44 +00006838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006840if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006841
6842 CC="$ac_save_cc -fstrict-aliasing"
6843 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006845/* end confdefs.h. */
6846
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006847 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006848int
6849main ()
6850{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006851double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006852 ;
6853 return 0;
6854}
Matthias Kloseb159a552010-04-25 21:00:44 +00006855
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006857if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006858
6859 ac_cv_no_strict_aliasing=no
6860
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861else
Matthias Kloseb159a552010-04-25 21:00:44 +00006862
6863 ac_cv_no_strict_aliasing=yes
6864
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006865fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006867
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006868else
Matthias Kloseb159a552010-04-25 21:00:44 +00006869
6870 ac_cv_no_strict_aliasing=no
6871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006874fi
6875
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006876 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6879$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006880 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881 then
6882 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6883 fi
6884
Zachary Ware5af85642015-12-21 12:09:17 -06006885 # ICC doesn't recognize the option, but only emits a warning
6886 ## XXX does it emit an unused result warning and can it be disabled?
6887 case "$CC" in
6888 *icc*)
6889 ac_cv_disable_unused_result_warning=no
6890 ;;
6891 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6893$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6894 ac_save_cc="$CC"
6895 CC="$CC -Wunused-result -Werror"
6896 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006897 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006898 $as_echo_n "(cached) " >&6
6899else
6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6901/* end confdefs.h. */
6902
6903
6904int
6905main ()
6906{
6907
6908 ;
6909 return 0;
6910}
6911
6912_ACEOF
6913if ac_fn_c_try_compile "$LINENO"; then :
6914
6915 ac_cv_disable_unused_result_warning=yes
6916
6917else
6918
6919 ac_cv_disable_unused_result_warning=no
6920
6921fi
6922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6923fi
6924
6925 CFLAGS="$save_CFLAGS"
6926 CC="$ac_save_cc"
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6928$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006929 ;;
6930 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006931
6932 if test $ac_cv_disable_unused_result_warning = yes
6933 then
6934 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006935 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6936 fi
6937
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6939$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6940 ac_save_cc="$CC"
6941 CC="$CC -Wunused-parameter -Werror"
6942 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6943 $as_echo_n "(cached) " >&6
6944else
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946/* end confdefs.h. */
6947
6948
6949int
6950main ()
6951{
6952
6953 ;
6954 return 0;
6955}
6956
6957_ACEOF
6958if ac_fn_c_try_compile "$LINENO"; then :
6959
6960 ac_cv_disable_unused_parameter_warning=yes
6961
6962else
6963
6964 ac_cv_disable_unused_parameter_warning=no
6965
6966fi
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6968fi
6969
6970 CC="$ac_save_cc"
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6972$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6973
6974 if test $ac_cv_disable_unused_parameter_warning = yes
6975 then
6976 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6977 fi
6978
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6980$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6981 ac_save_cc="$CC"
6982 CC="$CC -Wmissing-field-initializers -Werror"
6983 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6984 $as_echo_n "(cached) " >&6
6985else
6986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6987/* end confdefs.h. */
6988
6989
6990int
6991main ()
6992{
6993
6994 ;
6995 return 0;
6996}
6997
6998_ACEOF
6999if ac_fn_c_try_compile "$LINENO"; then :
7000
7001 ac_cv_disable_missing_field_initializers=yes
7002
7003else
7004
7005 ac_cv_disable_missing_field_initializers=no
7006
7007fi
7008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7009fi
7010
7011 CC="$ac_save_cc"
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7013$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7014
7015 if test $ac_cv_disable_missing_field_initializers = yes
7016 then
7017 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007018 fi
7019
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7021$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7022 ac_save_cc="$CC"
7023 CC="$CC -Wsign-compare"
7024 save_CFLAGS="$CFLAGS"
7025 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7026 $as_echo_n "(cached) " >&6
7027else
7028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7029/* end confdefs.h. */
7030
7031
7032int
7033main ()
7034{
7035
7036 ;
7037 return 0;
7038}
7039
7040_ACEOF
7041if ac_fn_c_try_compile "$LINENO"; then :
7042
7043 ac_cv_enable_sign_compare_warning=yes
7044
7045else
7046
7047 ac_cv_enable_sign_compare_warning=no
7048
7049fi
7050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7051fi
7052
7053 CFLAGS="$save_CFLAGS"
7054 CC="$ac_save_cc"
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7056$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7057
7058 if test $ac_cv_enable_sign_compare_warning = yes
7059 then
7060 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7061 fi
7062
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7064$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7065 ac_save_cc="$CC"
7066 CC="$CC -Wunreachable-code"
7067 save_CFLAGS="$CFLAGS"
7068 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7069 $as_echo_n "(cached) " >&6
7070else
7071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7072/* end confdefs.h. */
7073
7074
7075int
7076main ()
7077{
7078
7079 ;
7080 return 0;
7081}
7082
7083_ACEOF
7084if ac_fn_c_try_compile "$LINENO"; then :
7085
7086 ac_cv_enable_unreachable_code_warning=yes
7087
7088else
7089
7090 ac_cv_enable_unreachable_code_warning=no
7091
7092fi
7093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7094fi
7095
7096 CFLAGS="$save_CFLAGS"
7097 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007098
7099 # Don't enable unreachable code warning in debug mode, since it usually
7100 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007101 # Issue #24324: Unfortunately, the unreachable code warning does not work
7102 # correctly on gcc and has been silently removed from the compiler.
7103 # It is supported on clang but on OS X systems gcc may be an alias
7104 # for clang. Try to determine if the compiler is not really gcc and,
7105 # if so, only then enable the warning.
7106 if test $ac_cv_enable_unreachable_code_warning = yes && \
7107 test "$Py_DEBUG" != "true" && \
7108 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007109 then
7110 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007111 else
7112 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007113 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7115$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007116
Victor Stinner193ee0a2017-02-06 14:24:00 +01007117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7118$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7119 ac_save_cc="$CC"
7120 CC="$CC -Werror=implicit-function-declaration"
7121 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7122 $as_echo_n "(cached) " >&6
7123else
7124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7125/* end confdefs.h. */
7126
7127
7128int
7129main ()
7130{
7131
7132 ;
7133 return 0;
7134}
7135
7136_ACEOF
7137if ac_fn_c_try_compile "$LINENO"; then :
7138
7139 ac_cv_enable_implicit_function_declaration_error=yes
7140
7141else
7142
7143 ac_cv_enable_implicit_function_declaration_error=no
7144
7145fi
7146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7147fi
7148
7149 CC="$ac_save_cc"
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7151$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7152
7153 if test $ac_cv_enable_implicit_function_declaration_error = yes
7154 then
7155 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7156 fi
7157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007158 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7159 # support. Without this, treatment of subnormals doesn't follow
7160 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007161 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007162 alpha*)
7163 BASECFLAGS="$BASECFLAGS -mieee"
7164 ;;
7165 esac
7166
7167 case $ac_sys_system in
7168 SCO_SV*)
7169 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7170 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007171
7172 # is there any other compiler on Darwin besides gcc?
7173 Darwin*)
7174 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7175 # used to be here, but non-Apple gcc doesn't accept them.
7176 if test "${CC}" = gcc
7177 then
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007179$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007180 case "${UNIVERSALSDK}" in
7181 */MacOSX10.4u.sdk)
7182 # Build using 10.4 SDK, force usage of gcc when the
7183 # compiler is gcc, otherwise the user will get very
7184 # confusing error messages when building on OSX 10.6
7185 CC=gcc-4.0
7186 CPP=cpp-4.0
7187 ;;
7188 esac
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007190$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007191 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007192
Ned Deily87adb6e2013-10-18 21:09:56 -07007193 if test "${enable_universalsdk}"
7194 then
7195 case "$UNIVERSAL_ARCHS" in
7196 32-bit)
7197 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7198 LIPO_32BIT_FLAGS=""
7199 ARCH_RUN_32BIT=""
7200 ;;
7201 64-bit)
7202 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7203 LIPO_32BIT_FLAGS=""
7204 ARCH_RUN_32BIT="true"
7205 ;;
7206 all)
7207 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7208 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7209 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7210 ;;
7211 intel)
7212 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7213 LIPO_32BIT_FLAGS="-extract i386"
7214 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7215 ;;
7216 intel-32)
7217 UNIVERSAL_ARCH_FLAGS="-arch i386"
7218 LIPO_32BIT_FLAGS=""
7219 ARCH_RUN_32BIT=""
7220 ;;
7221 3-way)
7222 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7223 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7224 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7225 ;;
7226 *)
7227 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7228 ;;
7229 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007230
Ned Deily87adb6e2013-10-18 21:09:56 -07007231 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7232 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7233 if test "${UNIVERSALSDK}" != "/"
7234 then
7235 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7236 fi
7237 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007238
Ned Deily87adb6e2013-10-18 21:09:56 -07007239 # Calculate an appropriate deployment target for this build:
7240 # The deployment target value is used explicitly to enable certain
7241 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007242 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007243 # component of the string returned by distutils.get_platform().
7244 #
7245 # Use the value from:
7246 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7247 # 2. the operating system version of the build machine if >= 10.6
7248 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7249 # below to pick either 10.3, 10.4, or 10.5 as the target.
7250 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251
Ned Deily87adb6e2013-10-18 21:09:56 -07007252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7253$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007254 cur_target_major=`sw_vers -productVersion | \
7255 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7256 cur_target_minor=`sw_vers -productVersion | \
7257 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7258 cur_target="${cur_target_major}.${cur_target_minor}"
7259 if test ${cur_target_major} -eq 10 && \
7260 test ${cur_target_minor} -ge 3 && \
7261 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007262 then
Ned Deily36820b62014-06-25 13:44:22 -07007263 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007264 cur_target=10.3
7265 if test ${enable_universalsdk}
7266 then
7267 case "$UNIVERSAL_ARCHS" in
7268 all|3-way|intel|64-bit)
7269 # These configurations were first supported in 10.5
7270 cur_target='10.5'
7271 ;;
7272 esac
7273 else
7274 if test `/usr/bin/arch` = "i386"
7275 then
7276 # 10.4 was the first release to support Intel archs
7277 cur_target="10.4"
7278 fi
7279 fi
7280 fi
7281 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007282
Ned Deily87adb6e2013-10-18 21:09:56 -07007283 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7284 # environment with a value that is the same as what we'll use
7285 # in the Makefile to ensure that we'll get the same compiler
7286 # environment during configure and build time.
7287 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7288 export MACOSX_DEPLOYMENT_TARGET
7289 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7291$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007292
Ned Deily87adb6e2013-10-18 21:09:56 -07007293 # end of Darwin* tests
7294 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295 esac
7296 ;;
7297
7298*)
7299 case $ac_sys_system in
7300 OpenUNIX*|UnixWare*)
7301 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7302 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007303 SCO_SV*)
7304 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7305 ;;
7306 esac
7307 ;;
7308esac
7309
Zachary Ware5af85642015-12-21 12:09:17 -06007310# ICC needs -fp-model strict or floats behave badly
7311case "$CC" in
7312*icc*)
7313 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7314 ;;
7315esac
7316
T. Woutersddbfa2c2017-05-23 01:30:49 +02007317if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318 :
7319else
7320 OPT="-DNDEBUG $OPT"
7321fi
7322
7323if test "$ac_arch_flags"
7324then
7325 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7326fi
7327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328# On some compilers, pthreads are available without further options
7329# (e.g. MacOS X). On some of these systems, the compiler will not
7330# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7331# So we have to see first whether pthreads are available without
7332# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7334$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007335if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337else
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339 ac_cv_pthread_is_default=no
7340else
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342/* end confdefs.h. */
7343
Stefan Krah7dba5942012-11-22 22:49:11 +01007344#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345#include <pthread.h>
7346
7347void* routine(void* p){return NULL;}
7348
7349int main(){
7350 pthread_t p;
7351 if(pthread_create(&p,NULL,routine,NULL)!=0)
7352 return 1;
7353 (void)pthread_detach(p);
7354 return 0;
7355}
7356
7357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007358if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007359
7360 ac_cv_pthread_is_default=yes
7361 ac_cv_kthread=no
7362 ac_cv_pthread=no
7363
7364else
Matthias Kloseb9621712010-04-24 17:59:49 +00007365 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7368 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369fi
7370
7371
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372fi
7373
Matthias Kloseb9621712010-04-24 17:59:49 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7375$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376
7377
7378if test $ac_cv_pthread_is_default = yes
7379then
7380 ac_cv_kpthread=no
7381else
7382# -Kpthread, if available, provides the right #defines
7383# and linker options to make pthread_create available
7384# Some compilers won't report that they do not support -Kpthread,
7385# so we need to run a program to see whether it really made the
7386# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7388$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007389if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391else
7392 ac_save_cc="$CC"
7393CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007394if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395 ac_cv_kpthread=no
7396else
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398/* end confdefs.h. */
7399
Stefan Krah7dba5942012-11-22 22:49:11 +01007400#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401#include <pthread.h>
7402
7403void* routine(void* p){return NULL;}
7404
7405int main(){
7406 pthread_t p;
7407 if(pthread_create(&p,NULL,routine,NULL)!=0)
7408 return 1;
7409 (void)pthread_detach(p);
7410 return 0;
7411}
7412
7413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007414if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415 ac_cv_kpthread=yes
7416else
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7420 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421fi
7422
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423CC="$ac_save_cc"
7424fi
7425
Matthias Kloseb9621712010-04-24 17:59:49 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7427$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428fi
7429
7430if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7431then
7432# -Kthread, if available, provides the right #defines
7433# and linker options to make pthread_create available
7434# Some compilers won't report that they do not support -Kthread,
7435# so we need to run a program to see whether it really made the
7436# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7438$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007439if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007440 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441else
7442 ac_save_cc="$CC"
7443CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007444if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445 ac_cv_kthread=no
7446else
Matthias Kloseb9621712010-04-24 17:59:49 +00007447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448/* end confdefs.h. */
7449
Stefan Krah7dba5942012-11-22 22:49:11 +01007450#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451#include <pthread.h>
7452
7453void* routine(void* p){return NULL;}
7454
7455int main(){
7456 pthread_t p;
7457 if(pthread_create(&p,NULL,routine,NULL)!=0)
7458 return 1;
7459 (void)pthread_detach(p);
7460 return 0;
7461}
7462
7463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007464if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465 ac_cv_kthread=yes
7466else
Matthias Kloseb9621712010-04-24 17:59:49 +00007467 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471fi
7472
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473CC="$ac_save_cc"
7474fi
7475
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7477$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478fi
7479
7480if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7481then
7482# -pthread, if available, provides the right #defines
7483# and linker options to make pthread_create available
7484# Some compilers won't report that they do not support -pthread,
7485# so we need to run a program to see whether it really made the
7486# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7488$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007489if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491else
7492 ac_save_cc="$CC"
7493CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007494if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495 ac_cv_pthread=no
7496else
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498/* end confdefs.h. */
7499
Stefan Krah7dba5942012-11-22 22:49:11 +01007500#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501#include <pthread.h>
7502
7503void* routine(void* p){return NULL;}
7504
7505int main(){
7506 pthread_t p;
7507 if(pthread_create(&p,NULL,routine,NULL)!=0)
7508 return 1;
7509 (void)pthread_detach(p);
7510 return 0;
7511}
7512
7513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007514if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007515 ac_cv_pthread=yes
7516else
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7520 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521fi
7522
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523CC="$ac_save_cc"
7524fi
7525
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7527$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528fi
7529
7530# If we have set a CC compiler flag for thread support then
7531# check if it works for CXX, too.
7532ac_cv_cxx_thread=no
7533if test ! -z "$CXX"
7534then
Matthias Kloseb9621712010-04-24 17:59:49 +00007535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7536$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537ac_save_cxx="$CXX"
7538
7539if test "$ac_cv_kpthread" = "yes"
7540then
7541 CXX="$CXX -Kpthread"
7542 ac_cv_cxx_thread=yes
7543elif test "$ac_cv_kthread" = "yes"
7544then
7545 CXX="$CXX -Kthread"
7546 ac_cv_cxx_thread=yes
7547elif test "$ac_cv_pthread" = "yes"
7548then
7549 CXX="$CXX -pthread"
7550 ac_cv_cxx_thread=yes
7551fi
7552
7553if test $ac_cv_cxx_thread = yes
7554then
7555 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7556 $CXX -c conftest.$ac_ext 2>&5
7557 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7558 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7559 then
7560 ac_cv_cxx_thread=yes
7561 else
7562 ac_cv_cxx_thread=no
7563 fi
7564 rm -fr conftest*
7565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7567$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568fi
7569CXX="$ac_save_cxx"
7570
7571
7572# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7574$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007575if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007577else
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579/* end confdefs.h. */
7580#include <stdlib.h>
7581#include <stdarg.h>
7582#include <string.h>
7583#include <float.h>
7584
7585int
7586main ()
7587{
7588
7589 ;
7590 return 0;
7591}
7592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007593if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594 ac_cv_header_stdc=yes
7595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7599
7600if test $ac_cv_header_stdc = yes; then
7601 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603/* end confdefs.h. */
7604#include <string.h>
7605
7606_ACEOF
7607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 $EGREP "memchr" >/dev/null 2>&1; then :
7609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610else
7611 ac_cv_header_stdc=no
7612fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007613rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614
7615fi
7616
7617if test $ac_cv_header_stdc = yes; then
7618 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620/* end confdefs.h. */
7621#include <stdlib.h>
7622
7623_ACEOF
7624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 $EGREP "free" >/dev/null 2>&1; then :
7626
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007627else
7628 ac_cv_header_stdc=no
7629fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007630rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631
7632fi
7633
7634if test $ac_cv_header_stdc = yes; then
7635 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637 :
7638else
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640/* end confdefs.h. */
7641#include <ctype.h>
7642#include <stdlib.h>
7643#if ((' ' & 0x0FF) == 0x020)
7644# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7645# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7646#else
7647# define ISLOWER(c) \
7648 (('a' <= (c) && (c) <= 'i') \
7649 || ('j' <= (c) && (c) <= 'r') \
7650 || ('s' <= (c) && (c) <= 'z'))
7651# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7652#endif
7653
7654#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7655int
7656main ()
7657{
7658 int i;
7659 for (i = 0; i < 256; i++)
7660 if (XOR (islower (i), ISLOWER (i))
7661 || toupper (i) != TOUPPER (i))
7662 return 2;
7663 return 0;
7664}
7665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007666if ac_fn_c_try_run "$LINENO"; then :
7667
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668else
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7672 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673fi
7674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675fi
7676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7678$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679if test $ac_cv_header_stdc = yes; then
7680
Matthias Kloseb9621712010-04-24 17:59:49 +00007681$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682
7683fi
7684
stratakise768c862018-01-23 16:11:24 +01007685for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007686fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007687ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007688sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007689unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007690poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007691sys/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 +01007692sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007693sys/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 +01007694sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007695sys/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 -07007696libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007697linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007698sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007699do :
7700 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7701ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007702if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007703 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007704#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007705_ACEOF
7706
7707fi
7708
Guido van Rossum627b2d71993-12-24 10:39:16 +00007709done
7710
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007711ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007712for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7715$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007716if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007720/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007721#include <sys/types.h>
7722#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007723
Martin v. Löwis11437992002-04-12 09:54:03 +00007724int
7725main ()
7726{
7727if ((DIR *) 0)
7728return 0;
7729 ;
7730 return 0;
7731}
7732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007735else
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740eval ac_res=\$$as_ac_Header
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7742$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007743if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007745#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007746_ACEOF
7747
7748ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007749fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007751done
7752# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7753if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7755$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007756if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007758else
Martin v. Löwis11437992002-04-12 09:54:03 +00007759 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763/* Override any GCC internal prototype to avoid an error.
7764 Use char because int might match the return type of a GCC
7765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007766#ifdef __cplusplus
7767extern "C"
7768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007769char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007770int
7771main ()
7772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ;
7775 return 0;
7776}
7777_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778for ac_lib in '' dir; do
7779 if test -z "$ac_lib"; then
7780 ac_res="none required"
7781 else
7782 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007783 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007788rm -f core conftest.err conftest.$ac_objext \
7789 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007790 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793done
Victor Stinnere0be4232011-10-25 13:06:09 +02007794if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796else
7797 ac_cv_search_opendir=no
7798fi
7799rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007800LIBS=$ac_func_search_save_LIBS
7801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7803$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007805if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007807
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007809
Michael W. Hudson54241132001-12-07 15:38:26 +00007810else
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7812$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007813if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007815else
7816 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820/* Override any GCC internal prototype to avoid an error.
7821 Use char because int might match the return type of a GCC
7822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007823#ifdef __cplusplus
7824extern "C"
7825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007826char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007827int
7828main ()
7829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ;
7832 return 0;
7833}
7834_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835for ac_lib in '' x; do
7836 if test -z "$ac_lib"; then
7837 ac_res="none required"
7838 else
7839 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007840 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845rm -f core conftest.err conftest.$ac_objext \
7846 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007847 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850done
Victor Stinnere0be4232011-10-25 13:06:09 +02007851if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853else
7854 ac_cv_search_opendir=no
7855fi
7856rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007857LIBS=$ac_func_search_save_LIBS
7858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7860$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007862if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865fi
7866
7867fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007868
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7870$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007871if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007873else
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007875/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007876#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007877int
7878main ()
7879{
7880return makedev(0, 0);
7881 ;
7882 return 0;
7883}
7884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007886 ac_cv_header_sys_types_h_makedev=yes
7887else
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890rm -f core conftest.err conftest.$ac_objext \
7891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007892
7893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7895$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007896
7897if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007898ac_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 +02007899if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007900
Matthias Kloseb9621712010-04-24 17:59:49 +00007901$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007902
7903fi
7904
7905
7906
7907 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 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 +02007909if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007910
Matthias Kloseb9621712010-04-24 17:59:49 +00007911$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007912
7913fi
7914
7915
7916 fi
7917fi
7918
Michael W. Hudson54241132001-12-07 15:38:26 +00007919
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007920# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7921# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7922SAVE_CFLAGS=$CFLAGS
7923CFLAGS="-std=c99 $CFLAGS"
7924for ac_header in bluetooth/bluetooth.h
7925do :
7926 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7927if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7928 cat >>confdefs.h <<_ACEOF
7929#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7930_ACEOF
7931
7932fi
7933
7934done
7935
7936CFLAGS=$SAVE_CFLAGS
7937
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007938# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7939for ac_header in net/if.h
7940do :
7941 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7942#ifdef STDC_HEADERS
7943# include <stdlib.h>
7944# include <stddef.h>
7945#else
7946# ifdef HAVE_STDLIB_H
7947# include <stdlib.h>
7948# endif
7949#endif
7950#ifdef HAVE_SYS_SOCKET_H
7951# include <sys/socket.h>
7952#endif
7953
7954"
Victor Stinnere0be4232011-10-25 13:06:09 +02007955if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007956 cat >>confdefs.h <<_ACEOF
7957#define HAVE_NET_IF_H 1
7958_ACEOF
7959
7960fi
7961
7962done
7963
7964
Martin v. Löwis11017b12006-01-14 18:12:57 +00007965# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007966for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007967do :
7968 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 +00007969#ifdef HAVE_ASM_TYPES_H
7970#include <asm/types.h>
7971#endif
7972#ifdef HAVE_SYS_SOCKET_H
7973#include <sys/socket.h>
7974#endif
7975
Matthias Kloseb9621712010-04-24 17:59:49 +00007976"
Victor Stinnere0be4232011-10-25 13:06:09 +02007977if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007978 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007980_ACEOF
7981
7982fi
7983
7984done
7985
7986
caaveryeffc12f2017-09-06 18:18:10 -04007987for ac_header in linux/vm_sockets.h
7988do :
7989 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7990#ifdef HAVE_SYS_SOCKET_H
7991#include <sys/socket.h>
7992#endif
7993
7994"
7995if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
7996 cat >>confdefs.h <<_ACEOF
7997#define HAVE_LINUX_VM_SOCKETS_H 1
7998_ACEOF
7999
8000fi
8001
8002done
8003
8004
Charles-François Natali47413c12011-10-06 19:47:44 +02008005# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008006for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008007do :
8008 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8009ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8010#ifdef HAVE_SYS_SOCKET_H
8011#include <sys/socket.h>
8012#endif
8013
8014"
8015if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8016 cat >>confdefs.h <<_ACEOF
8017#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8018_ACEOF
8019
8020fi
8021
8022done
8023
8024
Guido van Rossum627b2d71993-12-24 10:39:16 +00008025# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008026was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8028$as_echo_n "checking for clock_t in time.h... " >&6; }
8029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008030/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008031#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
8033_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008036 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008037else
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
8039
Matthias Kloseb9621712010-04-24 17:59:49 +00008040$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008041
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008042
Guido van Rossum627b2d71993-12-24 10:39:16 +00008043fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008044rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008045
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8047$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8050$as_echo_n "checking for makedev... " >&6; }
8051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008053
Jesus Cea740f53a2010-04-28 11:35:30 +00008054#if defined(MAJOR_IN_MKDEV)
8055#include <sys/mkdev.h>
8056#elif defined(MAJOR_IN_SYSMACROS)
8057#include <sys/sysmacros.h>
8058#else
8059#include <sys/types.h>
8060#endif
8061
Neal Norwitz11690112002-07-30 01:08:28 +00008062int
8063main ()
8064{
Jesus Cea740f53a2010-04-28 11:35:30 +00008065
8066 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008067 ;
8068 return 0;
8069}
Matthias Kloseb159a552010-04-25 21:00:44 +00008070
Neal Norwitz11690112002-07-30 01:08:28 +00008071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008072if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008073 ac_cv_has_makedev=yes
8074else
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008077rm -f core conftest.err conftest.$ac_objext \
8078 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8080$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008081if test "$ac_cv_has_makedev" = "yes"; then
8082
Matthias Kloseb9621712010-04-24 17:59:49 +00008083$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008084
8085fi
8086
Christian Heimes985ecdc2013-11-20 11:46:18 +01008087# byte swapping
8088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8089$as_echo_n "checking for le64toh... " >&6; }
8090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8091/* end confdefs.h. */
8092
8093#ifdef HAVE_ENDIAN_H
8094#include <endian.h>
8095#elif defined(HAVE_SYS_ENDIAN_H)
8096#include <sys/endian.h>
8097#endif
8098
8099int
8100main ()
8101{
8102
8103 le64toh(1)
8104 ;
8105 return 0;
8106}
8107
8108_ACEOF
8109if ac_fn_c_try_link "$LINENO"; then :
8110 ac_cv_has_le64toh=yes
8111else
8112 ac_cv_has_le64toh=no
8113fi
8114rm -f core conftest.err conftest.$ac_objext \
8115 conftest$ac_exeext conftest.$ac_ext
8116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8117$as_echo "$ac_cv_has_le64toh" >&6; }
8118if test "$ac_cv_has_le64toh" = "yes"; then
8119
8120$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8121
8122fi
8123
Martin v. Löwis399a6892002-10-04 10:22:02 +00008124use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008125# Don't use largefile support for GNU/Hurd
8126case $ac_sys_system in GNU*)
8127 use_lfs=no
8128esac
8129
Martin v. Löwis399a6892002-10-04 10:22:02 +00008130if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008131# Two defines needed to enable largefile support on various platforms
8132# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008133case $ac_sys_system/$ac_sys_release in
8134AIX*)
8135
8136$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8137
8138 ;;
8139esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008142
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008145
Martin v. Löwis399a6892002-10-04 10:22:02 +00008146fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008147
Guido van Rossum84e7b241996-08-19 21:59:00 +00008148# Add some code to confdefs.h so that the test for off_t works on SCO
8149cat >> confdefs.h <<\EOF
8150#if defined(SCO_DS)
8151#undef _OFF_T
8152#endif
8153EOF
8154
Guido van Rossumef2255b2000-03-10 22:30:29 +00008155# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008156ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008157if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008158
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008159else
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
8161cat >>confdefs.h <<_ACEOF
8162#define mode_t int
8163_ACEOF
8164
8165fi
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008169
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171
8172cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008174_ACEOF
8175
8176fi
8177
Matthias Kloseb9621712010-04-24 17:59:49 +00008178ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008179if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008180
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008181else
Martin v. Löwis11437992002-04-12 09:54:03 +00008182
8183cat >>confdefs.h <<_ACEOF
8184#define pid_t int
8185_ACEOF
8186
8187fi
8188
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008189
Martin v. Löwis11437992002-04-12 09:54:03 +00008190cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008191#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008192_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008195if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008196
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008197else
Martin v. Löwis11437992002-04-12 09:54:03 +00008198
8199cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008200#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008201_ACEOF
8202
8203fi
8204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8206$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008207if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008208 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008209else
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008211/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008212#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
8214_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008217 ac_cv_type_uid_t=yes
8218else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008219 ac_cv_type_uid_t=no
8220fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008221rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008222
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8225$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008226if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008229
8230
Matthias Kloseb9621712010-04-24 17:59:49 +00008231$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008232
8233fi
8234
Mark Dickinson983bc162012-12-02 12:11:38 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008237if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008240
8241fi
8242
Stefan Krah1919b7e2012-03-21 18:25:23 +01008243ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8244if test "x$ac_cv_type___uint128_t" = xyes; then :
8245
8246$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8247
8248fi
8249
Jack Jansendd19cf82001-12-06 22:36:17 +00008250
Michael W. Hudson54241132001-12-07 15:38:26 +00008251# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008252# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253# The cast to long int works around a bug in the HP C Compiler
8254# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8255# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8256# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8258$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008259if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008261else
Matthias Kloseb9621712010-04-24 17:59:49 +00008262 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 +00008263
Martin v. Löwis11437992002-04-12 09:54:03 +00008264else
Matthias Kloseb9621712010-04-24 17:59:49 +00008265 if test "$ac_cv_type_int" = yes; then
8266 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8267$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008268as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008269See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270 else
8271 ac_cv_sizeof_int=0
8272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008274
Martin v. Löwis11437992002-04-12 09:54:03 +00008275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8277$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278
8279
8280
Martin v. Löwis11437992002-04-12 09:54:03 +00008281cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008282#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008283_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008284
8285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286# The cast to long int works around a bug in the HP C Compiler
8287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8289# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8291$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008292if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008294else
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 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 +00008296
Martin v. Löwis11437992002-04-12 09:54:03 +00008297else
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 if test "$ac_cv_type_long" = yes; then
8299 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008301as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008302See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 else
8304 ac_cv_sizeof_long=0
8305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008307
Martin v. Löwis11437992002-04-12 09:54:03 +00008308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8310$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311
8312
8313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008315#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008316_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008317
8318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008319# The cast to long int works around a bug in the HP C Compiler
8320# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8321# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8322# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8324$as_echo_n "checking size of long long... " >&6; }
8325if ${ac_cv_sizeof_long_long+:} false; then :
8326 $as_echo_n "(cached) " >&6
8327else
8328 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8329
8330else
8331 if test "$ac_cv_type_long_long" = yes; then
8332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8334as_fn_error 77 "cannot compute sizeof (long long)
8335See \`config.log' for more details" "$LINENO" 5; }
8336 else
8337 ac_cv_sizeof_long_long=0
8338 fi
8339fi
8340
8341fi
8342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8343$as_echo "$ac_cv_sizeof_long_long" >&6; }
8344
8345
8346
8347cat >>confdefs.h <<_ACEOF
8348#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8349_ACEOF
8350
8351
8352# The cast to long int works around a bug in the HP C Compiler
8353# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8354# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8355# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8357$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008358if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008360else
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 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 +00008362
Martin v. Löwis11437992002-04-12 09:54:03 +00008363else
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 if test "$ac_cv_type_void_p" = yes; then
8365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008367as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008368See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369 else
8370 ac_cv_sizeof_void_p=0
8371 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008373
Martin v. Löwis11437992002-04-12 09:54:03 +00008374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8376$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377
8378
8379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008381#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008382_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008383
8384
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385# The cast to long int works around a bug in the HP C Compiler
8386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8388# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8390$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008391if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008393else
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 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 +00008395
Martin v. Löwis11437992002-04-12 09:54:03 +00008396else
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 if test "$ac_cv_type_short" = yes; then
8398 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8399$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008400as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008401See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402 else
8403 ac_cv_sizeof_short=0
8404 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8409$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410
8411
8412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008414#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008415_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008416
8417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418# The cast to long int works around a bug in the HP C Compiler
8419# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8420# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8421# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8423$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008424if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008426else
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 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 +00008428
Martin v. Löwis11437992002-04-12 09:54:03 +00008429else
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 if test "$ac_cv_type_float" = yes; then
8431 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008433as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008434See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435 else
8436 ac_cv_sizeof_float=0
8437 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8442$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443
8444
8445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008447#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008448_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008449
8450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451# The cast to long int works around a bug in the HP C Compiler
8452# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8453# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8454# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8456$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008457if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008459else
Matthias Kloseb9621712010-04-24 17:59:49 +00008460 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 +00008461
Martin v. Löwis11437992002-04-12 09:54:03 +00008462else
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 if test "$ac_cv_type_double" = yes; then
8464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008466as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008467See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468 else
8469 ac_cv_sizeof_double=0
8470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008472
Martin v. Löwis11437992002-04-12 09:54:03 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8475$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476
8477
8478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008480#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008481_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008482
8483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484# The cast to long int works around a bug in the HP C Compiler
8485# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8486# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8487# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8489$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008490if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008492else
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 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 +00008494
Martin v. Löwis11437992002-04-12 09:54:03 +00008495else
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 if test "$ac_cv_type_fpos_t" = yes; then
8497 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008499as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008500See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501 else
8502 ac_cv_sizeof_fpos_t=0
8503 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8508$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509
8510
8511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008513#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008514_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008515
Michael W. Hudson54241132001-12-07 15:38:26 +00008516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517# The cast to long int works around a bug in the HP C Compiler
8518# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8519# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8520# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8522$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008523if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008525else
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 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 +00008527
Martin v. Löwis18e16552006-02-15 17:27:45 +00008528else
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 if test "$ac_cv_type_size_t" = yes; then
8530 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8531$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008532as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008533See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534 else
8535 ac_cv_sizeof_size_t=0
8536 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008538
Martin v. Löwis18e16552006-02-15 17:27:45 +00008539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8541$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008542
8543
8544
Martin v. Löwis18e16552006-02-15 17:27:45 +00008545cat >>confdefs.h <<_ACEOF
8546#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8547_ACEOF
8548
8549
Christian Heimes400adb02008-02-01 08:12:03 +00008550# The cast to long int works around a bug in the HP C Compiler
8551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8553# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8555$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008556if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008558else
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 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 +00008560
Christian Heimes400adb02008-02-01 08:12:03 +00008561else
Matthias Kloseb9621712010-04-24 17:59:49 +00008562 if test "$ac_cv_type_pid_t" = yes; then
8563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008565as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008566See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008567 else
8568 ac_cv_sizeof_pid_t=0
8569 fi
8570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571
Christian Heimes400adb02008-02-01 08:12:03 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8574$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008575
8576
8577
8578cat >>confdefs.h <<_ACEOF
8579#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8580_ACEOF
8581
8582
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008583# The cast to long int works around a bug in the HP C Compiler
8584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8586# This bug is HP SR number 8606223364.
8587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8588$as_echo_n "checking size of uintptr_t... " >&6; }
8589if ${ac_cv_sizeof_uintptr_t+:} false; then :
8590 $as_echo_n "(cached) " >&6
8591else
8592 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8593
8594else
8595 if test "$ac_cv_type_uintptr_t" = yes; then
8596 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8598as_fn_error 77 "cannot compute sizeof (uintptr_t)
8599See \`config.log' for more details" "$LINENO" 5; }
8600 else
8601 ac_cv_sizeof_uintptr_t=0
8602 fi
8603fi
8604
8605fi
8606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8607$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8608
8609
8610
8611cat >>confdefs.h <<_ACEOF
8612#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8613_ACEOF
8614
8615
Michael W. Hudson54241132001-12-07 15:38:26 +00008616
Matthias Kloseb9621712010-04-24 17:59:49 +00008617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8618$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008619have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008621/* end confdefs.h. */
8622
8623int
8624main ()
8625{
8626long double x; x = (long double)0;
8627 ;
8628 return 0;
8629}
8630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008631if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008632
8633
Matthias Kloseb9621712010-04-24 17:59:49 +00008634$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008635
8636 have_long_double=yes
8637
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008638fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8641$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008642if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008643# The cast to long int works around a bug in the HP C Compiler
8644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8646# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8648$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008649if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 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 +00008653
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008654else
Matthias Kloseb9621712010-04-24 17:59:49 +00008655 if test "$ac_cv_type_long_double" = yes; then
8656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008658as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008659See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008660 else
8661 ac_cv_sizeof_long_double=0
8662 fi
8663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8667$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008668
8669
8670
8671cat >>confdefs.h <<_ACEOF
8672#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8673_ACEOF
8674
8675
8676fi
8677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678# The cast to long int works around a bug in the HP C Compiler
8679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8683$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008684if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 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 +00008688
Thomas Woutersb2137042007-02-01 18:02:27 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 if test "$ac_cv_type__Bool" = yes; then
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008693as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 else
8696 ac_cv_sizeof__Bool=0
8697 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699
Thomas Woutersb2137042007-02-01 18:02:27 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8702$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703
8704
8705
Thomas Woutersb2137042007-02-01 18:02:27 +00008706cat >>confdefs.h <<_ACEOF
8707#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8708_ACEOF
8709
8710
Thomas Woutersb2137042007-02-01 18:02:27 +00008711
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008712# The cast to long int works around a bug in the HP C Compiler
8713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8715# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8717$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008718if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008720else
Matthias Kloseb9621712010-04-24 17:59:49 +00008721 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008722#ifdef HAVE_SYS_TYPES_H
8723#include <sys/types.h>
8724#endif
8725
Matthias Kloseb9621712010-04-24 17:59:49 +00008726"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008727
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 if test "$ac_cv_type_off_t" = yes; then
8730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008732as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008733See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008734 else
8735 ac_cv_sizeof_off_t=0
8736 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8741$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008742
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008743
8744
Martin v. Löwis11437992002-04-12 09:54:03 +00008745cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008746#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008747_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008748
Michael W. Hudson54241132001-12-07 15:38:26 +00008749
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008750
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8752$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008753if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008754 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008755
Matthias Kloseb9621712010-04-24 17:59:49 +00008756$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008757
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8759$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008760else
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8762$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008763fi
8764
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008765# The cast to long int works around a bug in the HP C Compiler
8766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8768# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8770$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008771if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008773else
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008775#ifdef HAVE_SYS_TYPES_H
8776#include <sys/types.h>
8777#endif
8778#ifdef HAVE_TIME_H
8779#include <time.h>
8780#endif
8781
Matthias Kloseb9621712010-04-24 17:59:49 +00008782"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008784else
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 if test "$ac_cv_type_time_t" = yes; then
8786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008788as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008789See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008790 else
8791 ac_cv_sizeof_time_t=0
8792 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8797$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008799
8800
Martin v. Löwis11437992002-04-12 09:54:03 +00008801cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008802#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008803_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008804
Michael W. Hudson54241132001-12-07 15:38:26 +00008805
8806
Trent Mick635f6fb2000-08-23 21:33:05 +00008807# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008808ac_save_cc="$CC"
8809if test "$ac_cv_kpthread" = "yes"
8810then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008811elif test "$ac_cv_kthread" = "yes"
8812then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008813elif test "$ac_cv_pthread" = "yes"
8814then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008815fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8818$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008819have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008822
8823 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
Guido van Rossum12580492000-09-24 16:47:19 +00008827pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ;
8829 return 0;
8830}
Matthias Kloseb159a552010-04-25 21:00:44 +00008831
Martin v. Löwis11437992002-04-12 09:54:03 +00008832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008833if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008834 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8838$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008839if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8845$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850#ifdef HAVE_PTHREAD_H
8851#include <pthread.h>
8852#endif
8853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 if test "$ac_cv_type_pthread_t" = yes; then
8858 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008860as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008861See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008862 else
8863 ac_cv_sizeof_pthread_t=0
8864 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866
Trent Mick635f6fb2000-08-23 21:33:05 +00008867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8869$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871
8872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008874#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008875_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008876
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008877
Trent Mick635f6fb2000-08-23 21:33:05 +00008878fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008879
8880# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8881# This checking will be unnecessary after removing deprecated TLS API.
8882# The cast to long int works around a bug in the HP C Compiler
8883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8885# This bug is HP SR number 8606223364.
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8887$as_echo_n "checking size of pthread_key_t... " >&6; }
8888if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8889 $as_echo_n "(cached) " >&6
8890else
8891 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8892"; then :
8893
8894else
8895 if test "$ac_cv_type_pthread_key_t" = yes; then
8896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8898as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8899See \`config.log' for more details" "$LINENO" 5; }
8900 else
8901 ac_cv_sizeof_pthread_key_t=0
8902 fi
8903fi
8904
8905fi
8906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8907$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8908
8909
8910
8911cat >>confdefs.h <<_ACEOF
8912#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8913_ACEOF
8914
8915
8916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8917$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8918if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8920/* end confdefs.h. */
8921#include <pthread.h>
8922int
8923main ()
8924{
8925pthread_key_t k; k * 1;
8926 ;
8927 return 0;
8928}
8929_ACEOF
8930if ac_fn_c_try_compile "$LINENO"; then :
8931 ac_pthread_key_t_is_arithmetic_type=yes
8932else
8933 ac_pthread_key_t_is_arithmetic_type=no
8934
8935fi
8936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8938$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8939 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8940
8941$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8942
8943 fi
8944else
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8946$as_echo "no" >&6; }
8947fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008948CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008949
Michael W. Hudson54241132001-12-07 15:38:26 +00008950
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008951case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008952 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008953 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8954 ;;
8955 Darwin/*)
8956 OTHER_LIBTOOL_OPT=""
8957 ;;
8958esac
8959
8960
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008961
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008962case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008963 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008964 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8965 if test "${enable_universalsdk}"; then
8966 :
8967 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008968 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008969 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008970 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008971 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008972 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008973 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008974 if test ${gcc_version} '<' 4.0
8975 then
8976 LIBTOOL_CRUFT="-lcc_dynamic"
8977 else
8978 LIBTOOL_CRUFT=""
8979 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008981 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008982else
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008984/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008985
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008986 #include <unistd.h>
8987 int main(int argc, char*argv[])
8988 {
8989 if (sizeof(long) == 4) {
8990 return 0;
8991 } else {
8992 return 1;
8993 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008994 }
8995
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008997if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008998 ac_osx_32bit=yes
8999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009004fi
9005
9006
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009007 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009008 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009009 i386)
9010 MACOSX_DEFAULT_ARCH="i386"
9011 ;;
9012 ppc)
9013 MACOSX_DEFAULT_ARCH="ppc"
9014 ;;
9015 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009016 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009017 ;;
9018 esac
9019 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009020 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009021 i386)
9022 MACOSX_DEFAULT_ARCH="x86_64"
9023 ;;
9024 ppc)
9025 MACOSX_DEFAULT_ARCH="ppc64"
9026 ;;
9027 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009028 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009029 ;;
9030 esac
9031
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009032 fi
9033
9034 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009035 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009036 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009037esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9039$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009040if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009041then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009042 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009044 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009045
Matthias Kloseb9621712010-04-24 17:59:49 +00009046$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009047
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9049$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009050 if test $enable_shared = "yes"
9051 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009052 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 +00009053 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009054else
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009057fi
9058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9060$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009061case $ac_sys_system/$ac_sys_release in
9062 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009063
Matthias Kloseb9621712010-04-24 17:59:49 +00009064$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009065
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9067$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009068 ;;
9069 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009072 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009073esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009074
Guido van Rossum0a516c91994-09-12 10:58:40 +00009075# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009076
Michael W. Hudson54241132001-12-07 15:38:26 +00009077
9078
9079
9080
Benjamin Peterson99f03762010-04-11 22:15:28 +00009081
Thomas Wouters477c8d52006-05-27 19:21:47 +00009082
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009083# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9084# -- usually .so, .sl on HP-UX, .dll on Cygwin
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9086$as_echo_n "checking the extension of shared libraries... " >&6; }
9087if test -z "$SHLIB_SUFFIX"; then
9088 case $ac_sys_system in
9089 hp*|HP*)
9090 case `uname -m` in
9091 ia64) SHLIB_SUFFIX=.so;;
9092 *) SHLIB_SUFFIX=.sl;;
9093 esac
9094 ;;
9095 CYGWIN*) SHLIB_SUFFIX=.dll;;
9096 *) SHLIB_SUFFIX=.so;;
9097 esac
9098fi
9099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9100$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009101
Guido van Rossum0a516c91994-09-12 10:58:40 +00009102# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009103# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009104# (Shared libraries in this instance are shared modules to be loaded into
9105# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9107$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009108if test -z "$LDSHARED"
9109then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009110 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009111 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009112 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009113 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009114 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009116 if test "$GCC" = "yes" ; then
9117 LDSHARED='$(CC) -shared'
9118 LDCXXSHARED='$(CXX) -shared'
9119 else
9120 LDSHARED='$(CC) -G'
9121 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009122 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009123 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009124 if test "$GCC" = "yes" ; then
9125 LDSHARED='$(CC) -shared'
9126 LDCXXSHARED='$(CXX) -shared'
9127 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009128 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009129 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009130 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009131 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009132 LDSHARED='$(CC) -bundle'
9133 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009134 if test "$enable_framework" ; then
9135 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009136 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9137 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009138 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009139 else
9140 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009141 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009142 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009143 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009144 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009145 LDSHARED='$(CC) -bundle'
9146 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009147 if test "$enable_framework" ; then
9148 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009149 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9150 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009151 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009152 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009153 # No framework, use the Python app as bundle-loader
9154 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009155 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009156 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009157 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009158 Darwin/*)
9159 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9160 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009161
Ned Deily36820b62014-06-25 13:44:22 -07009162 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9163 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9164 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9165 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9166 if test ${dep_target_major} -eq 10 && \
9167 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009168 then
Ned Deily36820b62014-06-25 13:44:22 -07009169 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009170 LDSHARED='$(CC) -bundle'
9171 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +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 Jansen6b08a402004-06-03 12:41:45 +00009177 else
9178 # No framework, use the Python app as bundle-loader
9179 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9180 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009181 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009182 fi
Ned Deily36820b62014-06-25 13:44:22 -07009183 else
9184 # building for OS X 10.3 and later
9185 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9186 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9187 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009188 fi
9189 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009190 Linux*|GNU*|QNX*)
9191 LDSHARED='$(CC) -shared'
9192 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009193 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009194 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009195 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009196 LDSHARED='$(CC) -shared'
9197 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009198 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009199 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009200 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009201 OpenBSD*)
9202 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9203 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009204 LDSHARED='$(CC) -shared $(CCSHARED)'
9205 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009206 else
9207 case `uname -r` in
9208 [01].* | 2.[0-7] | 2.[0-7].*)
9209 LDSHARED="ld -Bshareable ${LDFLAGS}"
9210 ;;
9211 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009212 LDSHARED='$(CC) -shared $(CCSHARED)'
9213 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009214 ;;
9215 esac
9216 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009217 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009218 LDSHARED='$(CC) -shared'
9219 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009220 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009221 if test "$GCC" = "yes" ; then
9222 LDSHARED='$(CC) -shared'
9223 LDCXXSHARED='$(CXX) -shared'
9224 else
9225 LDSHARED='$(CC) -G'
9226 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009227 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009228 SCO_SV*)
9229 LDSHARED='$(CC) -Wl,-G,-Bexport'
9230 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9231 CYGWIN*)
9232 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9233 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009234 *) LDSHARED="ld";;
9235 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9238$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009239LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009240BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009241# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009242# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9244$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009245if test -z "$CCSHARED"
9246then
Guido van Rossum07397971997-04-29 21:49:50 +00009247 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009248 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009249 then CCSHARED="-fPIC";
9250 elif test `uname -p` = sparc;
9251 then CCSHARED="-xcode=pic32";
9252 else CCSHARED="-Kpic";
9253 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009254 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009255 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009256 else CCSHARED="+z";
9257 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009258 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009259 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009260 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009261 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009262 if test "$GCC" = "yes"
9263 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009264 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009265 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009266 SCO_SV*)
9267 if test "$GCC" = "yes"
9268 then CCSHARED="-fPIC"
9269 else CCSHARED="-Kpic -belf"
9270 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9274$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009275# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009276# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9278$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009279if test -z "$LINKFORSHARED"
9280then
Guido van Rossum07397971997-04-29 21:49:50 +00009281 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009282 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009283 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009284 LINKFORSHARED="-Wl,-E -Wl,+s";;
9285# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009286 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009287 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009288 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009290 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009291
9292 # Issue #18075: the default maximum stack size (8MBytes) is too
9293 # small for the default recursion limit. Increase the stack size
9294 # to ensure that tests don't crash
9295 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9296
Jack Jansene578a632001-08-15 01:27:14 +00009297 if test "$enable_framework"
9298 then
Jack Jansenda49e192005-01-07 13:08:22 +00009299 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009300 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009301 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009302 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009303 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009304 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009305 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009306 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9307 then
9308 LINKFORSHARED="-Wl,--export-dynamic"
9309 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009310 SunOS/5*) case $CC in
9311 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009312 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009313 then
9314 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009315 fi;;
9316 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009317 CYGWIN*)
9318 if test $enable_shared = "no"
9319 then
9320 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9321 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009322 QNX*)
9323 # -Wl,-E causes the symbols to be added to the dynamic
9324 # symbol table so that they can be found when a module
9325 # is loaded. -N 2048K causes the stack size to be set
9326 # to 2048 kilobytes so that the stack doesn't overflow
9327 # when running test_compile.py.
9328 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9332$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009333
Michael W. Hudson54241132001-12-07 15:38:26 +00009334
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009335
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9337$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009338if test ! "$LIBRARY" = "$LDLIBRARY"
9339then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009340 case $ac_sys_system in
9341 CYGWIN*)
9342 # Cygwin needs CCSHARED when building extension DLLs
9343 # but not when building the interpreter DLL.
9344 CFLAGSFORSHARED='';;
9345 *)
9346 CFLAGSFORSHARED='$(CCSHARED)'
9347 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9350$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009351
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009352# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9353# library (with --enable-shared).
9354# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009355# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9356# if it is not required, since it creates a dependency of the shared library
9357# to LIBS. This, in turn, means that applications linking the shared libpython
9358# don't need to link LIBS explicitly. The default should be only changed
9359# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009360
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9362$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009363case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009364 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009365 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009366esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9368$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009369
9370
Guido van Rossum627b2d71993-12-24 10:39:16 +00009371# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9373$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009374if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009375 $as_echo_n "(cached) " >&6
9376else
9377 ac_check_lib_save_LIBS=$LIBS
9378LIBS="-lsendfile $LIBS"
9379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9380/* end confdefs.h. */
9381
9382/* Override any GCC internal prototype to avoid an error.
9383 Use char because int might match the return type of a GCC
9384 builtin and then its argument prototype would still apply. */
9385#ifdef __cplusplus
9386extern "C"
9387#endif
9388char sendfile ();
9389int
9390main ()
9391{
9392return sendfile ();
9393 ;
9394 return 0;
9395}
9396_ACEOF
9397if ac_fn_c_try_link "$LINENO"; then :
9398 ac_cv_lib_sendfile_sendfile=yes
9399else
9400 ac_cv_lib_sendfile_sendfile=no
9401fi
9402rm -f core conftest.err conftest.$ac_objext \
9403 conftest$ac_exeext conftest.$ac_ext
9404LIBS=$ac_check_lib_save_LIBS
9405fi
9406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9407$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009408if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009409 cat >>confdefs.h <<_ACEOF
9410#define HAVE_LIBSENDFILE 1
9411_ACEOF
9412
9413 LIBS="-lsendfile $LIBS"
9414
9415fi
9416
Matthias Kloseb9621712010-04-24 17:59:49 +00009417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9418$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009419if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009421else
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009423LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427/* Override any GCC internal prototype to avoid an error.
9428 Use char because int might match the return type of a GCC
9429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009430#ifdef __cplusplus
9431extern "C"
9432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009433char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009434int
9435main ()
9436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009437return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009438 ;
9439 return 0;
9440}
9441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009443 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009444else
Matthias Kloseb9621712010-04-24 17:59:49 +00009445 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009447rm -f core conftest.err conftest.$ac_objext \
9448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009449LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9452$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009453if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 cat >>confdefs.h <<_ACEOF
9455#define HAVE_LIBDL 1
9456_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009457
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009458 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009460fi
9461 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9463$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009464if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009466else
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009468LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472/* Override any GCC internal prototype to avoid an error.
9473 Use char because int might match the return type of a GCC
9474 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009475#ifdef __cplusplus
9476extern "C"
9477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009478char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009479int
9480main ()
9481{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009489else
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009492rm -f core conftest.err conftest.$ac_objext \
9493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009494LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9497$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009498if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 cat >>confdefs.h <<_ACEOF
9500#define HAVE_LIBDLD 1
9501_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009502
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009503 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009504
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009505fi
9506 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009507
Michael Felt0d3ccb42017-12-30 22:39:20 +01009508# checks for uuid.h location
9509for ac_header in uuid/uuid.h uuid.h
9510do :
9511 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9512ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9513if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9514 cat >>confdefs.h <<_ACEOF
9515#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9516_ACEOF
9517
9518fi
9519
9520done
9521
9522
Berker Peksag9a10ff42017-11-08 23:09:16 +03009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9524$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9526/* end confdefs.h. */
9527#include <uuid/uuid.h>
9528int
9529main ()
9530{
9531
9532#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009533void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009534#endif
9535
9536 ;
9537 return 0;
9538}
9539_ACEOF
9540if ac_fn_c_try_compile "$LINENO"; then :
9541
9542$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9543
9544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9545$as_echo "yes" >&6; }
9546else
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9548$as_echo "no" >&6; }
9549
9550fi
9551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9552
Michael Felt0d3ccb42017-12-30 22:39:20 +01009553# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009554# FreeBSD and OpenBSD provides support as well
9555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9556$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9558/* end confdefs.h. */
9559#include <uuid.h>
9560int
9561main ()
9562{
9563
9564#ifndef uuid_create
9565void *x = uuid_create
9566#endif
9567
9568 ;
9569 return 0;
9570}
9571_ACEOF
9572if ac_fn_c_try_compile "$LINENO"; then :
9573
9574$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9575
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9577$as_echo "yes" >&6; }
9578else
9579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9580$as_echo "no" >&6; }
9581
9582fi
9583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9584
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009585# 'Real Time' functions on Solaris
9586# posix4 on Solaris 2.6
9587# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009589$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009590if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009591 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009592else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009593 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597/* Override any GCC internal prototype to avoid an error.
9598 Use char because int might match the return type of a GCC
9599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600#ifdef __cplusplus
9601extern "C"
9602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009603char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009604int
9605main ()
9606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ;
9609 return 0;
9610}
9611_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612for ac_lib in '' pthread rt posix4; do
9613 if test -z "$ac_lib"; then
9614 ac_res="none required"
9615 else
9616 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009617 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009619 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009622rm -f core conftest.err conftest.$ac_objext \
9623 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009624 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627done
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630else
9631 ac_cv_search_sem_init=no
9632fi
9633rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009634LIBS=$ac_func_search_save_LIBS
9635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9637$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009639if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009641
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009642fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009643
Martin v. Löwis519adae2003-09-20 10:47:47 +00009644
Martin v. Löwis19d17342003-06-14 21:03:05 +00009645# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9647$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009648if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009650else
9651 ac_check_lib_save_LIBS=$LIBS
9652LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009654/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009656/* Override any GCC internal prototype to avoid an error.
9657 Use char because int might match the return type of a GCC
9658 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009659#ifdef __cplusplus
9660extern "C"
9661#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009662char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663int
9664main ()
9665{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009667 ;
9668 return 0;
9669}
9670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009672 ac_cv_lib_intl_textdomain=yes
9673else
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009676rm -f core conftest.err conftest.$ac_objext \
9677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009678LIBS=$ac_check_lib_save_LIBS
9679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9681$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009682if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009683
Matthias Kloseb9621712010-04-24 17:59:49 +00009684$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009685
Brett Cannonc6d936e2009-06-07 20:09:53 +00009686 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009687fi
9688
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009689
9690# checks for system dependent C++ extensions support
9691case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009692 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9693$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009695/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009696
Georg Brandl59e87bd2011-02-15 19:48:59 +00009697 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009698int
9699main ()
9700{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009701loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 ;
9703 return 0;
9704}
Matthias Kloseb159a552010-04-25 21:00:44 +00009705
Martin v. Löwis11437992002-04-12 09:54:03 +00009706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009707if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009708
Matthias Kloseb159a552010-04-25 21:00:44 +00009709
Matthias Kloseb9621712010-04-24 17:59:49 +00009710$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009711
Matthias Kloseb159a552010-04-25 21:00:44 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009713$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009714
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009715else
Matthias Kloseb159a552010-04-25 21:00:44 +00009716
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009718$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009719
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009721rm -f core conftest.err conftest.$ac_objext \
9722 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009723 *) ;;
9724esac
9725
Christian Heimes985ecdc2013-11-20 11:46:18 +01009726# check for systems that require aligned memory access
9727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9728$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009729if ${ac_cv_aligned_required+:} false; then :
9730 $as_echo_n "(cached) " >&6
9731else
9732 if test "$cross_compiling" = yes; then :
9733 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009734else
9735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9736/* end confdefs.h. */
9737
9738int main()
9739{
9740 char s[16];
9741 int i, *p1, *p2;
9742 for (i=0; i < 16; i++)
9743 s[i] = i;
9744 p1 = (int*)(s+1);
9745 p2 = (int*)(s+2);
9746 if (*p1 == *p2)
9747 return 1;
9748 return 0;
9749}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009750_ACEOF
9751if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009752 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009753else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009754 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009755fi
9756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9757 conftest.$ac_objext conftest.beam conftest.$ac_ext
9758fi
9759
9760
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009761fi
9762
9763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9764$as_echo "$ac_cv_aligned_required" >&6; }
9765if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009766
9767$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9768
9769fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009770
9771# str, bytes and memoryview hash algorithm
9772
9773
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9775$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9776
9777# Check whether --with-hash_algorithm was given.
9778if test "${with_hash_algorithm+set}" = set; then :
9779 withval=$with_hash_algorithm;
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9781$as_echo "$withval" >&6; }
9782case "$withval" in
9783 siphash24)
9784 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9785
9786 ;;
9787 fnv)
9788 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9789
9790 ;;
9791 *)
9792 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9793 ;;
9794esac
9795
9796else
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9798$as_echo "default" >&6; }
9799fi
9800
9801
Charles-François Natalid30b0222014-05-08 23:08:51 +01009802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9803$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9804
9805# Check whether --with-address_sanitizer was given.
9806if test "${with_address_sanitizer+set}" = set; then :
9807 withval=$with_address_sanitizer;
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9809$as_echo "$withval" >&6; }
9810BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9811LDFLAGS="-fsanitize=address $LDFLAGS"
9812
9813else
9814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815$as_echo "no" >&6; }
9816fi
9817
9818
Guido van Rossum70c7f481998-03-26 18:44:10 +00009819# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9821$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009822if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009824else
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009826LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830/* Override any GCC internal prototype to avoid an error.
9831 Use char because int might match the return type of a GCC
9832 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009833#ifdef __cplusplus
9834extern "C"
9835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009836char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009837int
9838main ()
9839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ;
9842 return 0;
9843}
9844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009847else
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850rm -f core conftest.err conftest.$ac_objext \
9851 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009852LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9855$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009856if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009857 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009858fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009859 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9861$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009862if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009863 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009864else
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009866LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870/* Override any GCC internal prototype to avoid an error.
9871 Use char because int might match the return type of a GCC
9872 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009873#ifdef __cplusplus
9874extern "C"
9875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009876char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009877int
9878main ()
9879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009881 ;
9882 return 0;
9883}
9884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009886 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009887else
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009890rm -f core conftest.err conftest.$ac_objext \
9891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009892LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9895$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009896if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009897 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009898fi
9899 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009900
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9902$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009905if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9908$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009909LIBS="$withval $LIBS"
9910
9911else
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914fi
9915
Guido van Rossum7f43da71994-08-01 12:15:30 +00009916
Victor Stinner8291b5e2015-03-20 16:03:14 +01009917
9918
9919
9920
9921
9922
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009923
Victor Stinner8291b5e2015-03-20 16:03:14 +01009924if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9925 if test -n "$ac_tool_prefix"; then
9926 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9927set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9929$as_echo_n "checking for $ac_word... " >&6; }
9930if ${ac_cv_path_PKG_CONFIG+:} false; then :
9931 $as_echo_n "(cached) " >&6
9932else
9933 case $PKG_CONFIG in
9934 [\\/]* | ?:[\\/]*)
9935 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9936 ;;
9937 *)
9938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9939for as_dir in $PATH
9940do
9941 IFS=$as_save_IFS
9942 test -z "$as_dir" && as_dir=.
9943 for ac_exec_ext in '' $ac_executable_extensions; do
9944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9945 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9947 break 2
9948 fi
9949done
9950 done
9951IFS=$as_save_IFS
9952
9953 ;;
9954esac
9955fi
9956PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9957if test -n "$PKG_CONFIG"; then
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9959$as_echo "$PKG_CONFIG" >&6; }
9960else
9961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9962$as_echo "no" >&6; }
9963fi
9964
9965
9966fi
9967if test -z "$ac_cv_path_PKG_CONFIG"; then
9968 ac_pt_PKG_CONFIG=$PKG_CONFIG
9969 # Extract the first word of "pkg-config", so it can be a program name with args.
9970set dummy pkg-config; ac_word=$2
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972$as_echo_n "checking for $ac_word... " >&6; }
9973if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9974 $as_echo_n "(cached) " >&6
9975else
9976 case $ac_pt_PKG_CONFIG in
9977 [\\/]* | ?:[\\/]*)
9978 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9979 ;;
9980 *)
9981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9982for as_dir in $PATH
9983do
9984 IFS=$as_save_IFS
9985 test -z "$as_dir" && as_dir=.
9986 for ac_exec_ext in '' $ac_executable_extensions; do
9987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9988 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9990 break 2
9991 fi
9992done
9993 done
9994IFS=$as_save_IFS
9995
9996 ;;
9997esac
9998fi
9999ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10000if test -n "$ac_pt_PKG_CONFIG"; then
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10002$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10003else
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
10006fi
10007
10008 if test "x$ac_pt_PKG_CONFIG" = x; then
10009 PKG_CONFIG=""
10010 else
10011 case $cross_compiling:$ac_tool_warned in
10012yes:)
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10014$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10015ac_tool_warned=yes ;;
10016esac
10017 PKG_CONFIG=$ac_pt_PKG_CONFIG
10018 fi
10019else
10020 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10021fi
10022
10023fi
10024if test -n "$PKG_CONFIG"; then
10025 _pkg_min_version=0.9.0
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10027$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10028 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10030$as_echo "yes" >&6; }
10031 else
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033$as_echo "no" >&6; }
10034 PKG_CONFIG=""
10035 fi
10036fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010037
10038# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10040$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010041
10042# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010043if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010044 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010045else
10046 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010047fi
10048
10049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10051$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010052
10053# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10055$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010056
10057# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010058if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010059 withval=$with_system_ffi;
10060fi
10061
10062
Zachary Waref40d4dd2016-09-17 01:25:24 -050010063if test "$ac_sys_system" = "Darwin"
10064then
10065 case "$with_system_ffi" in
10066 "")
10067 with_system_ffi="no"
10068 ;;
10069 yes|no)
10070 ;;
10071 *)
10072 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10073 ;;
10074 esac
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10076$as_echo "$with_system_ffi" >&6; }
10077else
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10079$as_echo "yes" >&6; }
10080 if test "$with_system_ffi" != ""
10081 then
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10083$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10084 fi
10085 with_system_ffi="yes"
10086fi
Zachary Ware935043d2016-09-09 17:01:21 -070010087
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010088if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010089 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10090else
10091 LIBFFI_INCLUDEDIR=""
10092fi
10093
10094
Stefan Krah60187b52012-03-23 19:06:27 +010010095# Check for use of the system libmpdec library
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10097$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10098
10099# Check whether --with-system_libmpdec was given.
10100if test "${with_system_libmpdec+set}" = set; then :
10101 withval=$with_system_libmpdec;
10102else
10103 with_system_libmpdec="no"
10104fi
10105
10106
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10108$as_echo "$with_system_libmpdec" >&6; }
10109
Benjamin Peterson076ed002010-10-31 17:11:02 +000010110# Check for support for loadable sqlite extensions
10111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10112$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10113# Check whether --enable-loadable-sqlite-extensions was given.
10114if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10115 enableval=$enable_loadable_sqlite_extensions;
10116else
10117 enable_loadable_sqlite_extensions="no"
10118fi
10119
10120
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10122$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10123
Ned Deilyd819b932013-09-06 01:07:05 -070010124# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10125
10126
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10128$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10129
10130# Check whether --with-tcltk-includes was given.
10131if test "${with_tcltk_includes+set}" = set; then :
10132 withval=$with_tcltk_includes;
10133else
10134 with_tcltk_includes="default"
10135fi
10136
10137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10138$as_echo "$with_tcltk_includes" >&6; }
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10140$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10141
10142# Check whether --with-tcltk-libs was given.
10143if test "${with_tcltk_libs+set}" = set; then :
10144 withval=$with_tcltk_libs;
10145else
10146 with_tcltk_libs="default"
10147fi
10148
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10150$as_echo "$with_tcltk_libs" >&6; }
10151if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10152then
10153 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10154 then
10155 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10156 fi
10157 TCLTK_INCLUDES=""
10158 TCLTK_LIBS=""
10159else
10160 TCLTK_INCLUDES="$with_tcltk_includes"
10161 TCLTK_LIBS="$with_tcltk_libs"
10162fi
10163
Matthias Klose55708cc2009-04-30 08:06:49 +000010164# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10166$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010167
10168# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010169if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010170 withval=$with_dbmliborder;
10171if test x$with_dbmliborder = xyes
10172then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010173as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010174else
10175 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10176 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10177 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010178 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010179 fi
10180 done
10181fi
10182fi
10183
Matthias Kloseb9621712010-04-24 17:59:49 +000010184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10185$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
10189# Templates for things AC_DEFINEd more than once.
10190# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010191
10192
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010193if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010194then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010195 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010197
10198 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010199elif test "$ac_cv_kpthread" = "yes"
10200then
10201 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010202 if test "$ac_cv_cxx_thread" = "yes"; then
10203 CXX="$CXX -Kpthread"
10204 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010205 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010206elif test "$ac_cv_kthread" = "yes"
10207then
10208 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010209 if test "$ac_cv_cxx_thread" = "yes"; then
10210 CXX="$CXX -Kthread"
10211 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010212 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010213elif test "$ac_cv_pthread" = "yes"
10214then
10215 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010216 if test "$ac_cv_cxx_thread" = "yes"; then
10217 CXX="$CXX -pthread"
10218 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010219 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010220else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010221 if test ! -z "$withval" -a -d "$withval"
10222 then LDFLAGS="$LDFLAGS -L$withval"
10223 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010224
10225 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010226 # define _POSIX_THREADS in unistd.h. Some apparently don't
10227 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10229$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010231/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010232
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010233#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010234#ifdef _POSIX_THREADS
10235yes
10236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010237
10238_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010241 unistd_defines_pthreads=yes
10242else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010243 unistd_defines_pthreads=no
10244fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010245rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010246
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10248$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010249
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010251
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010252 # Just looking for pthread_create in libpthread is not enough:
10253 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10254 # So we really have to include pthread.h, and then link.
10255 _libs=$LIBS
10256 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10258$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010260/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010261
10262#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010263#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010264
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010265void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010266int
10267main ()
10268{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010269
10270pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ;
10272 return 0;
10273}
10274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010276
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10278$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010279 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010280
Guido van Rossum02a1c402000-02-25 19:26:31 +000010281else
Martin v. Löwis11437992002-04-12 09:54:03 +000010282
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010283 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010285if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010286
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010287 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010288
Guido van Rossumad678af1998-10-02 14:42:15 +000010289else
Guido van Rossumad678af1998-10-02 14:42:15 +000010290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10292$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010293if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010295else
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010297LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010301/* Override any GCC internal prototype to avoid an error.
10302 Use char because int might match the return type of a GCC
10303 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010304#ifdef __cplusplus
10305extern "C"
10306#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010307char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010308int
10309main ()
10310{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 ;
10313 return 0;
10314}
10315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010318else
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010321rm -f core conftest.err conftest.$ac_objext \
10322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010323LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10326$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010327if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010328
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010329 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010330 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010331
Greg Steinadf63d62000-07-05 10:38:09 +000010332else
Greg Steinadf63d62000-07-05 10:38:09 +000010333
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10335$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010336if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010338else
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010340LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344/* Override any GCC internal prototype to avoid an error.
10345 Use char because int might match the return type of a GCC
10346 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010347#ifdef __cplusplus
10348extern "C"
10349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010350char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010351int
10352main ()
10353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ;
10356 return 0;
10357}
10358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010359if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010361else
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010364rm -f core conftest.err conftest.$ac_objext \
10365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10369$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010370if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010371
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010372 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010373 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010374
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010375else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010376
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10378$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010379if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010381else
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010383LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387/* Override any GCC internal prototype to avoid an error.
10388 Use char because int might match the return type of a GCC
10389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390#ifdef __cplusplus
10391extern "C"
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010394int
10395main ()
10396{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010398 ;
10399 return 0;
10400}
10401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010409LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10412$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010413if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010414
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010415 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010416 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010417
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010418else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010419
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10421$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010422if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010424else
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010426LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430/* Override any GCC internal prototype to avoid an error.
10431 Use char because int might match the return type of a GCC
10432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010433#ifdef __cplusplus
10434extern "C"
10435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010436char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010437int
10438main ()
10439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ;
10442 return 0;
10443}
10444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010447else
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010450rm -f core conftest.err conftest.$ac_objext \
10451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010452LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10455$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010456if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010457
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010458 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010459 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010460
Guido van Rossumb93a8621998-05-07 13:27:32 +000010461else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010462
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010463 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10464
Guido van Rossum2d38f911996-06-26 19:47:01 +000010465fi
10466
Guido van Rossum627b2d71993-12-24 10:39:16 +000010467
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010468fi
10469
Guido van Rossum0be3e491997-05-22 20:33:33 +000010470fi
10471
Guido van Rossum49545951997-12-02 19:28:29 +000010472fi
10473
Guido van Rossumb93a8621998-05-07 13:27:32 +000010474fi
10475
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010477rm -f core conftest.err conftest.$ac_objext \
10478 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010479
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10481$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010482if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010484else
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010486LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490/* Override any GCC internal prototype to avoid an error.
10491 Use char because int might match the return type of a GCC
10492 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010493#ifdef __cplusplus
10494extern "C"
10495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010496char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010497int
10498main ()
10499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010501 ;
10502 return 0;
10503}
10504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010505if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010510rm -f core conftest.err conftest.$ac_objext \
10511 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010512LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10515$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010516if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010517
Martin v. Löwis130fb172001-07-19 11:00:41 +000010518 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010519
Guido van Rossum627b2d71993-12-24 10:39:16 +000010520fi
10521
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010522
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010523fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010524
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010525if test "$posix_threads" = "yes"; then
10526 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529
10530 fi
10531
10532 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10533 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010534 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010535$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010536
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010537 ;;
10538 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010539$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010540
10541 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010542 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010543$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010544
10545 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546 esac
10547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10549$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010550 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 ac_cv_pthread_system_supported=no
10555else
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010558
10559 #include <stdio.h>
10560 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561 void *foo(void *parm) {
10562 return NULL;
10563 }
10564 main() {
10565 pthread_attr_t attr;
10566 pthread_t id;
10567 if (pthread_attr_init(&attr)) exit(-1);
10568 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10569 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10570 exit(0);
10571 }
10572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010573if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574 ac_cv_pthread_system_supported=yes
10575else
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010580fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582
Guido van Rossum627b2d71993-12-24 10:39:16 +000010583fi
10584
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10586$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010587 if test "$ac_cv_pthread_system_supported" = "yes"; then
10588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010590
10591 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 for ac_func in pthread_sigmask
10593do :
10594 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010595if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010597#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010598_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010599 case $ac_sys_system in
10600 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010603
10604 ;;
10605 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606fi
10607done
10608
pdoxe14679c2017-10-05 00:01:56 -070010609 for ac_func in pthread_getcpuclockid
10610do :
10611 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10612if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10613 cat >>confdefs.h <<_ACEOF
10614#define HAVE_PTHREAD_GETCPUCLOCKID 1
10615_ACEOF
10616
10617fi
10618done
10619
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010620fi
10621
10622
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010623# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10626$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010628if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010633 ipv6=no
10634 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10636$as_echo "yes" >&6; }
10637 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010638
10639 ipv6=yes
10640 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642else
Martin v. Löwis11437992002-04-12 09:54:03 +000010643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010645/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646 /* AF_INET6 available check */
10647#include <sys/types.h>
10648#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010649int
10650main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010651{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010652int domain = AF_INET6;
10653 ;
10654 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010655}
Martin v. Löwis11437992002-04-12 09:54:03 +000010656_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010657if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10660$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010662
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010663else
Matthias Kloseb159a552010-04-25 21:00:44 +000010664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10666$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010667 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010672if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10674$as_echo_n "checking if RFC2553 API is available... " >&6; }
10675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010676/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010677
10678 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010679#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010680int
10681main ()
10682{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010683struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010684 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010685 ;
10686 return 0;
10687}
Matthias Kloseb159a552010-04-25 21:00:44 +000010688
Martin v. Löwis11437992002-04-12 09:54:03 +000010689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010690if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010691
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010693$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010694 ipv6=yes
10695
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010696else
Matthias Kloseb159a552010-04-25 21:00:44 +000010697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010700 ipv6=no
10701
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010704fi
10705
10706if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010708
10709fi
10710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711fi
10712
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713
10714ipv6type=unknown
10715ipv6lib=none
10716ipv6trylibc=no
10717
10718if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10720$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010721 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10722 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723 case $i in
10724 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010726/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728#include <netinet/in.h>
10729#ifdef IPV6_INRIA_VERSION
10730yes
10731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010732_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010735 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010737rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738
10739 ;;
10740 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010743
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744#include <netinet/in.h>
10745#ifdef __KAME__
10746yes
10747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751 ipv6type=$i;
10752 ipv6lib=inet6
10753 ipv6libdir=/usr/local/v6/lib
10754 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010756rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757
10758 ;;
10759 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010762
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763#include <features.h>
10764#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10765yes
10766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770 ipv6type=$i;
10771 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010773rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774
10775 ;;
10776 linux-inet6)
10777 if test -d /usr/inet6; then
10778 ipv6type=$i
10779 ipv6lib=inet6
10780 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010781 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782 fi
10783 ;;
10784 solaris)
10785 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010786 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010787 ipv6type=$i
10788 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789 fi
10790 fi
10791 ;;
10792 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010794/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010795
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796#include <sys/param.h>
10797#ifdef _TOSHIBA_INET6
10798yes
10799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803 ipv6type=$i;
10804 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010805 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010807rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808
10809 ;;
10810 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010813
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814#include </usr/local/v6/include/sys/v6config.h>
10815#ifdef __V6D__
10816yes
10817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010818_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821 ipv6type=$i;
10822 ipv6lib=v6;
10823 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010824 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010826rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827
10828 ;;
10829 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010831/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010832
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833#include <sys/param.h>
10834#ifdef _ZETA_MINAMI_INET6
10835yes
10836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010837_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840 ipv6type=$i;
10841 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010842 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010844rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010845
10846 ;;
10847 esac
10848 if test "$ipv6type" != "unknown"; then
10849 break
10850 fi
10851 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10853$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854fi
10855
10856if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10857 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10858 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10859 echo "using lib$ipv6lib"
10860 else
10861 if test $ipv6trylibc = "yes"; then
10862 echo "using libc"
10863 else
10864 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10865 echo "You need to fetch lib$ipv6lib.a from appropriate"
10866 echo 'ipv6 kit and compile beforehand.'
10867 exit 1
10868 fi
10869 fi
10870fi
10871
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10873$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10875/* end confdefs.h. */
10876 /* CAN_RAW_FD_FRAMES available check */
10877#include <linux/can/raw.h>
10878int
10879main ()
10880{
10881int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10882 ;
10883 return 0;
10884}
10885_ACEOF
10886if ac_fn_c_try_compile "$LINENO"; then :
10887
10888
10889$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10890
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10892$as_echo "yes" >&6; }
10893
10894else
10895
10896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10897$as_echo "no" >&6; }
10898
10899fi
10900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10901
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010902# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10904$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010907if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010908 withval=$with_doc_strings;
10909fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010910
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010911
10912if test -z "$with_doc_strings"
10913then with_doc_strings="yes"
10914fi
10915if test "$with_doc_strings" != "no"
10916then
10917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010919
10920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10922$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010923
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010924# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10926$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010929if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930 withval=$with_pymalloc;
10931fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010932
Neil Schemenauera35c6882001-02-27 04:45:05 +000010933
Neil Schemenauer16c22972002-03-22 15:34:49 +000010934if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010935then
10936 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010937fi
10938if test "$with_pymalloc" != "no"
10939then
Martin v. Löwis11437992002-04-12 09:54:03 +000010940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010942
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010943 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10946$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010947
Nick Coghlan6ea41862017-06-11 13:16:15 +100010948# Check for --with-c-locale-coercion
10949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10950$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10951
10952# Check whether --with-c-locale-coercion was given.
10953if test "${with_c_locale_coercion+set}" = set; then :
10954 withval=$with_c_locale_coercion;
10955fi
10956
10957
10958if test -z "$with_c_locale_coercion"
10959then
10960 with_c_locale_coercion="yes"
10961fi
10962if test "$with_c_locale_coercion" != "no"
10963then
10964
10965$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10966
10967fi
10968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10969$as_echo "$with_c_locale_coercion" >&6; }
10970
10971# Check for --with-c-locale-warning
10972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10973$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10974
10975# Check whether --with-c-locale-warning was given.
10976if test "${with_c_locale_warning+set}" = set; then :
10977 withval=$with_c_locale_warning;
10978fi
10979
10980
10981if test -z "$with_c_locale_warning"
10982then
10983 with_c_locale_warning="yes"
10984fi
10985if test "$with_c_locale_warning" != "no"
10986then
10987
10988$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10989
10990fi
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10992$as_echo "$with_c_locale_warning" >&6; }
10993
Benjamin Peterson05159c42009-12-03 03:01:27 +000010994# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10996$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010997
10998# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010999if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011000 withval=$with_valgrind;
11001else
11002 with_valgrind=no
11003fi
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11006$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011007if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 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 +020011009if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011012
11013else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011014 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011015
11016fi
11017
11018
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011019 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011020fi
11021
Łukasz Langaa785c872016-09-09 17:37:37 -070011022# Check for DTrace support
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11024$as_echo_n "checking for --with-dtrace... " >&6; }
11025
11026# Check whether --with-dtrace was given.
11027if test "${with_dtrace+set}" = set; then :
11028 withval=$with_dtrace;
11029else
11030 with_dtrace=no
11031fi
11032
11033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11034$as_echo "$with_dtrace" >&6; }
11035
11036
11037
11038
11039
11040DTRACE=
11041DFLAGS=
11042DTRACE_HEADERS=
11043DTRACE_OBJS=
11044
11045if test "$with_dtrace" = "yes"
11046then
11047 # Extract the first word of "dtrace", so it can be a program name with args.
11048set dummy dtrace; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
11051if ${ac_cv_path_DTRACE+:} false; then :
11052 $as_echo_n "(cached) " >&6
11053else
11054 case $DTRACE in
11055 [\\/]* | ?:[\\/]*)
11056 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11057 ;;
11058 *)
11059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062 IFS=$as_save_IFS
11063 test -z "$as_dir" && as_dir=.
11064 for ac_exec_ext in '' $ac_executable_extensions; do
11065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068 break 2
11069 fi
11070done
11071 done
11072IFS=$as_save_IFS
11073
11074 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11075 ;;
11076esac
11077fi
11078DTRACE=$ac_cv_path_DTRACE
11079if test -n "$DTRACE"; then
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11081$as_echo "$DTRACE" >&6; }
11082else
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
11085fi
11086
11087
11088 if test "$DTRACE" = "not found"; then
11089 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11090 fi
11091
11092$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11093
11094 DTRACE_HEADERS="Include/pydtrace_probes.h"
11095
11096 # On OS X, DTrace providers do not need to be explicitly compiled and
11097 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11098 # generation flag '-G'. We check for presence of this flag, rather than
11099 # hardcoding support by OS, in the interest of robustness.
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11101$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11102if ${ac_cv_dtrace_link+:} false; then :
11103 $as_echo_n "(cached) " >&6
11104else
11105 ac_cv_dtrace_link=no
11106 echo 'BEGIN' > conftest.d
11107 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11108 ac_cv_dtrace_link=yes
11109
11110fi
11111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11112$as_echo "$ac_cv_dtrace_link" >&6; }
11113 if test "$ac_cv_dtrace_link" = "yes"; then
11114 DTRACE_OBJS="Python/pydtrace.o"
11115 fi
11116fi
11117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011118# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011119
Guido van Rossum98935bf2001-09-05 19:13:16 +000011120DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011121
Guido van Rossume97ee181999-12-20 21:27:22 +000011122# the dlopen() function means we might want to use dynload_shlib.o. some
11123# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011124for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011125do :
11126 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011127if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011129#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011130_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011131
Guido van Rossume97ee181999-12-20 21:27:22 +000011132fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011133done
Guido van Rossume97ee181999-12-20 21:27:22 +000011134
Michael W. Hudson54241132001-12-07 15:38:26 +000011135
Guido van Rossume97ee181999-12-20 21:27:22 +000011136# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11137# loading of modules.
11138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11140$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011141if test -z "$DYNLOADFILE"
11142then
11143 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011144 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11145 if test "$ac_cv_func_dlopen" = yes
11146 then DYNLOADFILE="dynload_shlib.o"
11147 else DYNLOADFILE="dynload_aix.o"
11148 fi
11149 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011150 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011151 *)
11152 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11153 # out any dynamic loading
11154 if test "$ac_cv_func_dlopen" = yes
11155 then DYNLOADFILE="dynload_shlib.o"
11156 else DYNLOADFILE="dynload_stub.o"
11157 fi
11158 ;;
11159 esac
11160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11162$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011163if test "$DYNLOADFILE" != "dynload_stub.o"
11164then
Martin v. Löwis11437992002-04-12 09:54:03 +000011165
Matthias Kloseb9621712010-04-24 17:59:49 +000011166$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011167
11168fi
11169
Neil Schemenauer4e425612001-06-19 15:44:15 +000011170# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11171
Michael W. Hudson54241132001-12-07 15:38:26 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11174$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011175if test -z "$MACHDEP_OBJS"
11176then
Jack Jansene578a632001-08-15 01:27:14 +000011177 MACHDEP_OBJS=$extra_machdep_objs
11178else
11179 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011180fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011181if test -z "$MACHDEP_OBJS"; then
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11183$as_echo "none" >&6; }
11184else
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11186$as_echo "$MACHDEP_OBJS" >&6; }
11187fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011188
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011190for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011191 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011192 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011193 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011194 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011195 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011196 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011197 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011198 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011199 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011200 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011201 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011202 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011203 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011204 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011205 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11206 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011207 sigaction sigaltstack siginterrupt sigpending sigrelse \
11208 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011209 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011210 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011211 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011212do :
11213 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11214ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011215if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011217#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011218_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011219
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011220fi
11221done
11222
Michael W. Hudson54241132001-12-07 15:38:26 +000011223
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011224ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11225 #include <dirent.h>
11226"
11227if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11228
11229$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11230
11231fi
11232
11233
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011234# For some functions, having a definition is not sufficient, since
11235# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11237$as_echo_n "checking for chroot... " >&6; }
11238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011240#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011241int
11242main ()
11243{
11244void *x=chroot
11245 ;
11246 return 0;
11247}
11248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011252
Matthias Kloseb159a552010-04-25 21:00:44 +000011253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011254$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011255else
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11257$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011258
11259fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11262$as_echo_n "checking for link... " >&6; }
11263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011265#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011266int
11267main ()
11268{
11269void *x=link
11270 ;
11271 return 0;
11272}
11273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011277
Matthias Kloseb159a552010-04-25 21:00:44 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011279$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011280else
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011283
11284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11287$as_echo_n "checking for symlink... " >&6; }
11288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011290#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011291int
11292main ()
11293{
11294void *x=symlink
11295 ;
11296 return 0;
11297}
11298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011300
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011302
Matthias Kloseb159a552010-04-25 21:00:44 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011304$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011308
11309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11312$as_echo_n "checking for fchdir... " >&6; }
11313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011315#include <unistd.h>
11316int
11317main ()
11318{
11319void *x=fchdir
11320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011330else
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011333
11334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11337$as_echo_n "checking for fsync... " >&6; }
11338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011340#include <unistd.h>
11341int
11342main ()
11343{
11344void *x=fsync
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011352
Matthias Kloseb159a552010-04-25 21:00:44 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011355else
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011358
11359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11362$as_echo_n "checking for fdatasync... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011365#include <unistd.h>
11366int
11367main ()
11368{
11369void *x=fdatasync
11370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011377
Matthias Kloseb159a552010-04-25 21:00:44 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380else
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011383
11384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11387$as_echo_n "checking for epoll... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011389/* end confdefs.h. */
11390#include <sys/epoll.h>
11391int
11392main ()
11393{
11394void *x=epoll_create
11395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011400
Matthias Kloseb9621712010-04-24 17:59:49 +000011401$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011402
Matthias Kloseb159a552010-04-25 21:00:44 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011405else
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011408
11409fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11412$as_echo_n "checking for epoll_create1... " >&6; }
11413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11414/* end confdefs.h. */
11415#include <sys/epoll.h>
11416int
11417main ()
11418{
11419void *x=epoll_create1
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424if ac_fn_c_try_compile "$LINENO"; then :
11425
11426$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11427
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11429$as_echo "yes" >&6; }
11430else
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
11433
11434fi
11435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11437$as_echo_n "checking for kqueue... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011439/* end confdefs.h. */
11440
11441#include <sys/types.h>
11442#include <sys/event.h>
11443
11444int
11445main ()
11446{
11447int x=kqueue()
11448 ;
11449 return 0;
11450}
11451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011452if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011455
Matthias Kloseb159a552010-04-25 21:00:44 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011457$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011458else
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011461
11462fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11465$as_echo_n "checking for prlimit... " >&6; }
11466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11467/* end confdefs.h. */
11468
11469#include <sys/time.h>
11470#include <sys/resource.h>
11471
11472int
11473main ()
11474{
11475void *x=prlimit
11476 ;
11477 return 0;
11478}
11479_ACEOF
11480if ac_fn_c_try_compile "$LINENO"; then :
11481
11482$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11483
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11485$as_echo "yes" >&6; }
11486else
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
11489
11490fi
11491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11492
Martin v. Löwisd5843682002-11-21 20:41:28 +000011493# On some systems (eg. FreeBSD 5), we would find a definition of the
11494# functions ctermid_r, setgroups in the library, but no prototype
11495# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11496# address to avoid compiler warnings and potential miscompilations
11497# because of the missing prototypes.
11498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11500$as_echo_n "checking for ctermid_r... " >&6; }
11501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011502/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011503
Martin v. Löwisd5843682002-11-21 20:41:28 +000011504#include <stdio.h>
11505
Martin v. Löwisd5843682002-11-21 20:41:28 +000011506int
11507main ()
11508{
11509void* p = ctermid_r
11510 ;
11511 return 0;
11512}
11513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011515
Matthias Kloseb9621712010-04-24 17:59:49 +000011516$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011517
Matthias Kloseb159a552010-04-25 21:00:44 +000011518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011523
11524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11526
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11528$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011529if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011530 $as_echo_n "(cached) " >&6
11531else
11532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011533/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011534#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011535int
11536main ()
11537{
11538void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011539
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011540 ;
11541 return 0;
11542}
11543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011544if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011545 ac_cv_flock_decl=yes
11546else
11547 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011548
11549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011551
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011552fi
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11554$as_echo "$ac_cv_flock_decl" >&6; }
11555if test "x${ac_cv_flock_decl}" = xyes; then
11556 for ac_func in flock
11557do :
11558 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011559if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011560 cat >>confdefs.h <<_ACEOF
11561#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011562_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011563
Antoine Pitroua3000072010-09-07 14:52:42 +000011564else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011566$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011567if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011568 $as_echo_n "(cached) " >&6
11569else
11570 ac_check_lib_save_LIBS=$LIBS
11571LIBS="-lbsd $LIBS"
11572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11573/* end confdefs.h. */
11574
11575/* Override any GCC internal prototype to avoid an error.
11576 Use char because int might match the return type of a GCC
11577 builtin and then its argument prototype would still apply. */
11578#ifdef __cplusplus
11579extern "C"
11580#endif
11581char flock ();
11582int
11583main ()
11584{
11585return flock ();
11586 ;
11587 return 0;
11588}
11589_ACEOF
11590if ac_fn_c_try_link "$LINENO"; then :
11591 ac_cv_lib_bsd_flock=yes
11592else
11593 ac_cv_lib_bsd_flock=no
11594fi
11595rm -f core conftest.err conftest.$ac_objext \
11596 conftest$ac_exeext conftest.$ac_ext
11597LIBS=$ac_check_lib_save_LIBS
11598fi
11599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11600$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011601if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011602 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011603
11604
11605$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11606
11607
11608fi
11609
11610
11611fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011612done
11613
Antoine Pitroua3000072010-09-07 14:52:42 +000011614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11617$as_echo_n "checking for getpagesize... " >&6; }
11618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011620
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011621#include <unistd.h>
11622
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011623int
11624main ()
11625{
11626void* p = getpagesize
11627 ;
11628 return 0;
11629}
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011634
Matthias Kloseb159a552010-04-25 21:00:44 +000011635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011636$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011637else
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11639$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011640
11641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011643
Victor Stinner984890f2011-11-24 13:53:38 +010011644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11645$as_echo_n "checking for broken unsetenv... " >&6; }
11646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11647/* end confdefs.h. */
11648
11649#include <stdlib.h>
11650
11651int
11652main ()
11653{
11654int res = unsetenv("DUMMY")
11655 ;
11656 return 0;
11657}
11658_ACEOF
11659if ac_fn_c_try_compile "$LINENO"; then :
11660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11661$as_echo "no" >&6; }
11662else
11663
11664$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11665
11666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11667$as_echo "yes" >&6; }
11668
11669fi
11670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11671
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011672for ac_prog in true
11673do
11674 # Extract the first word of "$ac_prog", so it can be a program name with args.
11675set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11677$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011678if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011680else
11681 if test -n "$TRUE"; then
11682 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11683else
11684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11685for as_dir in $PATH
11686do
11687 IFS=$as_save_IFS
11688 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011691 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 $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 +000011693 break 2
11694 fi
11695done
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011698
11699fi
11700fi
11701TRUE=$ac_cv_prog_TRUE
11702if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11704$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011708fi
11709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011710
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011711 test -n "$TRUE" && break
11712done
11713test -n "$TRUE" || TRUE="/bin/true"
11714
11715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11717$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011718if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011720else
11721 ac_check_lib_save_LIBS=$LIBS
11722LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011724/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726/* Override any GCC internal prototype to avoid an error.
11727 Use char because int might match the return type of a GCC
11728 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011729#ifdef __cplusplus
11730extern "C"
11731#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011732char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011733int
11734main ()
11735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011737 ;
11738 return 0;
11739}
11740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011742 ac_cv_lib_c_inet_aton=yes
11743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011746rm -f core conftest.err conftest.$ac_objext \
11747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011748LIBS=$ac_check_lib_save_LIBS
11749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11751$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011752if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011753 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11756$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011757if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011759else
11760 ac_check_lib_save_LIBS=$LIBS
11761LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011763/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765/* Override any GCC internal prototype to avoid an error.
11766 Use char because int might match the return type of a GCC
11767 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011768#ifdef __cplusplus
11769extern "C"
11770#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011771char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772int
11773main ()
11774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776 ;
11777 return 0;
11778}
11779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011781 ac_cv_lib_resolv_inet_aton=yes
11782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011785rm -f core conftest.err conftest.$ac_objext \
11786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011787LIBS=$ac_check_lib_save_LIBS
11788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11790$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011791if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792 cat >>confdefs.h <<_ACEOF
11793#define HAVE_LIBRESOLV 1
11794_ACEOF
11795
11796 LIBS="-lresolv $LIBS"
11797
11798fi
11799
11800
11801fi
11802
11803
Christian Heimesd0764e22007-12-04 15:00:33 +000011804# On Tru64, chflags seems to be present, but calling it will
11805# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11807$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011808if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011812 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011815/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011816
Christian Heimesd0764e22007-12-04 15:00:33 +000011817#include <sys/stat.h>
11818#include <unistd.h>
11819int main(int argc, char*argv[])
11820{
11821 if(chflags(argv[0], 0) != 0)
11822 return 1;
11823 return 0;
11824}
Ned Deily3eb67d52011-06-28 00:00:28 -070011825
Christian Heimesd0764e22007-12-04 15:00:33 +000011826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011828 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011834fi
11835
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11839$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011840if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011842if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011843 ac_cv_have_chflags="yes"
11844else
11845 ac_cv_have_chflags="no"
11846fi
11847
11848fi
11849if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011852
11853fi
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11856$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011857if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011859else
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011861 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011864/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011865
Christian Heimesd0764e22007-12-04 15:00:33 +000011866#include <sys/stat.h>
11867#include <unistd.h>
11868int main(int argc, char*argv[])
11869{
11870 if(lchflags(argv[0], 0) != 0)
11871 return 1;
11872 return 0;
11873}
Ned Deily3eb67d52011-06-28 00:00:28 -070011874
Christian Heimesd0764e22007-12-04 15:00:33 +000011875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011877 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011883fi
11884
11885
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11888$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011889if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011891if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011892 ac_cv_have_lchflags="yes"
11893else
11894 ac_cv_have_lchflags="no"
11895fi
11896
11897fi
11898if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011901
11902fi
11903
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011904case $ac_sys_system/$ac_sys_release in
11905Darwin/*)
11906 _CUR_CFLAGS="${CFLAGS}"
11907 _CUR_LDFLAGS="${LDFLAGS}"
11908 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11909 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11910 ;;
11911esac
11912
Matthias Kloseb9621712010-04-24 17:59:49 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11914$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011915if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011917else
11918 ac_check_lib_save_LIBS=$LIBS
11919LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011921/* end confdefs.h. */
11922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923/* Override any GCC internal prototype to avoid an error.
11924 Use char because int might match the return type of a GCC
11925 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011926#ifdef __cplusplus
11927extern "C"
11928#endif
11929char inflateCopy ();
11930int
11931main ()
11932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011933return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011934 ;
11935 return 0;
11936}
11937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011938if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011939 ac_cv_lib_z_inflateCopy=yes
11940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011943rm -f core conftest.err conftest.$ac_objext \
11944 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011945LIBS=$ac_check_lib_save_LIBS
11946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11948$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011949if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011952
11953fi
11954
11955
11956case $ac_sys_system/$ac_sys_release in
11957Darwin/*)
11958 CFLAGS="${_CUR_CFLAGS}"
11959 LDFLAGS="${_CUR_LDFLAGS}"
11960 ;;
11961esac
11962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11964$as_echo_n "checking for hstrerror... " >&6; }
11965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011966/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011967
Martin v. Löwise9416172003-05-03 10:12:45 +000011968#include <netdb.h>
11969
Martin v. Löwise9416172003-05-03 10:12:45 +000011970int
11971main ()
11972{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011973void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011974 ;
11975 return 0;
11976}
11977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011978if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011981
Matthias Kloseb159a552010-04-25 21:00:44 +000011982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011983$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011987
11988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011989rm -f core conftest.err conftest.$ac_objext \
11990 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991
Matthias Kloseb9621712010-04-24 17:59:49 +000011992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11993$as_echo_n "checking for inet_aton... " >&6; }
11994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011995/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011996
Martin v. Löwis86d66262006-02-17 08:40:11 +000011997#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011998#include <sys/socket.h>
11999#include <netinet/in.h>
12000#include <arpa/inet.h>
12001
Martin v. Löwise9416172003-05-03 10:12:45 +000012002int
12003main ()
12004{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012005void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012006 ;
12007 return 0;
12008}
12009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012011
Matthias Kloseb9621712010-04-24 17:59:49 +000012012$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012013
Matthias Kloseb159a552010-04-25 21:00:44 +000012014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012015$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012016else
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12018$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012019
12020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012021rm -f core conftest.err conftest.$ac_objext \
12022 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12025$as_echo_n "checking for inet_pton... " >&6; }
12026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012027/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012028
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012029#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012030#include <sys/socket.h>
12031#include <netinet/in.h>
12032#include <arpa/inet.h>
12033
Martin v. Löwise9416172003-05-03 10:12:45 +000012034int
12035main ()
12036{
12037void* p = inet_pton
12038 ;
12039 return 0;
12040}
12041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012045
Matthias Kloseb159a552010-04-25 21:00:44 +000012046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012047$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012048else
Matthias Kloseb9621712010-04-24 17:59:49 +000012049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12050$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012051
12052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012054
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012055# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12057$as_echo_n "checking for setgroups... " >&6; }
12058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012059/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012060
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012061#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012062#ifdef HAVE_GRP_H
12063#include <grp.h>
12064#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012065
Martin v. Löwisd5843682002-11-21 20:41:28 +000012066int
12067main ()
12068{
12069void* p = setgroups
12070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012075
Matthias Kloseb9621712010-04-24 17:59:49 +000012076$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012077
Matthias Kloseb159a552010-04-25 21:00:44 +000012078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012079$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012080else
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12082$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012083
12084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012086
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012087# check for openpty and forkpty
12088
12089for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012090do :
12091 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012092if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012095_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012096
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12099$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012102else
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012104LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108/* Override any GCC internal prototype to avoid an error.
12109 Use char because int might match the return type of a GCC
12110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012111#ifdef __cplusplus
12112extern "C"
12113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012114char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012115int
12116main ()
12117{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012119 ;
12120 return 0;
12121}
12122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012128rm -f core conftest.err conftest.$ac_objext \
12129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012130LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12133$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012134if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012136 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12139$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012142else
12143 ac_check_lib_save_LIBS=$LIBS
12144LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012146/* end confdefs.h. */
12147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148/* Override any GCC internal prototype to avoid an error.
12149 Use char because int might match the return type of a GCC
12150 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012151#ifdef __cplusplus
12152extern "C"
12153#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012154char openpty ();
12155int
12156main ()
12157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012159 ;
12160 return 0;
12161}
12162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012164 ac_cv_lib_bsd_openpty=yes
12165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012168rm -f core conftest.err conftest.$ac_objext \
12169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170LIBS=$ac_check_lib_save_LIBS
12171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12173$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012174if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012176 LIBS="$LIBS -lbsd"
12177fi
12178
12179
12180fi
12181
Fred Drake8cef4cf2000-06-28 16:40:38 +000012182
12183fi
12184done
12185
12186for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012187do :
12188 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012189if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012190 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012192_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012193
Fred Drake8cef4cf2000-06-28 16:40:38 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12196$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012199else
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012201LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205/* Override any GCC internal prototype to avoid an error.
12206 Use char because int might match the return type of a GCC
12207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012208#ifdef __cplusplus
12209extern "C"
12210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012211char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012212int
12213main ()
12214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 ;
12217 return 0;
12218}
12219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012225rm -f core conftest.err conftest.$ac_objext \
12226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012227LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12230$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012231if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012233 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012234else
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12236$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012239else
12240 ac_check_lib_save_LIBS=$LIBS
12241LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012243/* end confdefs.h. */
12244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245/* Override any GCC internal prototype to avoid an error.
12246 Use char because int might match the return type of a GCC
12247 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012248#ifdef __cplusplus
12249extern "C"
12250#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012251char forkpty ();
12252int
12253main ()
12254{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012256 ;
12257 return 0;
12258}
12259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012261 ac_cv_lib_bsd_forkpty=yes
12262else
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012265rm -f core conftest.err conftest.$ac_objext \
12266 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012267LIBS=$ac_check_lib_save_LIBS
12268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12270$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012271if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012273 LIBS="$LIBS -lbsd"
12274fi
12275
12276
12277fi
12278
Fred Drake8cef4cf2000-06-28 16:40:38 +000012279
12280fi
12281done
12282
Jack Jansendd19cf82001-12-06 22:36:17 +000012283
Michael W. Hudson54241132001-12-07 15:38:26 +000012284# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012286do :
12287 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12288ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012289if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012292_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012293
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012294fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012295done
12296
Michael W. Hudson54241132001-12-07 15:38:26 +000012297
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012298ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012299if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012300 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012301
Martin v. Löwis1142de32002-03-29 16:28:31 +000012302else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012304 *" dup2.$ac_objext "* ) ;;
12305 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012307esac
12308
Martin v. Löwis1142de32002-03-29 16:28:31 +000012309fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012310
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012311ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012312if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012313 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12314
12315else
12316 case " $LIBOBJS " in
12317 *" strdup.$ac_objext "* ) ;;
12318 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12319 ;;
12320esac
12321
12322fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012323
12324
12325for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012326do :
12327 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012329 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012330#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012333/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012334#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012335int
12336main ()
12337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 ;
12340 return 0;
12341}
12342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
Matthias Kloseb9621712010-04-24 17:59:49 +000012345$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012346
Guido van Rossum627b2d71993-12-24 10:39:16 +000012347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012349
Guido van Rossum627b2d71993-12-24 10:39:16 +000012350fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012351done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012352
Jack Jansen150753c2003-03-29 22:07:47 +000012353for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012354do :
12355 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012356if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012357 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012361/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012362#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012363int
12364main ()
12365{
12366setpgrp(0,0);
12367 ;
12368 return 0;
12369}
12370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012374
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012377
12378fi
12379done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012380
Thomas Wouters3a584202000-08-05 23:28:51 +000012381for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012382do :
12383 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012384if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012385 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012386#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012389/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012390#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012391int
12392main ()
12393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 ;
12396 return 0;
12397}
12398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012399if ac_fn_c_try_compile "$LINENO"; then :
12400
Guido van Rossum627b2d71993-12-24 10:39:16 +000012401else
Skip Montanaro6dead952003-09-25 14:50:04 +000012402
Matthias Kloseb9621712010-04-24 17:59:49 +000012403$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012404
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Guido van Rossum627b2d71993-12-24 10:39:16 +000012406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012408
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012410done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411
Michael W. Hudson54241132001-12-07 15:38:26 +000012412
Victor Stinnere0be4232011-10-25 13:06:09 +020012413for ac_func in clock_gettime
12414do :
12415 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12416if test "x$ac_cv_func_clock_gettime" = xyes; then :
12417 cat >>confdefs.h <<_ACEOF
12418#define HAVE_CLOCK_GETTIME 1
12419_ACEOF
12420
12421else
12422
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12424$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12425if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12426 $as_echo_n "(cached) " >&6
12427else
12428 ac_check_lib_save_LIBS=$LIBS
12429LIBS="-lrt $LIBS"
12430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12431/* end confdefs.h. */
12432
12433/* Override any GCC internal prototype to avoid an error.
12434 Use char because int might match the return type of a GCC
12435 builtin and then its argument prototype would still apply. */
12436#ifdef __cplusplus
12437extern "C"
12438#endif
12439char clock_gettime ();
12440int
12441main ()
12442{
12443return clock_gettime ();
12444 ;
12445 return 0;
12446}
12447_ACEOF
12448if ac_fn_c_try_link "$LINENO"; then :
12449 ac_cv_lib_rt_clock_gettime=yes
12450else
12451 ac_cv_lib_rt_clock_gettime=no
12452fi
12453rm -f core conftest.err conftest.$ac_objext \
12454 conftest$ac_exeext conftest.$ac_ext
12455LIBS=$ac_check_lib_save_LIBS
12456fi
12457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12458$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12459if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12460
Victor Stinner7efb8332014-08-29 15:41:08 +020012461 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012462 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12463
12464
12465$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12466
12467
12468fi
12469
12470
12471fi
12472done
12473
12474
12475for ac_func in clock_getres
12476do :
12477 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12478if test "x$ac_cv_func_clock_getres" = xyes; then :
12479 cat >>confdefs.h <<_ACEOF
12480#define HAVE_CLOCK_GETRES 1
12481_ACEOF
12482
12483else
12484
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12486$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12487if ${ac_cv_lib_rt_clock_getres+:} false; then :
12488 $as_echo_n "(cached) " >&6
12489else
12490 ac_check_lib_save_LIBS=$LIBS
12491LIBS="-lrt $LIBS"
12492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493/* end confdefs.h. */
12494
12495/* Override any GCC internal prototype to avoid an error.
12496 Use char because int might match the return type of a GCC
12497 builtin and then its argument prototype would still apply. */
12498#ifdef __cplusplus
12499extern "C"
12500#endif
12501char clock_getres ();
12502int
12503main ()
12504{
12505return clock_getres ();
12506 ;
12507 return 0;
12508}
12509_ACEOF
12510if ac_fn_c_try_link "$LINENO"; then :
12511 ac_cv_lib_rt_clock_getres=yes
12512else
12513 ac_cv_lib_rt_clock_getres=no
12514fi
12515rm -f core conftest.err conftest.$ac_objext \
12516 conftest$ac_exeext conftest.$ac_ext
12517LIBS=$ac_check_lib_save_LIBS
12518fi
12519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12520$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12521if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12522
12523 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12524
12525
12526fi
12527
12528
12529fi
12530done
12531
12532
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012533for ac_func in clock_settime
12534do :
12535 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12536if test "x$ac_cv_func_clock_settime" = xyes; then :
12537 cat >>confdefs.h <<_ACEOF
12538#define HAVE_CLOCK_SETTIME 1
12539_ACEOF
12540
12541else
12542
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12544$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12545if ${ac_cv_lib_rt_clock_settime+:} false; then :
12546 $as_echo_n "(cached) " >&6
12547else
12548 ac_check_lib_save_LIBS=$LIBS
12549LIBS="-lrt $LIBS"
12550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551/* end confdefs.h. */
12552
12553/* Override any GCC internal prototype to avoid an error.
12554 Use char because int might match the return type of a GCC
12555 builtin and then its argument prototype would still apply. */
12556#ifdef __cplusplus
12557extern "C"
12558#endif
12559char clock_settime ();
12560int
12561main ()
12562{
12563return clock_settime ();
12564 ;
12565 return 0;
12566}
12567_ACEOF
12568if ac_fn_c_try_link "$LINENO"; then :
12569 ac_cv_lib_rt_clock_settime=yes
12570else
12571 ac_cv_lib_rt_clock_settime=no
12572fi
12573rm -f core conftest.err conftest.$ac_objext \
12574 conftest$ac_exeext conftest.$ac_ext
12575LIBS=$ac_check_lib_save_LIBS
12576fi
12577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12578$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12579if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12580
12581 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12582
12583
12584fi
12585
12586
12587fi
12588done
12589
12590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12592$as_echo_n "checking for major... " >&6; }
12593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012594/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012595
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012596#if defined(MAJOR_IN_MKDEV)
12597#include <sys/mkdev.h>
12598#elif defined(MAJOR_IN_SYSMACROS)
12599#include <sys/sysmacros.h>
12600#else
12601#include <sys/types.h>
12602#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012603
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012604int
12605main ()
12606{
12607
12608 makedev(major(0),minor(0));
12609
12610 ;
12611 return 0;
12612}
12613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012615
12616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012618
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12620$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012621
12622else
Skip Montanaro6dead952003-09-25 14:50:04 +000012623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12625$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012626
12627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012628rm -f core conftest.err conftest.$ac_objext \
12629 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012630
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012631# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012632# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12634$as_echo_n "checking for getaddrinfo... " >&6; }
12635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012637
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012638#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012639#include <sys/socket.h>
12640#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012641#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012642
Martin v. Löwis11437992002-04-12 09:54:03 +000012643int
12644main ()
12645{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012646getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 ;
12648 return 0;
12649}
12650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012651if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012652 have_getaddrinfo=yes
12653else
Matthias Kloseb9621712010-04-24 17:59:49 +000012654 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012656rm -f core conftest.err conftest.$ac_objext \
12657 conftest$ac_exeext conftest.$ac_ext
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12659$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012660if test $have_getaddrinfo = yes
12661then
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12663$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012664 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012666else
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012668
12669if test "${enable_ipv6+set}" = set; then
12670 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12671else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012672 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012673fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012674else
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012677
Stefan Krah19c21392012-11-22 23:47:32 +010012678#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012679#include <sys/types.h>
12680#include <netdb.h>
12681#include <string.h>
12682#include <sys/socket.h>
12683#include <netinet/in.h>
12684
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012685int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012686{
12687 int passive, gaierr, inet4 = 0, inet6 = 0;
12688 struct addrinfo hints, *ai, *aitop;
12689 char straddr[INET6_ADDRSTRLEN], strport[16];
12690
12691 for (passive = 0; passive <= 1; passive++) {
12692 memset(&hints, 0, sizeof(hints));
12693 hints.ai_family = AF_UNSPEC;
12694 hints.ai_flags = passive ? AI_PASSIVE : 0;
12695 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012696 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012697 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12698 (void)gai_strerror(gaierr);
12699 goto bad;
12700 }
12701 for (ai = aitop; ai; ai = ai->ai_next) {
12702 if (ai->ai_addr == NULL ||
12703 ai->ai_addrlen == 0 ||
12704 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12705 straddr, sizeof(straddr), strport, sizeof(strport),
12706 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12707 goto bad;
12708 }
12709 switch (ai->ai_family) {
12710 case AF_INET:
12711 if (strcmp(strport, "54321") != 0) {
12712 goto bad;
12713 }
12714 if (passive) {
12715 if (strcmp(straddr, "0.0.0.0") != 0) {
12716 goto bad;
12717 }
12718 } else {
12719 if (strcmp(straddr, "127.0.0.1") != 0) {
12720 goto bad;
12721 }
12722 }
12723 inet4++;
12724 break;
12725 case AF_INET6:
12726 if (strcmp(strport, "54321") != 0) {
12727 goto bad;
12728 }
12729 if (passive) {
12730 if (strcmp(straddr, "::") != 0) {
12731 goto bad;
12732 }
12733 } else {
12734 if (strcmp(straddr, "::1") != 0) {
12735 goto bad;
12736 }
12737 }
12738 inet6++;
12739 break;
12740 case AF_UNSPEC:
12741 goto bad;
12742 break;
12743 default:
12744 /* another family support? */
12745 break;
12746 }
12747 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012748 freeaddrinfo(aitop);
12749 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012750 }
12751
12752 if (!(inet4 == 0 || inet4 == 2))
12753 goto bad;
12754 if (!(inet6 == 0 || inet6 == 2))
12755 goto bad;
12756
12757 if (aitop)
12758 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012759 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760
12761 bad:
12762 if (aitop)
12763 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012764 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012765}
12766
Martin v. Löwis11437992002-04-12 09:54:03 +000012767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012768if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012769 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012770else
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012777fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12782$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12783
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012784if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012785then
12786 if test $ipv6 = yes
12787 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012788 echo 'Fatal: You must get working getaddrinfo() function.'
12789 echo ' or you can specify "--disable-ipv6"'.
12790 exit 1
12791 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012792else
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
Matthias Kloseb9621712010-04-24 17:59:49 +000012794$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012795
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012796fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012797
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012798for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012799do :
12800 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012801if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012803#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012804_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012805
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012806fi
12807done
12808
Michael W. Hudson54241132001-12-07 15:38:26 +000012809
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012810# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12812$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012813if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012817/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012818#include <sys/types.h>
12819#include <sys/time.h>
12820#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822int
12823main ()
12824{
12825if ((struct tm *) 0)
12826return 0;
12827 ;
12828 return 0;
12829}
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12839$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012840if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012843
12844fi
12845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12847$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012848if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850else
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012852/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012853#include <sys/types.h>
12854#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012855
Martin v. Löwis11437992002-04-12 09:54:03 +000012856int
12857main ()
12858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859struct tm tm;
12860 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ;
12863 return 0;
12864}
12865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012866if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012867 ac_cv_struct_tm=time.h
12868else
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12874$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012875if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012876
Matthias Kloseb9621712010-04-24 17:59:49 +000012877$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878
12879fi
12880
Matthias Kloseb9621712010-04-24 17:59:49 +000012881ac_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 +000012882#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884"
Victor Stinnere0be4232011-10-25 13:06:09 +020012885if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
12887cat >>confdefs.h <<_ACEOF
12888#define HAVE_STRUCT_TM_TM_ZONE 1
12889_ACEOF
12890
12891
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012892fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012893
Martin v. Löwis11437992002-04-12 09:54:03 +000012894if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012897
12898else
Matthias Kloseb9621712010-04-24 17:59:49 +000012899 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12900"
Victor Stinnere0be4232011-10-25 13:06:09 +020012901if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012903else
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905fi
12906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012908#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909_ACEOF
12910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12912$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012913if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012917/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012918#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919#if !HAVE_DECL_TZNAME
12920extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Martin v. Löwis11437992002-04-12 09:54:03 +000012923int
12924main ()
12925{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 ;
12928 return 0;
12929}
12930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012931if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012932 ac_cv_var_tzname=yes
12933else
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012936rm -f core conftest.err conftest.$ac_objext \
12937 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12940$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012941 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012944
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945 fi
12946fi
12947
Matthias Kloseb9621712010-04-24 17:59:49 +000012948ac_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 +020012949if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
12951cat >>confdefs.h <<_ACEOF
12952#define HAVE_STRUCT_STAT_ST_RDEV 1
12953_ACEOF
12954
12955
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012956fi
12957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958ac_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 +020012959if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012960
Martin v. Löwis11437992002-04-12 09:54:03 +000012961cat >>confdefs.h <<_ACEOF
12962#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12963_ACEOF
12964
12965
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012966fi
12967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968ac_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 +020012969if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012970
12971cat >>confdefs.h <<_ACEOF
12972#define HAVE_STRUCT_STAT_ST_FLAGS 1
12973_ACEOF
12974
12975
12976fi
12977
Matthias Kloseb9621712010-04-24 17:59:49 +000012978ac_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 +020012979if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012980
12981cat >>confdefs.h <<_ACEOF
12982#define HAVE_STRUCT_STAT_ST_GEN 1
12983_ACEOF
12984
12985
12986fi
12987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988ac_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 +020012989if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012990
12991cat >>confdefs.h <<_ACEOF
12992#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12993_ACEOF
12994
12995
12996fi
12997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998ac_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 +020012999if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001cat >>confdefs.h <<_ACEOF
13002#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13003_ACEOF
13004
13005
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013006fi
13007
Stefan Krah267b6392016-04-26 01:09:18 +020013008ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13009 #include <sys/types.h>
13010 #include <pwd.h>
13011
13012"
13013if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13014
13015cat >>confdefs.h <<_ACEOF
13016#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13017_ACEOF
13018
13019
13020fi
13021ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13022 #include <sys/types.h>
13023 #include <pwd.h>
13024
13025"
13026if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13027
13028cat >>confdefs.h <<_ACEOF
13029#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13030_ACEOF
13031
13032
13033fi
13034
Zachary Ware6a6967e2016-10-01 00:47:27 -050013035# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13036ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13037"
13038if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13039
13040cat >>confdefs.h <<_ACEOF
13041#define HAVE_SIGINFO_T_SI_BAND 1
13042_ACEOF
13043
13044
13045fi
13046
Michael W. Hudson54241132001-12-07 15:38:26 +000013047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13049$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013050if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013052else
Matthias Kloseb159a552010-04-25 21:00:44 +000013053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013055/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013056#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013057int
13058main ()
13059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013060return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 ;
13062 return 0;
13063}
13064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013065if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066 ac_cv_header_time_altzone=yes
13067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072fi
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13075$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013079
13080fi
13081
Guido van Rossumda88dad1995-01-26 00:46:29 +000013082was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13084$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013086/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013087
13088#include <sys/types.h>
13089#include <sys/select.h>
13090#include <sys/time.h>
13091
Martin v. Löwis11437992002-04-12 09:54:03 +000013092int
13093main ()
13094{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013095;
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 ;
13097 return 0;
13098}
13099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013101
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013104
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013105 was_it_defined=yes
13106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13110$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13113$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013114if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013116else
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013118/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013119#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013120int
13121main ()
13122{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013124 ;
13125 return 0;
13126}
13127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013128if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013129 ac_cv_struct_addrinfo=yes
13130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13137$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013141
13142fi
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13145$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013146if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013150/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013151
13152# include <sys/types.h>
13153# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013154int
13155main ()
13156{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 ;
13159 return 0;
13160}
13161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013163 ac_cv_struct_sockaddr_storage=yes
13164else
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13168fi
13169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13171$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013175
13176fi
13177
Christian Heimesdffa3942016-09-05 23:54:41 +020013178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13179$as_echo_n "checking for sockaddr_alg... " >&6; }
13180if ${ac_cv_struct_sockaddr_alg+:} false; then :
13181 $as_echo_n "(cached) " >&6
13182else
13183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13184/* end confdefs.h. */
13185
13186# include <sys/types.h>
13187# include <sys/socket.h>
13188# include <linux/if_alg.h>
13189int
13190main ()
13191{
13192struct sockaddr_alg s
13193 ;
13194 return 0;
13195}
13196_ACEOF
13197if ac_fn_c_try_compile "$LINENO"; then :
13198 ac_cv_struct_sockaddr_alg=yes
13199else
13200 ac_cv_struct_sockaddr_alg=no
13201fi
13202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13203fi
13204
13205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13206$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13207if test $ac_cv_struct_sockaddr_alg = yes; then
13208
13209$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13210
13211fi
13212
Guido van Rossum627b2d71993-12-24 10:39:16 +000013213# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13216$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013217if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013222$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013223int
13224main ()
13225{
13226static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013227test_array [0] = 0;
13228return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
13230 ;
13231 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013232}
Martin v. Löwis11437992002-04-12 09:54:03 +000013233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013235 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013236else
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13242$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013245
13246fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13249$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013250if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013252else
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013254/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255
Martin v. Löwis11437992002-04-12 09:54:03 +000013256int
13257main ()
13258{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013261 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013263 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013265 char const *const *pcpcc;
13266 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 /* NEC SVR4.0.2 mips cc rejects this. */
13268 struct point {int x, y;};
13269 static struct point const zero = {0,0};
13270 /* AIX XL C 1.02.0.0 rejects this.
13271 It does not let you subtract one const X* pointer from another in
13272 an arm of an if-expression whose if-part is not a constant
13273 expression */
13274 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013275 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013276 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277 ++pcpcc;
13278 ppc = (char**) pcpcc;
13279 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013280 { /* SCO 3.2v4 cc rejects this sort of thing. */
13281 char tx;
13282 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284
Martin v. Löwis11437992002-04-12 09:54:03 +000013285 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013286 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013287 }
13288 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13289 int x[] = {25, 17};
13290 const int *foo = &x[0];
13291 ++foo;
13292 }
13293 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13294 typedef const int *iptr;
13295 iptr p = 0;
13296 ++p;
13297 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013298 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013299 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013300 struct s { int j; const int *ap[3]; } bx;
13301 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 }
13303 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13304 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013308#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013309
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 ;
13311 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013312}
Martin v. Löwis11437992002-04-12 09:54:03 +000013313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315 ac_cv_c_const=yes
13316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13322$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013323if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326
13327fi
13328
Michael W. Hudson54241132001-12-07 15:38:26 +000013329
Guido van Rossumda88dad1995-01-26 00:46:29 +000013330works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13332$as_echo_n "checking for working signed char... " >&6; }
13333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013334/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336int
13337main ()
13338{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013339signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 ;
13341 return 0;
13342}
13343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013345 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013346else
Skip Montanaro6dead952003-09-25 14:50:04 +000013347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013349
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013350
Guido van Rossum7f43da71994-08-01 12:15:30 +000013351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13354$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013355
Guido van Rossumda88dad1995-01-26 00:46:29 +000013356have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13358$as_echo_n "checking for prototypes... " >&6; }
13359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013361int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013362int
13363main ()
13364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 ;
13367 return 0;
13368}
13369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
Matthias Kloseb159a552010-04-25 21:00:44 +000013374 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13378$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379
Guido van Rossumda88dad1995-01-26 00:46:29 +000013380works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13382$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013384/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013385
13386#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013387int foo(int x, ...) {
13388 va_list va;
13389 va_start(va, x);
13390 va_arg(va, int);
13391 va_arg(va, char *);
13392 va_arg(va, double);
13393 return 0;
13394}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013395
Martin v. Löwis11437992002-04-12 09:54:03 +000013396int
13397main ()
13398{
Guido van Rossum90eea071996-08-30 20:58:57 +000013399return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ;
13401 return 0;
13402}
13403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
13406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013409 works=yes
13410
Guido van Rossum627b2d71993-12-24 10:39:16 +000013411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13414$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415
Martin v. Löwisd6320502004-08-12 13:45:08 +000013416# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13418$as_echo_n "checking for socketpair... " >&6; }
13419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013420/* end confdefs.h. */
13421
13422#include <sys/types.h>
13423#include <sys/socket.h>
13424
13425int
13426main ()
13427{
13428void *x=socketpair
13429 ;
13430 return 0;
13431}
13432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013436
Matthias Kloseb159a552010-04-25 21:00:44 +000013437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013438$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13441$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013442
13443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013445
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013446# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13448$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013450/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013451#include <sys/types.h>
13452#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013453int
13454main ()
13455{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013456struct sockaddr x;
13457x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013458 ;
13459 return 0;
13460}
13461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013462if ac_fn_c_try_compile "$LINENO"; then :
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13464$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
Matthias Kloseb9621712010-04-24 17:59:49 +000013466$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013467
13468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13470$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013471
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013475# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
13477
Matthias Kloseb9621712010-04-24 17:59:49 +000013478ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013479if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13484$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013485 OLD_CFLAGS=$CFLAGS
13486 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013488/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013489
13490# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
Martin v. Löwis11437992002-04-12 09:54:03 +000013492int
13493main ()
13494{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013495
13496 char *name;
13497 struct hostent *he, *res;
13498 char buffer[2048];
13499 int buflen = 2048;
13500 int h_errnop;
13501
13502 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013503
13504 ;
13505 return 0;
13506}
13507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013511
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
Matthias Kloseb9621712010-04-24 17:59:49 +000013513$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13516$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013518else
Skip Montanaro6dead952003-09-25 14:50:04 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13521$as_echo "no" >&6; }
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13523$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013527# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013528
Martin v. Löwis11437992002-04-12 09:54:03 +000013529int
13530main ()
13531{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013532
13533 char *name;
13534 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013535 char buffer[2048];
13536 int buflen = 2048;
13537 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013538
Matthias Kloseb159a552010-04-25 21:00:44 +000013539 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
13541 ;
13542 return 0;
13543}
13544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013548
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
Matthias Kloseb159a552010-04-25 21:00:44 +000013550$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13553$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013554
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013555else
Skip Montanaro6dead952003-09-25 14:50:04 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13558$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13560$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13562/* end confdefs.h. */
13563
13564# include <netdb.h>
13565
13566int
13567main ()
13568{
13569
13570 char *name;
13571 struct hostent *he;
13572 struct hostent_data data;
13573
13574 (void) gethostbyname_r(name, he, &data);
13575
13576 ;
13577 return 0;
13578}
13579_ACEOF
13580if ac_fn_c_try_compile "$LINENO"; then :
13581
13582 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13583
13584
13585$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13586
13587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13588$as_echo "yes" >&6; }
13589
13590else
13591
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13593$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013594
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013603 CFLAGS=$OLD_CFLAGS
13604
13605else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 for ac_func in gethostbyname
13608do :
13609 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013610if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013611 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013613_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013615fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013616done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013617
Michael W. Hudson54241132001-12-07 15:38:26 +000013618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013619fi
13620
Michael W. Hudson54241132001-12-07 15:38:26 +000013621
13622
13623
13624
13625
13626
Guido van Rossum627b2d71993-12-24 10:39:16 +000013627# checks for system services
13628# (none yet)
13629
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013630# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013631ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013632if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013633
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013634else
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13636$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013637if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013639else
Martin v. Löwis11437992002-04-12 09:54:03 +000013640 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013641LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013645/* Override any GCC internal prototype to avoid an error.
13646 Use char because int might match the return type of a GCC
13647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013648#ifdef __cplusplus
13649extern "C"
13650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013651char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013652int
13653main ()
13654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013655return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 ;
13657 return 0;
13658}
13659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013660if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013661 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013662else
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013665rm -f core conftest.err conftest.$ac_objext \
13666 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013667LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13670$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013671if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013672 cat >>confdefs.h <<_ACEOF
13673#define HAVE_LIBIEEE 1
13674_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013675
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013676 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013677
Guido van Rossum627b2d71993-12-24 10:39:16 +000013678fi
13679
Michael W. Hudson54241132001-12-07 15:38:26 +000013680
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013681fi
13682
Michael W. Hudson54241132001-12-07 15:38:26 +000013683
Guido van Rossum7f43da71994-08-01 12:15:30 +000013684# check for --with-libm=...
13685
Guido van Rossum563e7081996-09-10 18:20:48 +000013686case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013687Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013688*) LIBM=-lm
13689esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13691$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013693# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013694if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013695 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013696if test "$withval" = no
13697then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13699$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013700elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013701then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13703$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013704else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013705fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13708$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709fi
13710
Guido van Rossum7f43da71994-08-01 12:15:30 +000013711
13712# check for --with-libc=...
13713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13715$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013717# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013718if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013719 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013720if test "$withval" = no
13721then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13723$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013724elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013725then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13727$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013728else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013729fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013730else
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13732$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733fi
13734
Guido van Rossum7f43da71994-08-01 12:15:30 +000013735
Stefan Krah1919b7e2012-03-21 18:25:23 +010013736# **************************************
13737# * Check for gcc x64 inline assembler *
13738# **************************************
13739
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13741$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13743/* end confdefs.h. */
13744
13745int
13746main ()
13747{
13748
13749 __asm__ __volatile__ ("movq %rcx, %rax");
13750
13751 ;
13752 return 0;
13753}
13754_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013755if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013756 have_gcc_asm_for_x64=yes
13757else
13758 have_gcc_asm_for_x64=no
13759fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013760rm -f core conftest.err conftest.$ac_objext \
13761 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13763$as_echo "$have_gcc_asm_for_x64" >&6; }
13764if test "$have_gcc_asm_for_x64" = yes
13765then
13766
13767$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13768
13769fi
13770
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013771# **************************************************
13772# * Check for various properties of floating point *
13773# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13776$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013777if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779else
13780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013782 ac_cv_little_endian_double=no
13783else
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785/* end confdefs.h. */
13786
13787#include <string.h>
13788int main() {
13789 double x = 9006104071832581.0;
13790 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13791 return 0;
13792 else
13793 return 1;
13794}
13795
13796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013797if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013798 ac_cv_little_endian_double=yes
13799else
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804fi
13805
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013806fi
13807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13809$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810if test "$ac_cv_little_endian_double" = yes
13811then
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013814
13815fi
13816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13818$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013819if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013821else
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013824 ac_cv_big_endian_double=no
13825else
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013827/* end confdefs.h. */
13828
13829#include <string.h>
13830int main() {
13831 double x = 9006104071832581.0;
13832 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13833 return 0;
13834 else
13835 return 1;
13836}
13837
13838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013839if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013840 ac_cv_big_endian_double=yes
13841else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013846fi
13847
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848fi
13849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13851$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852if test "$ac_cv_big_endian_double" = yes
13853then
13854
Matthias Kloseb9621712010-04-24 17:59:49 +000013855$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013856
13857fi
13858
13859# Some ARM platforms use a mixed-endian representation for doubles.
13860# While Python doesn't currently have full support for these platforms
13861# (see e.g., issue 1762561), we can at least make sure that float <-> string
13862# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13864$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013865if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867else
13868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013870 ac_cv_mixed_endian_double=no
13871else
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873/* end confdefs.h. */
13874
13875#include <string.h>
13876int main() {
13877 double x = 9006104071832581.0;
13878 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13879 return 0;
13880 else
13881 return 1;
13882}
13883
13884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013885if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013886 ac_cv_mixed_endian_double=yes
13887else
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892fi
13893
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013894fi
13895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13897$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013898if test "$ac_cv_mixed_endian_double" = yes
13899then
13900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013902
13903fi
13904
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013905# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013906# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013907# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013908# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013909# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013910# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013911
13912# This inline assembler syntax may also work for suncc and icc,
13913# so we try it on all platforms.
13914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13916$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013918/* end confdefs.h. */
13919
13920int
13921main ()
13922{
13923
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013924 unsigned short cw;
13925 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13926 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013927
13928 ;
13929 return 0;
13930}
13931_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013932if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013933 have_gcc_asm_for_x87=yes
13934else
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013936fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013937rm -f core conftest.err conftest.$ac_objext \
13938 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13940$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013941if test "$have_gcc_asm_for_x87" = yes
13942then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013946fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13949$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13951/* end confdefs.h. */
13952
13953int
13954main ()
13955{
13956
13957 unsigned int fpcr;
13958 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13959 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13960
13961 ;
13962 return 0;
13963}
13964_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013965if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013966 have_gcc_asm_for_mc68881=yes
13967else
13968 have_gcc_asm_for_mc68881=no
13969fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013970rm -f core conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13973$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13974if test "$have_gcc_asm_for_mc68881" = yes
13975then
13976
13977$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13978
13979fi
13980
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013981# Detect whether system arithmetic is subject to x87-style double
13982# rounding issues. The result of this test has little meaning on non
13983# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13984# mode is round-to-nearest and double rounding issues are present, and
13985# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13987$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013988# $BASECFLAGS may affect the result
13989ac_save_cc="$CC"
13990CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013991if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013992 ac_cv_x87_double_rounding=no
13993else
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013995/* end confdefs.h. */
13996
13997#include <stdlib.h>
13998#include <math.h>
13999int main() {
14000 volatile double x, y, z;
14001 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14002 x = 0.99999999999999989; /* 1-2**-53 */
14003 y = 1./x;
14004 if (y != 1.)
14005 exit(0);
14006 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14007 x = 1e16;
14008 y = 2.99999;
14009 z = x + y;
14010 if (z != 1e16+4.)
14011 exit(0);
14012 /* both tests show evidence of double rounding */
14013 exit(1);
14014}
14015
14016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014017if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014018 ac_cv_x87_double_rounding=no
14019else
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14023 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014024fi
14025
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14028$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014029if test "$ac_cv_x87_double_rounding" = yes
14030then
14031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014033
14034fi
14035
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036# ************************************
14037# * Check for mathematical functions *
14038# ************************************
14039
14040LIBS_SAVE=$LIBS
14041LIBS="$LIBS $LIBM"
14042
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014043for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14044do :
14045 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14046ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014047if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014048 cat >>confdefs.h <<_ACEOF
14049#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14050_ACEOF
14051
14052fi
14053done
14054
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014055for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014056do :
14057 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14058ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014059if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014060 cat >>confdefs.h <<_ACEOF
14061#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14062_ACEOF
14063
14064fi
14065done
14066
14067ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14068"
Victor Stinnere0be4232011-10-25 13:06:09 +020014069if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014070 ac_have_decl=1
14071else
14072 ac_have_decl=0
14073fi
14074
14075cat >>confdefs.h <<_ACEOF
14076#define HAVE_DECL_ISINF $ac_have_decl
14077_ACEOF
14078ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14079"
Victor Stinnere0be4232011-10-25 13:06:09 +020014080if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014081 ac_have_decl=1
14082else
14083 ac_have_decl=0
14084fi
14085
14086cat >>confdefs.h <<_ACEOF
14087#define HAVE_DECL_ISNAN $ac_have_decl
14088_ACEOF
14089ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14090"
Victor Stinnere0be4232011-10-25 13:06:09 +020014091if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014092 ac_have_decl=1
14093else
14094 ac_have_decl=0
14095fi
14096
14097cat >>confdefs.h <<_ACEOF
14098#define HAVE_DECL_ISFINITE $ac_have_decl
14099_ACEOF
14100
14101
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014102# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14103# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14105$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014106if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014108else
14109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014111 ac_cv_tanh_preserves_zero_sign=no
14112else
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014114/* end confdefs.h. */
14115
14116#include <math.h>
14117#include <stdlib.h>
14118int main() {
14119 /* return 0 if either negative zeros don't exist
14120 on this platform or if negative zeros exist
14121 and tanh(-0.) == -0. */
14122 if (atan2(0., -1.) == atan2(-0., -1.) ||
14123 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14124 else exit(1);
14125}
14126
14127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014128if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014129 ac_cv_tanh_preserves_zero_sign=yes
14130else
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14134 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014135fi
14136
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014137fi
14138
Matthias Kloseb9621712010-04-24 17:59:49 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14140$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014141if test "$ac_cv_tanh_preserves_zero_sign" = yes
14142then
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014145
14146fi
14147
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014148if test "$ac_cv_func_log1p" = yes
14149then
14150 # On some versions of AIX, log1p(-0.) returns 0. instead of
14151 # -0. See issue #9920.
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14153$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014154 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014155 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014156else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014157
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014158 if test "$cross_compiling" = yes; then :
14159 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014160else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14162/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014163
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014164 #include <math.h>
14165 #include <stdlib.h>
14166 int main() {
14167 /* Fail if the signs of log1p(-0.) and -0. can be
14168 distinguished. */
14169 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14170 return 0;
14171 else
14172 return 1;
14173 }
14174
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014175_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014176if ac_fn_c_try_run "$LINENO"; then :
14177 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014178else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014179 ac_cv_log1p_drops_zero_sign=yes
14180fi
14181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14182 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014183fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014184
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014185fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014186
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14188$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14189fi
14190if test "$ac_cv_log1p_drops_zero_sign" = yes
14191then
14192
14193$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14194
14195fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014196
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014197LIBS=$LIBS_SAVE
14198
Mark Dickinsona614f042009-11-28 12:48:43 +000014199# For multiprocessing module, check that sem_open
14200# actually works. For FreeBSD versions <= 7.2,
14201# the kernel module that provides POSIX semaphores
14202# isn't loaded by default, so an attempt to call
14203# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14205$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014206if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014210 ac_cv_posix_semaphores_enabled=yes
14211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014213/* end confdefs.h. */
14214
14215#include <unistd.h>
14216#include <fcntl.h>
14217#include <stdio.h>
14218#include <semaphore.h>
14219#include <sys/stat.h>
14220
14221int main(void) {
14222 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14223 if (a == SEM_FAILED) {
14224 perror("sem_open");
14225 return 1;
14226 }
14227 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014228 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014229 return 0;
14230}
14231
14232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014233if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014234 ac_cv_posix_semaphores_enabled=yes
14235else
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014240fi
14241
14242
Mark Dickinsona614f042009-11-28 12:48:43 +000014243fi
14244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14246$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014247if test $ac_cv_posix_semaphores_enabled = no
14248then
14249
Matthias Kloseb9621712010-04-24 17:59:49 +000014250$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014251
14252fi
14253
Mark Dickinson10683072009-04-18 21:18:19 +000014254# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14256$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014257if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014259else
Matthias Kloseb9621712010-04-24 17:59:49 +000014260 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014261 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014262else
Matthias Kloseb9621712010-04-24 17:59:49 +000014263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014264/* end confdefs.h. */
14265
14266#include <unistd.h>
14267#include <fcntl.h>
14268#include <stdio.h>
14269#include <semaphore.h>
14270#include <sys/stat.h>
14271
14272int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014273 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014274 int count;
14275 int res;
14276 if(a==SEM_FAILED){
14277 perror("sem_open");
14278 return 1;
14279
14280 }
14281 res = sem_getvalue(a, &count);
14282 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014283 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014284 return res==-1 ? 1 : 0;
14285}
14286
Mark Dickinson10683072009-04-18 21:18:19 +000014287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014288if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014289 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014295fi
14296
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014297
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014298fi
14299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14301$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014302if test $ac_cv_broken_sem_getvalue = yes
14303then
14304
Matthias Kloseb9621712010-04-24 17:59:49 +000014305$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014306
14307fi
14308
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014309ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14310"
14311if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14312 ac_have_decl=1
14313else
14314 ac_have_decl=0
14315fi
14316
14317cat >>confdefs.h <<_ACEOF
14318#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14319_ACEOF
14320ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14321"
14322if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14323 ac_have_decl=1
14324else
14325 ac_have_decl=0
14326fi
14327
14328cat >>confdefs.h <<_ACEOF
14329#define HAVE_DECL_RTLD_NOW $ac_have_decl
14330_ACEOF
14331ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14332"
14333if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14334 ac_have_decl=1
14335else
14336 ac_have_decl=0
14337fi
14338
14339cat >>confdefs.h <<_ACEOF
14340#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14341_ACEOF
14342ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14343"
14344if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14345 ac_have_decl=1
14346else
14347 ac_have_decl=0
14348fi
14349
14350cat >>confdefs.h <<_ACEOF
14351#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14352_ACEOF
14353ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14354"
14355if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14356 ac_have_decl=1
14357else
14358 ac_have_decl=0
14359fi
14360
14361cat >>confdefs.h <<_ACEOF
14362#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14363_ACEOF
14364ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14365"
14366if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14367 ac_have_decl=1
14368else
14369 ac_have_decl=0
14370fi
14371
14372cat >>confdefs.h <<_ACEOF
14373#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14374_ACEOF
14375ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14376"
14377if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14378 ac_have_decl=1
14379else
14380 ac_have_decl=0
14381fi
14382
14383cat >>confdefs.h <<_ACEOF
14384#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14385_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014386ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14387"
14388if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14389 ac_have_decl=1
14390else
14391 ac_have_decl=0
14392fi
14393
14394cat >>confdefs.h <<_ACEOF
14395#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14396_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014397
14398
Mark Dickinsonbd792642009-03-18 20:06:12 +000014399# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14401$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014402# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014403if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014404 enableval=$enable_big_digits; case $enable_big_digits in
14405yes)
14406 enable_big_digits=30 ;;
14407no)
14408 enable_big_digits=15 ;;
1440915|30)
14410 ;;
14411*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014412 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 +000014413esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14415$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014416
14417cat >>confdefs.h <<_ACEOF
14418#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14419_ACEOF
14420
14421
14422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14424$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014425fi
14426
14427
Guido van Rossumef2255b2000-03-10 22:30:29 +000014428# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014429ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014430if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014431
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014435 wchar_h="yes"
14436
Guido van Rossumef2255b2000-03-10 22:30:29 +000014437else
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014439
14440fi
14441
Michael W. Hudson54241132001-12-07 15:38:26 +000014442
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014444# determine wchar_t size
14445if test "$wchar_h" = yes
14446then
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14450# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14452$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014453if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14457"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
Martin v. Löwis11437992002-04-12 09:54:03 +000014459else
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 if test "$ac_cv_type_wchar_t" = yes; then
14461 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014463as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014464See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465 else
14466 ac_cv_sizeof_wchar_t=0
14467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14472$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473
14474
14475
Martin v. Löwis11437992002-04-12 09:54:03 +000014476cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014477#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014478_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014479
Michael W. Hudson54241132001-12-07 15:38:26 +000014480
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014481fi
14482
Matthias Kloseb9621712010-04-24 17:59:49 +000014483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14484$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014485have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014487/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014488
14489#include <tcl.h>
14490#if TCL_UTF_MAX != 6
14491# error "NOT UCS4_TCL"
14492#endif
14493int
14494main ()
14495{
14496
14497 ;
14498 return 0;
14499}
14500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014502
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014505
14506 have_ucs4_tcl=yes
14507
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14511$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014512
Skip Montanaro6dead952003-09-25 14:50:04 +000014513# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014514if test "$wchar_h" = yes
14515then
14516 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14518$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014519 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014521else
14522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014524 ac_cv_wchar_t_signed=yes
14525else
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014527/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014528
14529 #include <wchar.h>
14530 int main()
14531 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014532 /* Success: exit code 0 */
14533 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014534 }
14535
14536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014537if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014538 ac_cv_wchar_t_signed=yes
14539else
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14543 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014544fi
14545
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014546fi
14547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14549$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550fi
14551
Georg Brandl52d168a2008-01-07 18:10:24 +000014552# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014553if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014554 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014555then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014556 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
Georg Brandl52d168a2008-01-07 18:10:24 +000014560else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014561 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014562fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14564$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014565
14566# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14568$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014569if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571else
Matthias Kloseb9621712010-04-24 17:59:49 +000014572 ac_cv_c_bigendian=unknown
14573 # See if we're dealing with a universal compiler.
14574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14575/* end confdefs.h. */
14576#ifndef __APPLE_CC__
14577 not a universal capable compiler
14578 #endif
14579 typedef int dummy;
14580
Skip Montanaro6dead952003-09-25 14:50:04 +000014581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014582if ac_fn_c_try_compile "$LINENO"; then :
14583
14584 # Check for potential -arch flags. It is not universal unless
14585 # there are at least two -arch flags with different values.
14586 ac_arch=
14587 ac_prev=
14588 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14589 if test -n "$ac_prev"; then
14590 case $ac_word in
14591 i?86 | x86_64 | ppc | ppc64)
14592 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14593 ac_arch=$ac_word
14594 else
14595 ac_cv_c_bigendian=universal
14596 break
14597 fi
14598 ;;
14599 esac
14600 ac_prev=
14601 elif test "x$ac_word" = "x-arch"; then
14602 ac_prev=arch
14603 fi
14604 done
14605fi
14606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14607 if test $ac_cv_c_bigendian = unknown; then
14608 # See if sys/param.h defines the BYTE_ORDER macro.
14609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014610/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014611#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614int
14615main ()
14616{
Matthias Kloseb9621712010-04-24 17:59:49 +000014617#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14618 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14619 && LITTLE_ENDIAN)
14620 bogus endian macros
14621 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
14623 ;
14624 return 0;
14625}
14626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014627if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014628 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014630/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014631#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634int
14635main ()
14636{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014637#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 not big endian
14639 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014640
14641 ;
14642 return 0;
14643}
14644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014645if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014646 ac_cv_c_bigendian=yes
14647else
Matthias Kloseb9621712010-04-24 17:59:49 +000014648 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014651fi
14652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14653 fi
14654 if test $ac_cv_c_bigendian = unknown; then
14655 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014657/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014658#include <limits.h>
14659
Martin v. Löwis11437992002-04-12 09:54:03 +000014660int
14661main ()
14662{
Matthias Kloseb9621712010-04-24 17:59:49 +000014663#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14664 bogus endian macros
14665 #endif
14666
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 ;
14668 return 0;
14669}
14670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014671if ac_fn_c_try_compile "$LINENO"; then :
14672 # It does; now see whether it defined to _BIG_ENDIAN or not.
14673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14674/* end confdefs.h. */
14675#include <limits.h>
14676
14677int
14678main ()
14679{
14680#ifndef _BIG_ENDIAN
14681 not big endian
14682 #endif
14683
14684 ;
14685 return 0;
14686}
14687_ACEOF
14688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014689 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014690else
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14694fi
14695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14696 fi
14697 if test $ac_cv_c_bigendian = unknown; then
14698 # Compile a test program.
14699 if test "$cross_compiling" = yes; then :
14700 # Try to guess by grepping values from an object file.
14701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14702/* end confdefs.h. */
14703short int ascii_mm[] =
14704 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14705 short int ascii_ii[] =
14706 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14707 int use_ascii (int i) {
14708 return ascii_mm[i] + ascii_ii[i];
14709 }
14710 short int ebcdic_ii[] =
14711 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14712 short int ebcdic_mm[] =
14713 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14714 int use_ebcdic (int i) {
14715 return ebcdic_mm[i] + ebcdic_ii[i];
14716 }
14717 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719int
14720main ()
14721{
14722return use_ascii (foo) == use_ebcdic (foo);
14723 ;
14724 return 0;
14725}
14726_ACEOF
14727if ac_fn_c_try_compile "$LINENO"; then :
14728 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14729 ac_cv_c_bigendian=yes
14730 fi
14731 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14732 if test "$ac_cv_c_bigendian" = unknown; then
14733 ac_cv_c_bigendian=no
14734 else
14735 # finding both strings is unlikely to happen, but who knows?
14736 ac_cv_c_bigendian=unknown
14737 fi
14738 fi
14739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014743/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014745int
14746main ()
14747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 /* Are we little or big endian? From Harbison&Steele. */
14750 union
14751 {
14752 long int l;
14753 char c[sizeof (long int)];
14754 } u;
14755 u.l = 1;
14756 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757
14758 ;
14759 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014760}
Martin v. Löwis11437992002-04-12 09:54:03 +000014761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014762if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014763 ac_cv_c_bigendian=no
14764else
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14774$as_echo "$ac_cv_c_bigendian" >&6; }
14775 case $ac_cv_c_bigendian in #(
14776 yes)
14777 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14778;; #(
14779 no)
14780 ;; #(
14781 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014782
Matthias Kloseb9621712010-04-24 17:59:49 +000014783$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 ;; #(
14786 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014787 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014788 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014790
Michael W. Hudson54241132001-12-07 15:38:26 +000014791
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014792# ABI version string for Python extension modules. This appears between the
14793# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14794# from the following attributes which affect the ABI of this Python build (in
14795# this order):
14796#
14797# * The Python implementation (always 'cpython-' for us)
14798# * The major and minor version numbers
14799# * --with-pydebug (adds a 'd')
14800# * --with-pymalloc (adds a 'm')
14801# * --with-wide-unicode (adds a 'u')
14802#
14803# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014804# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14805# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014806
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14808$as_echo_n "checking ABIFLAGS... " >&6; }
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14810$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14812$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014813SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14815$as_echo "$SOABI" >&6; }
14816
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014817
14818case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014819 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014820 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14821 *)
14822 EXT_SUFFIX=${SHLIB_SUFFIX};;
14823esac
14824
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14826$as_echo_n "checking LDVERSION... " >&6; }
14827LDVERSION='$(VERSION)$(ABIFLAGS)'
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14829$as_echo "$LDVERSION" >&6; }
14830
doko@python.org87421192013-01-26 11:39:31 +010014831
doko@ubuntu.com55532312016-06-14 08:55:19 +020014832if test x$PLATFORM_TRIPLET = x; then
14833 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14834else
14835 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14836fi
doko@python.org87421192013-01-26 11:39:31 +010014837
14838
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014839# Check whether right shifting a negative integer extends the sign bit
14840# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14842$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014843if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014845else
Martin v. Löwis11437992002-04-12 09:54:03 +000014846
Matthias Kloseb9621712010-04-24 17:59:49 +000014847if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014848 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014849else
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014851/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014852
14853int main()
14854{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014855 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014856}
14857
Martin v. Löwis11437992002-04-12 09:54:03 +000014858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014859if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014860 ac_cv_rshift_extends_sign=yes
14861else
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014866fi
14867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868fi
14869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14871$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014872if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014873then
Martin v. Löwis11437992002-04-12 09:54:03 +000014874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014876
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014877fi
14878
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014879# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14881$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014882if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014884else
Martin v. Löwis11437992002-04-12 09:54:03 +000014885
Matthias Kloseb9621712010-04-24 17:59:49 +000014886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014887/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014888#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014889int
14890main ()
14891{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014892
14893 FILE *f = fopen("/dev/null", "r");
14894 flockfile(f);
14895 getc_unlocked(f);
14896 funlockfile(f);
14897
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ;
14899 return 0;
14900}
14901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014902if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014903 ac_cv_have_getc_unlocked=yes
14904else
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 ac_cv_have_getc_unlocked=no
14906fi
14907rm -f core conftest.err conftest.$ac_objext \
14908 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14912$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014913if test "$ac_cv_have_getc_unlocked" = yes
14914then
Martin v. Löwis11437992002-04-12 09:54:03 +000014915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014917
14918fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014919
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014920# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014921# save the value of LIBS so we don't actually link Python with readline
14922LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014923
Gregory P. Smith18820942008-09-07 06:24:49 +000014924# On some systems we need to link readline to a termcap compatible
14925# library. NOTE: Keep the precedence of listed libraries synchronised
14926# with setup.py.
14927py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14929$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014930for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014931 if test -z "$py_libtermcap"; then
14932 READLINE_LIBS="-lreadline"
14933 else
14934 READLINE_LIBS="-lreadline -l$py_libtermcap"
14935 fi
14936 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014938/* end confdefs.h. */
14939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940/* Override any GCC internal prototype to avoid an error.
14941 Use char because int might match the return type of a GCC
14942 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014943#ifdef __cplusplus
14944extern "C"
14945#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014946char readline ();
14947int
14948main ()
14949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014951 ;
14952 return 0;
14953}
14954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014955if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014956 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014958rm -f core conftest.err conftest.$ac_objext \
14959 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014960 if test $py_cv_lib_readline = yes; then
14961 break
14962 fi
14963done
14964# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14965#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014966if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14968$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014969else
Matthias Kloseb9621712010-04-24 17:59:49 +000014970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14971$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014972
Matthias Kloseb9621712010-04-24 17:59:49 +000014973$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014974
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014975fi
14976
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014977# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014979/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014980#include <readline/readline.h>
14981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014982if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014983 have_readline=yes
14984else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014985 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014986
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014987fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014988rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989if test $have_readline = yes
14990then
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014992/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014993#include <readline/readline.h>
14994
14995_ACEOF
14996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015000
15001fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015002rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015003
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015005/* end confdefs.h. */
15006#include <readline/readline.h>
15007
15008_ACEOF
15009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015013
15014fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015015rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015016
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015017fi
15018
Martin v. Löwis0daad592001-09-30 21:09:59 +000015019# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15021$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015022if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015024else
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015026LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030/* Override any GCC internal prototype to avoid an error.
15031 Use char because int might match the return type of a GCC
15032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015033#ifdef __cplusplus
15034extern "C"
15035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015036char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015037int
15038main ()
15039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 ;
15042 return 0;
15043}
15044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015047else
Matthias Kloseb9621712010-04-24 17:59:49 +000015048 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015050rm -f core conftest.err conftest.$ac_objext \
15051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015052LIBS=$ac_check_lib_save_LIBS
15053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15055$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015056if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015059
Martin v. Löwis0daad592001-09-30 21:09:59 +000015060fi
15061
Michael W. Hudson54241132001-12-07 15:38:26 +000015062
Thomas Wouters89d996e2007-09-08 17:39:28 +000015063# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15065$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015066if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015067 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015068else
15069 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015070LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015072/* end confdefs.h. */
15073
15074/* Override any GCC internal prototype to avoid an error.
15075 Use char because int might match the return type of a GCC
15076 builtin and then its argument prototype would still apply. */
15077#ifdef __cplusplus
15078extern "C"
15079#endif
15080char rl_completion_display_matches_hook ();
15081int
15082main ()
15083{
15084return rl_completion_display_matches_hook ();
15085 ;
15086 return 0;
15087}
15088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015089if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015090 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15091else
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015094rm -f core conftest.err conftest.$ac_objext \
15095 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015096LIBS=$ac_check_lib_save_LIBS
15097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15099$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015100if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015101
Matthias Kloseb9621712010-04-24 17:59:49 +000015102$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015103
15104fi
15105
15106
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015107# also in 4.0, but not in editline
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15109$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15110if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15111 $as_echo_n "(cached) " >&6
15112else
15113 ac_check_lib_save_LIBS=$LIBS
15114LIBS="-lreadline $READLINE_LIBS $LIBS"
15115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15116/* end confdefs.h. */
15117
15118/* Override any GCC internal prototype to avoid an error.
15119 Use char because int might match the return type of a GCC
15120 builtin and then its argument prototype would still apply. */
15121#ifdef __cplusplus
15122extern "C"
15123#endif
15124char rl_resize_terminal ();
15125int
15126main ()
15127{
15128return rl_resize_terminal ();
15129 ;
15130 return 0;
15131}
15132_ACEOF
15133if ac_fn_c_try_link "$LINENO"; then :
15134 ac_cv_lib_readline_rl_resize_terminal=yes
15135else
15136 ac_cv_lib_readline_rl_resize_terminal=no
15137fi
15138rm -f core conftest.err conftest.$ac_objext \
15139 conftest$ac_exeext conftest.$ac_ext
15140LIBS=$ac_check_lib_save_LIBS
15141fi
15142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15143$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15144if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15145
15146$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15147
15148fi
15149
15150
Martin v. Löwis0daad592001-09-30 21:09:59 +000015151# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15153$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015154if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015156else
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015158LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162/* Override any GCC internal prototype to avoid an error.
15163 Use char because int might match the return type of a GCC
15164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015165#ifdef __cplusplus
15166extern "C"
15167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015168char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015169int
15170main ()
15171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ;
15174 return 0;
15175}
15176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015178 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015179else
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015182rm -f core conftest.err conftest.$ac_objext \
15183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015184LIBS=$ac_check_lib_save_LIBS
15185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15187$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015188if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015189
Matthias Kloseb9621712010-04-24 17:59:49 +000015190$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015191
Guido van Rossum353ae582001-07-10 16:45:32 +000015192fi
15193
Jack Jansendd19cf82001-12-06 22:36:17 +000015194
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015195# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015197/* end confdefs.h. */
15198#include <readline/readline.h>
15199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015200if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201 have_readline=yes
15202else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015203 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015204
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015205fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015206rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207if test $have_readline = yes
15208then
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015210/* end confdefs.h. */
15211#include <readline/readline.h>
15212
15213_ACEOF
15214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015216
Matthias Kloseb9621712010-04-24 17:59:49 +000015217$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015218
15219fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015220rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015221
15222fi
15223
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15225$as_echo_n "checking for append_history in -lreadline... " >&6; }
15226if ${ac_cv_lib_readline_append_history+:} false; then :
15227 $as_echo_n "(cached) " >&6
15228else
15229 ac_check_lib_save_LIBS=$LIBS
15230LIBS="-lreadline $READLINE_LIBS $LIBS"
15231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15232/* end confdefs.h. */
15233
15234/* Override any GCC internal prototype to avoid an error.
15235 Use char because int might match the return type of a GCC
15236 builtin and then its argument prototype would still apply. */
15237#ifdef __cplusplus
15238extern "C"
15239#endif
15240char append_history ();
15241int
15242main ()
15243{
15244return append_history ();
15245 ;
15246 return 0;
15247}
15248_ACEOF
15249if ac_fn_c_try_link "$LINENO"; then :
15250 ac_cv_lib_readline_append_history=yes
15251else
15252 ac_cv_lib_readline_append_history=no
15253fi
15254rm -f core conftest.err conftest.$ac_objext \
15255 conftest$ac_exeext conftest.$ac_ext
15256LIBS=$ac_check_lib_save_LIBS
15257fi
15258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15259$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15260if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15261
15262$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15263
15264fi
15265
15266
Martin v. Löwis82bca632006-02-10 20:49:30 +000015267# End of readline checks: restore LIBS
15268LIBS=$LIBS_no_readline
15269
Matthias Kloseb9621712010-04-24 17:59:49 +000015270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15271$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015272if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015274else
Martin v. Löwis11437992002-04-12 09:54:03 +000015275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015277 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015278else
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015280/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015281
15282int main()
15283{
15284 int val1 = nice(1);
15285 if (val1 != -1 && val1 == nice(2))
15286 exit(0);
15287 exit(1);
15288}
15289
Martin v. Löwis11437992002-04-12 09:54:03 +000015290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015291if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015292 ac_cv_broken_nice=yes
15293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15297 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015298fi
15299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300fi
15301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15303$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015304if test "$ac_cv_broken_nice" = yes
15305then
Martin v. Löwis11437992002-04-12 09:54:03 +000015306
Matthias Kloseb9621712010-04-24 17:59:49 +000015307$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015308
15309fi
15310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15312$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015313if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015314 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015315else
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015317 ac_cv_broken_poll=no
15318else
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015320/* end confdefs.h. */
15321
15322#include <poll.h>
15323
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015324int main()
15325{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015326 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015327 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015328
15329 close (42);
15330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015331 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015332 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015333 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015335 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015336 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015337 return 1;
15338}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015339
15340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015341if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015342 ac_cv_broken_poll=yes
15343else
Matthias Kloseb9621712010-04-24 17:59:49 +000015344 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015350fi
15351
Matthias Kloseb9621712010-04-24 17:59:49 +000015352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15353$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015354if test "$ac_cv_broken_poll" = yes
15355then
15356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015358
15359fi
15360
Brett Cannon43802422005-02-10 20:48:03 +000015361# 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 +000015362# (which is not required by ISO C or UNIX spec) and/or if we support
15363# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015364ac_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 +000015365#include <$ac_cv_struct_tm>
15366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367"
Victor Stinnere0be4232011-10-25 13:06:09 +020015368if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015369
15370cat >>confdefs.h <<_ACEOF
15371#define HAVE_STRUCT_TM_TM_ZONE 1
15372_ACEOF
15373
15374
15375fi
15376
15377if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015380
15381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15383"
Victor Stinnere0be4232011-10-25 13:06:09 +020015384if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015385 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386else
Matthias Kloseb9621712010-04-24 17:59:49 +000015387 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388fi
15389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015391#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392_ACEOF
15393
Matthias Kloseb9621712010-04-24 17:59:49 +000015394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15395$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015396if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015397 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015400/* end confdefs.h. */
15401#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402#if !HAVE_DECL_TZNAME
15403extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015404#endif
15405
15406int
15407main ()
15408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015409return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015410 ;
15411 return 0;
15412}
15413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015414if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015415 ac_cv_var_tzname=yes
15416else
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015419rm -f core conftest.err conftest.$ac_objext \
15420 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15423$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015424 if test $ac_cv_var_tzname = yes; then
15425
Matthias Kloseb9621712010-04-24 17:59:49 +000015426$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015427
15428 fi
15429fi
15430
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015431
Martin v. Löwis1d459062005-03-14 21:23:33 +000015432# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15434$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015435if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015436 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015437else
15438
Matthias Kloseb9621712010-04-24 17:59:49 +000015439if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015440 ac_cv_working_tzset=no
15441else
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015443/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015444
15445#include <stdlib.h>
15446#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015447#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015448
15449#if HAVE_TZNAME
15450extern char *tzname[];
15451#endif
15452
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015453int main()
15454{
Brett Cannon18367812003-09-19 00:59:16 +000015455 /* Note that we need to ensure that not only does tzset(3)
15456 do 'something' with localtime, but it works as documented
15457 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015458 This includes making sure that tzname is set properly if
15459 tm->tm_zone does not exist since it is the alternative way
15460 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015461
15462 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015463 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015464 */
15465
Martin v. Löwis1d459062005-03-14 21:23:33 +000015466 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015467 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15468
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015469 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015470 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015471 if (localtime(&groundhogday)->tm_hour != 0)
15472 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015473#if HAVE_TZNAME
15474 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15475 if (strcmp(tzname[0], "UTC") ||
15476 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15477 exit(1);
15478#endif
Brett Cannon18367812003-09-19 00:59:16 +000015479
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015480 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015481 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015482 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015483 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015484#if HAVE_TZNAME
15485 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15486 exit(1);
15487#endif
Brett Cannon18367812003-09-19 00:59:16 +000015488
15489 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15490 tzset();
15491 if (localtime(&groundhogday)->tm_hour != 11)
15492 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015493#if HAVE_TZNAME
15494 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15495 exit(1);
15496#endif
15497
15498#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015499 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15500 exit(1);
15501 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15502 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015503#endif
Brett Cannon18367812003-09-19 00:59:16 +000015504
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015505 exit(0);
15506}
15507
15508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015509if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015510 ac_cv_working_tzset=yes
15511else
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15515 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015516fi
15517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518fi
15519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15521$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015522if test "$ac_cv_working_tzset" = yes
15523then
15524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015526
15527fi
15528
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015529# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15531$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015532if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015533 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015534else
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015536/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015537#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015538int
15539main ()
15540{
15541
15542struct stat st;
15543st.st_mtim.tv_nsec = 1;
15544
15545 ;
15546 return 0;
15547}
15548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015550 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015551else
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15555fi
15556
Matthias Kloseb9621712010-04-24 17:59:49 +000015557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15558$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015559if test "$ac_cv_stat_tv_nsec" = yes
15560then
15561
Matthias Kloseb9621712010-04-24 17:59:49 +000015562$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015563
15564fi
15565
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015566# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15568$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015569if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015570 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015571else
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015573/* end confdefs.h. */
15574#include <sys/stat.h>
15575int
15576main ()
15577{
15578
15579struct stat st;
15580st.st_mtimespec.tv_nsec = 1;
15581
15582 ;
15583 return 0;
15584}
15585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015587 ac_cv_stat_tv_nsec2=yes
15588else
Matthias Kloseb9621712010-04-24 17:59:49 +000015589 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15592fi
15593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15595$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015596if test "$ac_cv_stat_tv_nsec2" = yes
15597then
15598
Matthias Kloseb9621712010-04-24 17:59:49 +000015599$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015600
15601fi
15602
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015603# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015604ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015605if test "$cross_compiling" = no; then
15606 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15607fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015608
15609for ac_header in curses.h ncurses.h
15610do :
15611 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15612ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15613if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15614 cat >>confdefs.h <<_ACEOF
15615#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15616_ACEOF
15617
15618fi
15619
15620done
15621
15622
15623# On Solaris, term.h requires curses.h
15624for ac_header in term.h
15625do :
15626 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15627#ifdef HAVE_CURSES_H
15628#include <curses.h>
15629#endif
15630
15631"
15632if test "x$ac_cv_header_term_h" = xyes; then :
15633 cat >>confdefs.h <<_ACEOF
15634#define HAVE_TERM_H 1
15635_ACEOF
15636
15637fi
15638
15639done
15640
15641
Jack Jansen666b1e72001-10-31 12:11:48 +000015642# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15644$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015645if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015647else
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015649/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015650#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015651int
15652main ()
15653{
Jack Jansen666b1e72001-10-31 12:11:48 +000015654
15655 int rtn;
15656 rtn = mvwdelch(0,0,0);
15657
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 ;
15659 return 0;
15660}
15661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015662if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015663 ac_cv_mvwdelch_is_expression=yes
15664else
Matthias Kloseb9621712010-04-24 17:59:49 +000015665 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15668fi
15669
Matthias Kloseb9621712010-04-24 17:59:49 +000015670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15671$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015672
15673if test "$ac_cv_mvwdelch_is_expression" = yes
15674then
Martin v. Löwis11437992002-04-12 09:54:03 +000015675
Matthias Kloseb9621712010-04-24 17:59:49 +000015676$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015677
15678fi
15679
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015680# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15681# structs since version 5.7. If the macro is defined as zero before including
15682# [n]curses.h, ncurses will expose fields of the structs regardless of the
15683# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15685$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015686if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015687 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015688else
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015690/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015691
15692 #define NCURSES_OPAQUE 0
15693 #include <curses.h>
15694
Martin v. Löwis11437992002-04-12 09:54:03 +000015695int
15696main ()
15697{
Jack Jansen666b1e72001-10-31 12:11:48 +000015698
15699 WINDOW *w;
15700 w->_flags = 0;
15701
Martin v. Löwis11437992002-04-12 09:54:03 +000015702 ;
15703 return 0;
15704}
15705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015706if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015707 ac_cv_window_has_flags=yes
15708else
Matthias Kloseb9621712010-04-24 17:59:49 +000015709 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15712fi
15713
Matthias Kloseb9621712010-04-24 17:59:49 +000015714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15715$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015716
Jack Jansen666b1e72001-10-31 12:11:48 +000015717
15718if test "$ac_cv_window_has_flags" = yes
15719then
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
Matthias Kloseb9621712010-04-24 17:59:49 +000015721$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015722
15723fi
15724
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15726$as_echo_n "checking for is_pad... " >&6; }
15727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15728/* end confdefs.h. */
15729#include <curses.h>
15730int
15731main ()
15732{
15733
15734#ifndef is_pad
15735void *x=is_pad
15736#endif
15737
15738 ;
15739 return 0;
15740}
15741_ACEOF
15742if ac_fn_c_try_compile "$LINENO"; then :
15743
15744$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15745
15746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15747$as_echo "yes" >&6; }
15748else
15749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15750$as_echo "no" >&6; }
15751
15752fi
15753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15754
Matthias Kloseb9621712010-04-24 17:59:49 +000015755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15756$as_echo_n "checking for is_term_resized... " >&6; }
15757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015758/* end confdefs.h. */
15759#include <curses.h>
15760int
15761main ()
15762{
15763void *x=is_term_resized
15764 ;
15765 return 0;
15766}
15767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015768if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015769
Matthias Kloseb9621712010-04-24 17:59:49 +000015770$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015771
Matthias Kloseb159a552010-04-25 21:00:44 +000015772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015773$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015774else
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15776$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015777
15778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15780
Matthias Kloseb9621712010-04-24 17:59:49 +000015781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15782$as_echo_n "checking for resize_term... " >&6; }
15783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015784/* end confdefs.h. */
15785#include <curses.h>
15786int
15787main ()
15788{
15789void *x=resize_term
15790 ;
15791 return 0;
15792}
15793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015794if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015797
Matthias Kloseb159a552010-04-25 21:00:44 +000015798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015799$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015800else
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15802$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015803
15804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15806
Matthias Kloseb9621712010-04-24 17:59:49 +000015807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15808$as_echo_n "checking for resizeterm... " >&6; }
15809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015810/* end confdefs.h. */
15811#include <curses.h>
15812int
15813main ()
15814{
15815void *x=resizeterm
15816 ;
15817 return 0;
15818}
15819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015820if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015823
Matthias Kloseb159a552010-04-25 21:00:44 +000015824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015825$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015826else
Matthias Kloseb9621712010-04-24 17:59:49 +000015827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15828$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015829
15830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015832
15833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15834$as_echo_n "checking for immedok... " >&6; }
15835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15836/* end confdefs.h. */
15837#include <curses.h>
15838int
15839main ()
15840{
15841
15842#ifndef immedok
15843void *x=immedok
15844#endif
15845
15846 ;
15847 return 0;
15848}
15849_ACEOF
15850if ac_fn_c_try_compile "$LINENO"; then :
15851
15852$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15853
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15855$as_echo "yes" >&6; }
15856else
15857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15858$as_echo "no" >&6; }
15859
15860fi
15861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15862
15863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15864$as_echo_n "checking for syncok... " >&6; }
15865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866/* end confdefs.h. */
15867#include <curses.h>
15868int
15869main ()
15870{
15871
15872#ifndef syncok
15873void *x=syncok
15874#endif
15875
15876 ;
15877 return 0;
15878}
15879_ACEOF
15880if ac_fn_c_try_compile "$LINENO"; then :
15881
15882$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15883
15884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15885$as_echo "yes" >&6; }
15886else
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15888$as_echo "no" >&6; }
15889
15890fi
15891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15892
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15894$as_echo_n "checking for wchgat... " >&6; }
15895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15896/* end confdefs.h. */
15897#include <curses.h>
15898int
15899main ()
15900{
15901
15902#ifndef wchgat
15903void *x=wchgat
15904#endif
15905
15906 ;
15907 return 0;
15908}
15909_ACEOF
15910if ac_fn_c_try_compile "$LINENO"; then :
15911
15912$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15913
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15915$as_echo "yes" >&6; }
15916else
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15918$as_echo "no" >&6; }
15919
15920fi
15921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15922
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15924$as_echo_n "checking for filter... " >&6; }
15925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15926/* end confdefs.h. */
15927#include <curses.h>
15928int
15929main ()
15930{
15931
15932#ifndef filter
15933void *x=filter
15934#endif
15935
15936 ;
15937 return 0;
15938}
15939_ACEOF
15940if ac_fn_c_try_compile "$LINENO"; then :
15941
15942$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15943
15944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15945$as_echo "yes" >&6; }
15946else
15947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15948$as_echo "no" >&6; }
15949
15950fi
15951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15952
15953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15954$as_echo_n "checking for has_key... " >&6; }
15955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15956/* end confdefs.h. */
15957#include <curses.h>
15958int
15959main ()
15960{
15961
15962#ifndef has_key
15963void *x=has_key
15964#endif
15965
15966 ;
15967 return 0;
15968}
15969_ACEOF
15970if ac_fn_c_try_compile "$LINENO"; then :
15971
15972$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15973
15974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15975$as_echo "yes" >&6; }
15976else
15977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15978$as_echo "no" >&6; }
15979
15980fi
15981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15982
15983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15984$as_echo_n "checking for typeahead... " >&6; }
15985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15986/* end confdefs.h. */
15987#include <curses.h>
15988int
15989main ()
15990{
15991
15992#ifndef typeahead
15993void *x=typeahead
15994#endif
15995
15996 ;
15997 return 0;
15998}
15999_ACEOF
16000if ac_fn_c_try_compile "$LINENO"; then :
16001
16002$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16003
16004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16005$as_echo "yes" >&6; }
16006else
16007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16008$as_echo "no" >&6; }
16009
16010fi
16011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16012
16013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16014$as_echo_n "checking for use_env... " >&6; }
16015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16016/* end confdefs.h. */
16017#include <curses.h>
16018int
16019main ()
16020{
16021
16022#ifndef use_env
16023void *x=use_env
16024#endif
16025
16026 ;
16027 return 0;
16028}
16029_ACEOF
16030if ac_fn_c_try_compile "$LINENO"; then :
16031
16032$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16033
16034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16035$as_echo "yes" >&6; }
16036else
16037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16038$as_echo "no" >&6; }
16039
16040fi
16041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016042# last curses configure check
16043CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016044
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16046$as_echo "$as_me: checking for device files" >&6;}
16047
16048if test "x$cross_compiling" = xyes; then
16049 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16051$as_echo_n "checking for /dev/ptmx... " >&6; }
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16053$as_echo "not set" >&6; }
16054 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16055 fi
16056 if test "${ac_cv_file__dev_ptc+set}" != set; then
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16058$as_echo_n "checking for /dev/ptc... " >&6; }
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16060$as_echo "not set" >&6; }
16061 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16062 fi
16063fi
16064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16066$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016067if ${ac_cv_file__dev_ptmx+:} false; then :
16068 $as_echo_n "(cached) " >&6
16069else
16070 test "$cross_compiling" = yes &&
16071 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16072if test -r "/dev/ptmx"; then
16073 ac_cv_file__dev_ptmx=yes
16074else
16075 ac_cv_file__dev_ptmx=no
16076fi
16077fi
16078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16079$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16080if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016081
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016082fi
16083
16084if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016085
Matthias Kloseb9621712010-04-24 17:59:49 +000016086$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016087
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16090$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016091if ${ac_cv_file__dev_ptc+:} false; then :
16092 $as_echo_n "(cached) " >&6
16093else
16094 test "$cross_compiling" = yes &&
16095 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16096if test -r "/dev/ptc"; then
16097 ac_cv_file__dev_ptc=yes
16098else
16099 ac_cv_file__dev_ptc=no
16100fi
16101fi
16102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16103$as_echo "$ac_cv_file__dev_ptc" >&6; }
16104if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016105
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016106fi
16107
16108if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016109
Matthias Kloseb9621712010-04-24 17:59:49 +000016110$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016111
Neal Norwitz865400f2003-03-21 01:42:58 +000016112fi
16113
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016114if test $ac_sys_system = Darwin
16115then
16116 LIBS="$LIBS -framework CoreFoundation"
16117fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016118
Matthias Kloseb9621712010-04-24 17:59:49 +000016119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16120$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016121if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016123else
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016125 ac_cv_have_size_t_format="cross -- assuming yes"
16126
Thomas Wouters477c8d52006-05-27 19:21:47 +000016127else
Matthias Kloseb9621712010-04-24 17:59:49 +000016128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016129/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016130
Thomas Wouters477c8d52006-05-27 19:21:47 +000016131#include <stdio.h>
16132#include <stddef.h>
16133#include <string.h>
16134
Christian Heimes2c181612007-12-17 20:04:13 +000016135#ifdef HAVE_SYS_TYPES_H
16136#include <sys/types.h>
16137#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016138
16139#ifdef HAVE_SSIZE_T
16140typedef ssize_t Py_ssize_t;
16141#elif SIZEOF_VOID_P == SIZEOF_LONG
16142typedef long Py_ssize_t;
16143#else
16144typedef int Py_ssize_t;
16145#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016146
Christian Heimes2c181612007-12-17 20:04:13 +000016147int main()
16148{
16149 char buffer[256];
16150
Thomas Wouters477c8d52006-05-27 19:21:47 +000016151 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16152 return 1;
16153
Thomas Wouters89f507f2006-12-13 04:49:30 +000016154 if (strcmp(buffer, "123"))
16155 return 1;
16156
16157 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16158 return 1;
16159
16160 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016161 return 1;
16162
16163 return 0;
16164}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016165
Thomas Wouters477c8d52006-05-27 19:21:47 +000016166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016167if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016168 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016169else
Matthias Kloseb9621712010-04-24 17:59:49 +000016170 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016174fi
16175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16178$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016179if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016180
Matthias Kloseb9621712010-04-24 17:59:49 +000016181$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016182
16183fi
16184
Matthias Kloseb9621712010-04-24 17:59:49 +000016185ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016186#ifdef HAVE_SYS_TYPES_H
16187#include <sys/types.h>
16188#endif
16189#ifdef HAVE_SYS_SOCKET_H
16190#include <sys/socket.h>
16191#endif
16192
Matthias Kloseb9621712010-04-24 17:59:49 +000016193"
Victor Stinnere0be4232011-10-25 13:06:09 +020016194if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016195
Martin v. Löwis11437992002-04-12 09:54:03 +000016196else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016197
Matthias Kloseb9621712010-04-24 17:59:49 +000016198$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016199
16200fi
16201
Michael W. Hudson54241132001-12-07 15:38:26 +000016202
Matthias Kloseb9621712010-04-24 17:59:49 +000016203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16204$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016205if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016207else
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016209 ac_cv_broken_mbstowcs=no
16210else
Matthias Kloseb9621712010-04-24 17:59:49 +000016211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016212/* end confdefs.h. */
16213
Stefan Krah19c21392012-11-22 23:47:32 +010016214#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016215#include<stdlib.h>
16216int main() {
16217 size_t len = -1;
16218 const char *str = "text";
16219 len = mbstowcs(NULL, str, 0);
16220 return (len != 4);
16221}
16222
16223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016224if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016225 ac_cv_broken_mbstowcs=no
16226else
Matthias Kloseb9621712010-04-24 17:59:49 +000016227 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16230 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016231fi
16232
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016233fi
16234
Matthias Kloseb9621712010-04-24 17:59:49 +000016235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16236$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016237if test "$ac_cv_broken_mbstowcs" = yes
16238then
16239
Matthias Kloseb9621712010-04-24 17:59:49 +000016240$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016241
16242fi
16243
Antoine Pitroub52ec782009-01-25 16:34:23 +000016244# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16246$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016247
16248# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016249if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016250 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016251if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016252then
16253
Matthias Kloseb9621712010-04-24 17:59:49 +000016254$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16257$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016258fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016259if test "$withval" = no
16260then
16261
16262$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16263
Matthias Kloseb9621712010-04-24 17:59:49 +000016264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16265$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016266fi
16267
Antoine Pitrou042b1282010-08-13 21:15:58 +000016268else
16269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16270$as_echo "no value specified" >&6; }
16271fi
16272
Antoine Pitroub52ec782009-01-25 16:34:23 +000016273
Matthias Kloseb17289e2012-03-15 19:51:34 +010016274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16275$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16276if ${ac_cv_computed_gotos+:} false; then :
16277 $as_echo_n "(cached) " >&6
16278else
16279 if test "$cross_compiling" = yes; then :
16280 if test "${with_computed_gotos+set}" = set; then
16281 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16282 else
16283 ac_cv_computed_gotos=no
16284 fi
16285else
16286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287/* end confdefs.h. */
16288
16289int main(int argc, char **argv)
16290{
16291 static void *targets[1] = { &&LABEL1 };
16292 goto LABEL2;
16293LABEL1:
16294 return 0;
16295LABEL2:
16296 goto *targets[0];
16297 return 1;
16298}
16299
16300_ACEOF
16301if ac_fn_c_try_run "$LINENO"; then :
16302 ac_cv_computed_gotos=yes
16303else
16304 ac_cv_computed_gotos=no
16305fi
16306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16307 conftest.$ac_objext conftest.beam conftest.$ac_ext
16308fi
16309
16310fi
16311
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16313$as_echo "$ac_cv_computed_gotos" >&6; }
16314case "$ac_cv_computed_gotos" in yes*)
16315
16316$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16317
16318esac
16319
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016320case $ac_sys_system in
16321AIX*)
16322
16323$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16324 ;;
16325esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016326
Michael W. Hudson54241132001-12-07 15:38:26 +000016327
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016328
16329
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016330for h in `(cd $srcdir;echo Python/thread_*.h)`
16331do
16332 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16333done
16334
Michael W. Hudson54241132001-12-07 15:38:26 +000016335
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016336SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16338$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016339for dir in $SRCDIRS; do
16340 if test ! -d $dir; then
16341 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016343done
Matthias Kloseb9621712010-04-24 17:59:49 +000016344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16345$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016346
Stefan Krah1919b7e2012-03-21 18:25:23 +010016347# Availability of -O2:
16348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16349$as_echo_n "checking for -O2... " >&6; }
16350saved_cflags="$CFLAGS"
16351CFLAGS="-O2"
16352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16353/* end confdefs.h. */
16354
16355int
16356main ()
16357{
16358
16359
16360 ;
16361 return 0;
16362}
16363_ACEOF
16364if ac_fn_c_try_compile "$LINENO"; then :
16365 have_O2=yes
16366else
16367 have_O2=no
16368fi
16369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16371$as_echo "$have_O2" >&6; }
16372CFLAGS="$saved_cflags"
16373
16374# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16375# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16377$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16378saved_cflags="$CFLAGS"
16379CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16380if test "$have_O2" = no; then
16381 CFLAGS=""
16382fi
16383if test "$cross_compiling" = yes; then :
16384 have_glibc_memmove_bug=undefined
16385else
16386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16387/* end confdefs.h. */
16388
16389#include <stdio.h>
16390#include <stdlib.h>
16391#include <string.h>
16392void foo(void *p, void *q) { memmove(p, q, 19); }
16393int main() {
16394 char a[32] = "123456789000000000";
16395 foo(&a[9], a);
16396 if (strcmp(a, "123456789123456789000000000") != 0)
16397 return 1;
16398 foo(a, &a[9]);
16399 if (strcmp(a, "123456789000000000") != 0)
16400 return 1;
16401 return 0;
16402}
16403
16404_ACEOF
16405if ac_fn_c_try_run "$LINENO"; then :
16406 have_glibc_memmove_bug=no
16407else
16408 have_glibc_memmove_bug=yes
16409fi
16410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16411 conftest.$ac_objext conftest.beam conftest.$ac_ext
16412fi
16413
16414CFLAGS="$saved_cflags"
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16416$as_echo "$have_glibc_memmove_bug" >&6; }
16417if test "$have_glibc_memmove_bug" = yes; then
16418
16419$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16420
16421fi
16422
16423if test "$have_gcc_asm_for_x87" = yes; then
16424 # Some versions of gcc miscompile inline asm:
16425 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16426 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16427 case $CC in
16428 *gcc*)
16429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16430$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16431 saved_cflags="$CFLAGS"
16432 CFLAGS="-O2"
16433 if test "$cross_compiling" = yes; then :
16434 have_ipa_pure_const_bug=undefined
16435else
16436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16437/* end confdefs.h. */
16438
16439 __attribute__((noinline)) int
16440 foo(int *p) {
16441 int r;
16442 asm ( "movl \$6, (%1)\n\t"
16443 "xorl %0, %0\n\t"
16444 : "=r" (r) : "r" (p) : "memory"
16445 );
16446 return r;
16447 }
16448 int main() {
16449 int p = 8;
16450 if ((foo(&p) ? : p) != 6)
16451 return 1;
16452 return 0;
16453 }
16454
16455_ACEOF
16456if ac_fn_c_try_run "$LINENO"; then :
16457 have_ipa_pure_const_bug=no
16458else
16459 have_ipa_pure_const_bug=yes
16460fi
16461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16462 conftest.$ac_objext conftest.beam conftest.$ac_ext
16463fi
16464
16465 CFLAGS="$saved_cflags"
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16467$as_echo "$have_ipa_pure_const_bug" >&6; }
16468 if test "$have_ipa_pure_const_bug" = yes; then
16469
16470$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16471
16472 fi
16473 ;;
16474 esac
16475fi
16476
Victor Stinner4f5366e2015-01-09 02:13:19 +010016477# Check for stdatomic.h
16478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16479$as_echo_n "checking for stdatomic.h... " >&6; }
16480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16481/* end confdefs.h. */
16482
16483
16484 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016485 atomic_int value = ATOMIC_VAR_INIT(1);
16486 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016487 int main() {
16488 int loaded_value = atomic_load(&value);
16489 return 0;
16490 }
16491
16492
16493_ACEOF
16494if ac_fn_c_try_link "$LINENO"; then :
16495 have_stdatomic_h=yes
16496else
16497 have_stdatomic_h=no
16498fi
16499rm -f core conftest.err conftest.$ac_objext \
16500 conftest$ac_exeext conftest.$ac_ext
16501
16502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16503$as_echo "$have_stdatomic_h" >&6; }
16504
16505if test "$have_stdatomic_h" = yes; then
16506
16507$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16508
16509fi
16510
16511# Check for GCC >= 4.7 __atomic builtins
16512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16513$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16515/* end confdefs.h. */
16516
16517
16518 volatile int val = 1;
16519 int main() {
16520 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16521 return 0;
16522 }
16523
16524
16525_ACEOF
16526if ac_fn_c_try_link "$LINENO"; then :
16527 have_builtin_atomic=yes
16528else
16529 have_builtin_atomic=no
16530fi
16531rm -f core conftest.err conftest.$ac_objext \
16532 conftest$ac_exeext conftest.$ac_ext
16533
16534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16535$as_echo "$have_builtin_atomic" >&6; }
16536
16537if test "$have_builtin_atomic" = yes; then
16538
16539$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16540
16541fi
16542
Ned Deily322f5ba2013-11-21 23:01:59 -080016543# ensurepip option
16544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16545$as_echo_n "checking for ensurepip... " >&6; }
16546
16547# Check whether --with-ensurepip was given.
16548if test "${with_ensurepip+set}" = set; then :
16549 withval=$with_ensurepip;
16550else
16551 with_ensurepip=upgrade
16552fi
16553
16554case $with_ensurepip in #(
16555 yes|upgrade) :
16556 ENSUREPIP=upgrade ;; #(
16557 install) :
16558 ENSUREPIP=install ;; #(
16559 no) :
16560 ENSUREPIP=no ;; #(
16561 *) :
16562 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16563esac
16564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16565$as_echo "$ENSUREPIP" >&6; }
16566
16567
Victor Stinner35a97c02015-03-08 02:59:09 +010016568# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16570$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16572/* end confdefs.h. */
16573
16574
16575 #include <dirent.h>
16576
16577 int main() {
16578 struct dirent entry;
16579 return entry.d_type == DT_UNKNOWN;
16580 }
16581
16582
16583_ACEOF
16584if ac_fn_c_try_link "$LINENO"; then :
16585 have_dirent_d_type=yes
16586else
16587 have_dirent_d_type=no
16588fi
16589rm -f core conftest.err conftest.$ac_objext \
16590 conftest$ac_exeext conftest.$ac_ext
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16592$as_echo "$have_dirent_d_type" >&6; }
16593
16594if test "$have_dirent_d_type" = yes; then
16595
16596$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16597
16598fi
16599
Victor Stinner9eb57c52015-03-19 22:21:49 +010016600# check if the Linux getrandom() syscall is available
16601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16602$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16604/* end confdefs.h. */
16605
16606
Victor Stinner1b80b242016-04-12 22:34:58 +020016607 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016608 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016609 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016610
16611 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016612 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016613 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016614 const int flags = GRND_NONBLOCK;
16615 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016616 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016617 return 0;
16618 }
16619
16620
16621_ACEOF
16622if ac_fn_c_try_link "$LINENO"; then :
16623 have_getrandom_syscall=yes
16624else
16625 have_getrandom_syscall=no
16626fi
16627rm -f core conftest.err conftest.$ac_objext \
16628 conftest$ac_exeext conftest.$ac_ext
16629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16630$as_echo "$have_getrandom_syscall" >&6; }
16631
16632if test "$have_getrandom_syscall" = yes; then
16633
16634$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16635
16636fi
16637
Victor Stinner3abf44e2015-09-18 15:38:37 +020016638# check if the getrandom() function is available
16639# the test was written for the Solaris function of <sys/random.h>
16640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16641$as_echo_n "checking for the getrandom() function... " >&6; }
16642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16643/* end confdefs.h. */
16644
16645
16646 #include <sys/random.h>
16647
16648 int main() {
16649 char buffer[1];
16650 const size_t buflen = sizeof(buffer);
16651 const int flags = 0;
16652 /* ignore the result, Python checks for ENOSYS at runtime */
16653 (void)getrandom(buffer, buflen, flags);
16654 return 0;
16655 }
16656
16657
16658_ACEOF
16659if ac_fn_c_try_link "$LINENO"; then :
16660 have_getrandom=yes
16661else
16662 have_getrandom=no
16663fi
16664rm -f core conftest.err conftest.$ac_objext \
16665 conftest$ac_exeext conftest.$ac_ext
16666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16667$as_echo "$have_getrandom" >&6; }
16668
16669if test "$have_getrandom" = yes; then
16670
16671$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16672
16673fi
16674
Christian Heimesff5be6e2018-01-20 13:19:21 +010016675# Check for usable OpenSSL
16676
16677 found=false
16678
16679# Check whether --with-openssl was given.
16680if test "${with_openssl+set}" = set; then :
16681 withval=$with_openssl;
16682 case "$withval" in
16683 "" | y | ye | yes | n | no)
16684 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16685 ;;
16686 *) ssldirs="$withval"
16687 ;;
16688 esac
16689
16690else
16691
16692 # if pkg-config is installed and openssl has installed a .pc file,
16693 # then use that information and don't search ssldirs
16694 if test -n "$ac_tool_prefix"; then
16695 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16696set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16698$as_echo_n "checking for $ac_word... " >&6; }
16699if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16700 $as_echo_n "(cached) " >&6
16701else
16702 if test -n "$PKG_CONFIG"; then
16703 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16704else
16705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16706for as_dir in $PATH
16707do
16708 IFS=$as_save_IFS
16709 test -z "$as_dir" && as_dir=.
16710 for ac_exec_ext in '' $ac_executable_extensions; do
16711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16712 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16714 break 2
16715 fi
16716done
16717 done
16718IFS=$as_save_IFS
16719
16720fi
16721fi
16722PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16723if test -n "$PKG_CONFIG"; then
16724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16725$as_echo "$PKG_CONFIG" >&6; }
16726else
16727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16728$as_echo "no" >&6; }
16729fi
16730
16731
16732fi
16733if test -z "$ac_cv_prog_PKG_CONFIG"; then
16734 ac_ct_PKG_CONFIG=$PKG_CONFIG
16735 # Extract the first word of "pkg-config", so it can be a program name with args.
16736set dummy pkg-config; ac_word=$2
16737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16738$as_echo_n "checking for $ac_word... " >&6; }
16739if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16740 $as_echo_n "(cached) " >&6
16741else
16742 if test -n "$ac_ct_PKG_CONFIG"; then
16743 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16744else
16745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16746for as_dir in $PATH
16747do
16748 IFS=$as_save_IFS
16749 test -z "$as_dir" && as_dir=.
16750 for ac_exec_ext in '' $ac_executable_extensions; do
16751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16752 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16754 break 2
16755 fi
16756done
16757 done
16758IFS=$as_save_IFS
16759
16760fi
16761fi
16762ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16763if test -n "$ac_ct_PKG_CONFIG"; then
16764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16765$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16766else
16767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16768$as_echo "no" >&6; }
16769fi
16770
16771 if test "x$ac_ct_PKG_CONFIG" = x; then
16772 PKG_CONFIG=""
16773 else
16774 case $cross_compiling:$ac_tool_warned in
16775yes:)
16776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16778ac_tool_warned=yes ;;
16779esac
16780 PKG_CONFIG=$ac_ct_PKG_CONFIG
16781 fi
16782else
16783 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16784fi
16785
16786 if test x"$PKG_CONFIG" != x""; then
16787 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16788 if test $? = 0; then
16789 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16790 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16791 found=true
16792 fi
16793 fi
16794
16795 # no such luck; use some default ssldirs
16796 if ! $found; then
16797 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16798 fi
16799
16800
16801fi
16802
16803
16804
16805 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16806 # an 'openssl' subdirectory
16807
16808 if ! $found; then
16809 OPENSSL_INCLUDES=
16810 for ssldir in $ssldirs; do
16811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16812$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16813 if test -f "$ssldir/include/openssl/ssl.h"; then
16814 OPENSSL_INCLUDES="-I$ssldir/include"
16815 OPENSSL_LDFLAGS="-L$ssldir/lib"
16816 OPENSSL_LIBS="-lssl -lcrypto"
16817 found=true
16818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16819$as_echo "yes" >&6; }
16820 break
16821 else
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16823$as_echo "no" >&6; }
16824 fi
16825 done
16826
16827 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16828 # it will just work!
16829 fi
16830
16831 # try the preprocessor and linker with our new flags,
16832 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16833
16834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16835$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16836 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16837 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16838
16839 save_LIBS="$LIBS"
16840 save_LDFLAGS="$LDFLAGS"
16841 save_CPPFLAGS="$CPPFLAGS"
16842 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16843 LIBS="$OPENSSL_LIBS $LIBS"
16844 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16846/* end confdefs.h. */
16847#include <openssl/ssl.h>
16848int
16849main ()
16850{
16851SSL_new(NULL)
16852 ;
16853 return 0;
16854}
16855_ACEOF
16856if ac_fn_c_try_link "$LINENO"; then :
16857
16858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16859$as_echo "yes" >&6; }
16860 have_openssl=yes
16861
16862else
16863
16864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16865$as_echo "no" >&6; }
16866 have_openssl=no
16867
16868fi
16869rm -f core conftest.err conftest.$ac_objext \
16870 conftest$ac_exeext conftest.$ac_ext
16871 CPPFLAGS="$save_CPPFLAGS"
16872 LDFLAGS="$save_LDFLAGS"
16873 LIBS="$save_LIBS"
16874
16875
16876
16877
16878
16879
16880if test "$have_openssl" = yes; then
16881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16882$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16883
16884 save_LIBS="$LIBS"
16885 save_LDFLAGS="$LDFLAGS"
16886 save_CPPFLAGS="$CPPFLAGS"
16887 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16888 LIBS="$OPENSSL_LIBS $LIBS"
16889 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16890
16891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16892/* end confdefs.h. */
16893
16894 #include <openssl/x509_vfy.h>
16895
16896int
16897main ()
16898{
16899
16900 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16901 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16902 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16903 X509_VERIFY_PARAM_set_hostflags(p, 0);
16904
16905 ;
16906 return 0;
16907}
16908
16909_ACEOF
16910if ac_fn_c_try_link "$LINENO"; then :
16911
16912 ac_cv_has_x509_verify_param_set1_host=yes
16913
16914else
16915
16916 ac_cv_has_x509_verify_param_set1_host=no
16917
16918fi
16919rm -f core conftest.err conftest.$ac_objext \
16920 conftest$ac_exeext conftest.$ac_ext
16921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16922$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16923 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16924
16925$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16926
16927 fi
16928
16929 CPPFLAGS="$save_CPPFLAGS"
16930 LDFLAGS="$save_LDFLAGS"
16931 LIBS="$save_LIBS"
16932fi
16933
Guido van Rossum627b2d71993-12-24 10:39:16 +000016934# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016935ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016936
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016937ac_config_files="$ac_config_files Modules/ld_so_aix"
16938
Martin v. Löwis11437992002-04-12 09:54:03 +000016939cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016940# This file is a shell script that caches the results of configure
16941# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016942# scripts and configure runs, see configure's option --config-cache.
16943# It is not useful on other systems. If it contains results you don't
16944# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016945#
Martin v. Löwis11437992002-04-12 09:54:03 +000016946# config.status only pays attention to the cache file if you give it
16947# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016948#
Skip Montanaro6dead952003-09-25 14:50:04 +000016949# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016950# loading this file, other *unset* `ac_cv_foo' will be assigned the
16951# following values.
16952
16953_ACEOF
16954
Guido van Rossumf78abae1997-01-21 22:02:36 +000016955# The following way of writing the cache mishandles newlines in values,
16956# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016958# Ultrix sh set writes to stderr and can't be redirected directly,
16959# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960(
16961 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16962 eval ac_val=\$$ac_var
16963 case $ac_val in #(
16964 *${as_nl}*)
16965 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016966 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16967$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016968 esac
16969 case $ac_var in #(
16970 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016971 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16972 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016973 esac ;;
16974 esac
16975 done
16976
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16979 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016980 # `set' does not quote correctly, so add quotes: double-quote
16981 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016983 "s/'/'\\\\''/g;
16984 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016985 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016986 *)
16987 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016990 esac |
16991 sort
16992) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016993 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016994 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016995 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016997 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16998 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17000 :end' >>confcache
17001if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17002 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017003 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017004 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17005$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017006 if test ! -f "$cache_file" || test -h "$cache_file"; then
17007 cat confcache >"$cache_file"
17008 else
17009 case $cache_file in #(
17010 */* | ?:*)
17011 mv -f confcache "$cache_file"$$ &&
17012 mv -f "$cache_file"$$ "$cache_file" ;; #(
17013 *)
17014 mv -f confcache "$cache_file" ;;
17015 esac
17016 fi
17017 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017018 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017019 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17020$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017021 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017022fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017023rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017024
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017025test "x$prefix" = xNONE && prefix=$ac_default_prefix
17026# Let make expand exec_prefix.
17027test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017028
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017029DEFS=-DHAVE_CONFIG_H
17030
Skip Montanaro6dead952003-09-25 14:50:04 +000017031ac_libobjs=
17032ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017033U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017034for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17035 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017037 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17039 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017040 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17041 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017042done
17043LIBOBJS=$ac_libobjs
17044
17045LTLIBOBJS=$ac_ltlibobjs
17046
17047
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
Matthias Kloseb9621712010-04-24 17:59:49 +000017049
Victor Stinnere0be4232011-10-25 13:06:09 +020017050: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017051ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017052ac_clean_files_save=$ac_clean_files
17053ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017054{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17055$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17056as_write_fail=0
17057cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017058#! $SHELL
17059# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017060# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017061# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017062# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017063
Martin v. Löwis11437992002-04-12 09:54:03 +000017064debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017065ac_cs_recheck=false
17066ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017067
Matthias Kloseb9621712010-04-24 17:59:49 +000017068SHELL=\${CONFIG_SHELL-$SHELL}
17069export SHELL
17070_ASEOF
17071cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17072## -------------------- ##
17073## M4sh Initialization. ##
17074## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076# Be more Bourne compatible
17077DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017078if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 emulate sh
17080 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017081 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017082 # is contrary to our usage. Disable this feature.
17083 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017085else
Matthias Kloseb9621712010-04-24 17:59:49 +000017086 case `(set -o) 2>/dev/null` in #(
17087 *posix*) :
17088 set -o posix ;; #(
17089 *) :
17090 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017092fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017093
17094
Matthias Kloseb9621712010-04-24 17:59:49 +000017095as_nl='
17096'
17097export as_nl
17098# Printing a long string crashes Solaris 7 /usr/bin/printf.
17099as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17100as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17101as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17102# Prefer a ksh shell builtin over an external printf program on Solaris,
17103# but without wasting forks for bash or zsh.
17104if test -z "$BASH_VERSION$ZSH_VERSION" \
17105 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17106 as_echo='print -r --'
17107 as_echo_n='print -rn --'
17108elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17109 as_echo='printf %s\n'
17110 as_echo_n='printf %s'
17111else
17112 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17113 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17114 as_echo_n='/usr/ucb/echo -n'
17115 else
17116 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17117 as_echo_n_body='eval
17118 arg=$1;
17119 case $arg in #(
17120 *"$as_nl"*)
17121 expr "X$arg" : "X\\(.*\\)$as_nl";
17122 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17123 esac;
17124 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17125 '
17126 export as_echo_n_body
17127 as_echo_n='sh -c $as_echo_n_body as_echo'
17128 fi
17129 export as_echo_body
17130 as_echo='sh -c $as_echo_body as_echo'
17131fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017132
17133# The user is always right.
17134if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017135 PATH_SEPARATOR=:
17136 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17137 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17138 PATH_SEPARATOR=';'
17139 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142
17143# IFS
17144# We need space, tab and new line, in precisely that order. Quoting is
17145# there to prevent editors from complaining about space-tab.
17146# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17147# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017148IFS=" "" $as_nl"
17149
17150# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017151as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017152case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017153 *[\\/]* ) as_myself=$0 ;;
17154 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017155for as_dir in $PATH
17156do
17157 IFS=$as_save_IFS
17158 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017159 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17160 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017161IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163 ;;
17164esac
17165# We did not find ourselves, most probably we were run as `sh COMMAND'
17166# in which case we are not to be found in the path.
17167if test "x$as_myself" = x; then
17168 as_myself=$0
17169fi
17170if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017171 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17172 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017173fi
17174
Matthias Kloseb9621712010-04-24 17:59:49 +000017175# Unset variables that we do not need and which cause bugs (e.g. in
17176# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17177# suppresses any "Segmentation fault" message there. '((' could
17178# trigger a bug in pdksh 5.2.14.
17179for as_var in BASH_ENV ENV MAIL MAILPATH
17180do eval test x\${$as_var+set} = xset \
17181 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182done
17183PS1='$ '
17184PS2='> '
17185PS4='+ '
17186
17187# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017188LC_ALL=C
17189export LC_ALL
17190LANGUAGE=C
17191export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192
Matthias Kloseb9621712010-04-24 17:59:49 +000017193# CDPATH.
17194(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17195
17196
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017197# as_fn_error STATUS ERROR [LINENO LOG_FD]
17198# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017199# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17200# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017201# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017202as_fn_error ()
17203{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017204 as_status=$1; test $as_status -eq 0 && as_status=1
17205 if test "$4"; then
17206 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17207 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017208 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017209 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017210 as_fn_exit $as_status
17211} # as_fn_error
17212
17213
17214# as_fn_set_status STATUS
17215# -----------------------
17216# Set $? to STATUS, without forking.
17217as_fn_set_status ()
17218{
17219 return $1
17220} # as_fn_set_status
17221
17222# as_fn_exit STATUS
17223# -----------------
17224# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17225as_fn_exit ()
17226{
17227 set +e
17228 as_fn_set_status $1
17229 exit $1
17230} # as_fn_exit
17231
17232# as_fn_unset VAR
17233# ---------------
17234# Portably unset VAR.
17235as_fn_unset ()
17236{
17237 { eval $1=; unset $1;}
17238}
17239as_unset=as_fn_unset
17240# as_fn_append VAR VALUE
17241# ----------------------
17242# Append the text in VALUE to the end of the definition contained in VAR. Take
17243# advantage of any shell optimizations that allow amortized linear growth over
17244# repeated appends, instead of the typical quadratic growth present in naive
17245# implementations.
17246if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17247 eval 'as_fn_append ()
17248 {
17249 eval $1+=\$2
17250 }'
17251else
17252 as_fn_append ()
17253 {
17254 eval $1=\$$1\$2
17255 }
17256fi # as_fn_append
17257
17258# as_fn_arith ARG...
17259# ------------------
17260# Perform arithmetic evaluation on the ARGs, and store the result in the
17261# global $as_val. Take advantage of shells that can avoid forks. The arguments
17262# must be portable across $(()) and expr.
17263if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17264 eval 'as_fn_arith ()
17265 {
17266 as_val=$(( $* ))
17267 }'
17268else
17269 as_fn_arith ()
17270 {
17271 as_val=`expr "$@" || test $? -eq 1`
17272 }
17273fi # as_fn_arith
17274
17275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276if expr a : '\(a\)' >/dev/null 2>&1 &&
17277 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17278 as_expr=expr
17279else
17280 as_expr=false
17281fi
17282
17283if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17284 as_basename=basename
17285else
17286 as_basename=false
17287fi
17288
Matthias Kloseb9621712010-04-24 17:59:49 +000017289if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17290 as_dirname=dirname
17291else
17292 as_dirname=false
17293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295as_me=`$as_basename -- "$0" ||
17296$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17297 X"$0" : 'X\(//\)$' \| \
17298 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017299$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017300 sed '/^.*\/\([^/][^/]*\)\/*$/{
17301 s//\1/
17302 q
17303 }
17304 /^X\/\(\/\/\)$/{
17305 s//\1/
17306 q
17307 }
17308 /^X\/\(\/\).*/{
17309 s//\1/
17310 q
17311 }
17312 s/.*/./; q'`
17313
Matthias Kloseb9621712010-04-24 17:59:49 +000017314# Avoid depending upon Character Ranges.
17315as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17316as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17317as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17318as_cr_digits='0123456789'
17319as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320
17321ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017322case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017324 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017326 xy) ECHO_C='\c';;
17327 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17328 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 esac;;
17330*)
17331 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017333
Martin v. Löwis11437992002-04-12 09:54:03 +000017334rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335if test -d conf$$.dir; then
17336 rm -f conf$$.dir/conf$$.file
17337else
17338 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017339 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017341if (echo >conf$$.file) 2>/dev/null; then
17342 if ln -s conf$$.file conf$$ 2>/dev/null; then
17343 as_ln_s='ln -s'
17344 # ... but there are two gotchas:
17345 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17346 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017347 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017348 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017349 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 elif ln conf$$.file conf$$ 2>/dev/null; then
17351 as_ln_s=ln
17352 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017353 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017354 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017355else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017356 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17359rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017360
Matthias Kloseb9621712010-04-24 17:59:49 +000017361
17362# as_fn_mkdir_p
17363# -------------
17364# Create "$as_dir" as a directory, including parents if necessary.
17365as_fn_mkdir_p ()
17366{
17367
17368 case $as_dir in #(
17369 -*) as_dir=./$as_dir;;
17370 esac
17371 test -d "$as_dir" || eval $as_mkdir_p || {
17372 as_dirs=
17373 while :; do
17374 case $as_dir in #(
17375 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17376 *) as_qdir=$as_dir;;
17377 esac
17378 as_dirs="'$as_qdir' $as_dirs"
17379 as_dir=`$as_dirname -- "$as_dir" ||
17380$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17381 X"$as_dir" : 'X\(//\)[^/]' \| \
17382 X"$as_dir" : 'X\(//\)$' \| \
17383 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17384$as_echo X"$as_dir" |
17385 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17386 s//\1/
17387 q
17388 }
17389 /^X\(\/\/\)[^/].*/{
17390 s//\1/
17391 q
17392 }
17393 /^X\(\/\/\)$/{
17394 s//\1/
17395 q
17396 }
17397 /^X\(\/\).*/{
17398 s//\1/
17399 q
17400 }
17401 s/.*/./; q'`
17402 test -d "$as_dir" && break
17403 done
17404 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017405 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017406
17407
17408} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017409if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017411else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017412 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017413 as_mkdir_p=false
17414fi
17415
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017416
17417# as_fn_executable_p FILE
17418# -----------------------
17419# Test if FILE is an executable regular file.
17420as_fn_executable_p ()
17421{
17422 test -f "$1" && test -x "$1"
17423} # as_fn_executable_p
17424as_test_x='test -x'
17425as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017426
17427# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017428as_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 +000017429
17430# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017431as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017432
17433
Martin v. Löwis11437992002-04-12 09:54:03 +000017434exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017435## ----------------------------------- ##
17436## Main body of $CONFIG_STATUS script. ##
17437## ----------------------------------- ##
17438_ASEOF
17439test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017440
Matthias Kloseb9621712010-04-24 17:59:49 +000017441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17442# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017443# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444# values after options handling.
17445ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017446This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017447generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017448
17449 CONFIG_FILES = $CONFIG_FILES
17450 CONFIG_HEADERS = $CONFIG_HEADERS
17451 CONFIG_LINKS = $CONFIG_LINKS
17452 CONFIG_COMMANDS = $CONFIG_COMMANDS
17453 $ $0 $@
17454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455on `(hostname || uname -n) 2>/dev/null | sed 1q`
17456"
17457
Martin v. Löwis11437992002-04-12 09:54:03 +000017458_ACEOF
17459
Matthias Kloseb9621712010-04-24 17:59:49 +000017460case $ac_config_files in *"
17461"*) set x $ac_config_files; shift; ac_config_files=$*;;
17462esac
17463
17464case $ac_config_headers in *"
17465"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17466esac
17467
17468
17469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017470# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017471config_files="$ac_config_files"
17472config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017475
Matthias Kloseb9621712010-04-24 17:59:49 +000017476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017477ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017478\`$as_me' instantiates files and other configuration actions
17479from templates according to the current configuration. Unless the files
17480and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017481
Matthias Kloseb9621712010-04-24 17:59:49 +000017482Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017483
17484 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017486 --config print configuration, then exit
17487 -q, --quiet, --silent
17488 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017489 -d, --debug don't remove temporary files
17490 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017491 --file=FILE[:TEMPLATE]
17492 instantiate the configuration file FILE
17493 --header=FILE[:TEMPLATE]
17494 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017495
17496Configuration files:
17497$config_files
17498
17499Configuration headers:
17500$config_headers
17501
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017502Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017505cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17506ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017507ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017508python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017509configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017510 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017511
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017512Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017513This config.status script is free software; the Free Software Foundation
17514gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017515
17516ac_pwd='$ac_pwd'
17517srcdir='$srcdir'
17518INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017519MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017520test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017521_ACEOF
17522
Matthias Kloseb9621712010-04-24 17:59:49 +000017523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17524# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017525ac_need_defaults=:
17526while test $# != 0
17527do
17528 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017529 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17531 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017532 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017534 --*=)
17535 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17536 ac_optarg=
17537 ac_shift=:
17538 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017540 ac_option=$1
17541 ac_optarg=$2
17542 ac_shift=shift
17543 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017544 esac
17545
Skip Montanaro6dead952003-09-25 14:50:04 +000017546 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017548 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17549 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017551 $as_echo "$ac_cs_version"; exit ;;
17552 --config | --confi | --conf | --con | --co | --c )
17553 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017555 debug=: ;;
17556 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017557 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 case $ac_optarg in
17559 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017560 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 esac
17562 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017563 ac_need_defaults=false;;
17564 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017565 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017566 case $ac_optarg in
17567 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17568 esac
17569 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017570 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571 --he | --h)
17572 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017573 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017574Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017576 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017577 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17578 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17579 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017580
17581 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017582 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017583Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017584
Matthias Kloseb9621712010-04-24 17:59:49 +000017585 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017587
17588 esac
17589 shift
17590done
17591
Skip Montanaro6dead952003-09-25 14:50:04 +000017592ac_configure_extra_args=
17593
17594if $ac_cs_silent; then
17595 exec 6>/dev/null
17596 ac_configure_extra_args="$ac_configure_extra_args --silent"
17597fi
17598
17599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017600cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017601if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017602 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017603 shift
17604 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17605 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017608fi
17609
Martin v. Löwis11437992002-04-12 09:54:03 +000017610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017612exec 5>>config.log
17613{
17614 echo
17615 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17616## Running $as_me. ##
17617_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017618 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017622cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017624
Matthias Kloseb9621712010-04-24 17:59:49 +000017625cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626
17627# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017628for ac_config_target in $ac_config_targets
17629do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630 case $ac_config_target in
17631 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17632 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17633 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017634 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17635 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017636 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017637 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017638 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017639 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640
Victor Stinnere0be4232011-10-25 13:06:09 +020017641 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 esac
17643done
17644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017645
Martin v. Löwis11437992002-04-12 09:54:03 +000017646# If the user did not use the arguments to specify the items to instantiate,
17647# then the envvar interface is used. Set only those that are not.
17648# We use the long form for the default assignment because of an extremely
17649# bizarre bug on SunOS 4.1.3.
17650if $ac_need_defaults; then
17651 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17652 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17653fi
17654
Skip Montanaro6dead952003-09-25 14:50:04 +000017655# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017657# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658# Hook for its removal unless debugging.
17659# Note that there is a small window in which the directory will not be cleaned:
17660# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017661$debug ||
17662{
Victor Stinnere0be4232011-10-25 13:06:09 +020017663 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017665 : "${ac_tmp:=$tmp}"
17666 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017668 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017669}
Martin v. Löwis11437992002-04-12 09:54:03 +000017670# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017671
Martin v. Löwis11437992002-04-12 09:54:03 +000017672{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017674 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017675} ||
17676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677 tmp=./conf$$-$RANDOM
17678 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017679} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017680ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017681
Matthias Kloseb9621712010-04-24 17:59:49 +000017682# Set up the scripts for CONFIG_FILES section.
17683# No need to generate them if there are no CONFIG_FILES.
17684# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017685if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017686
Matthias Kloseb9621712010-04-24 17:59:49 +000017687
17688ac_cr=`echo X | tr X '\015'`
17689# On cygwin, bash can eat \r inside `` if the user requested igncr.
17690# But we know of no other shell where ac_cr would be empty at this
17691# point, so we can use a bashism as a fallback.
17692if test "x$ac_cr" = x; then
17693 eval ac_cr=\$\'\\r\'
17694fi
17695ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17696if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017697 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017698else
17699 ac_cs_awk_cr=$ac_cr
17700fi
17701
Victor Stinnere0be4232011-10-25 13:06:09 +020017702echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017703_ACEOF
17704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017705
Matthias Kloseb9621712010-04-24 17:59:49 +000017706{
17707 echo "cat >conf$$subs.awk <<_ACEOF" &&
17708 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17709 echo "_ACEOF"
17710} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017711 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17712ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713ac_delim='%!_!# '
17714for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017715 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017716 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17719 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 break
17721 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017722 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723 else
17724 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017725 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017726done
Matthias Kloseb9621712010-04-24 17:59:49 +000017727rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728
Matthias Kloseb9621712010-04-24 17:59:49 +000017729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017730cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017732sed -n '
17733h
17734s/^/S["/; s/!.*/"]=/
17735p
17736g
17737s/^[^!]*!//
17738:repl
17739t repl
17740s/'"$ac_delim"'$//
17741t delim
17742:nl
17743h
17744s/\(.\{148\}\)..*/\1/
17745t more1
17746s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17747p
17748n
17749b repl
17750:more1
17751s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17752p
17753g
17754s/.\{148\}//
17755t nl
17756:delim
17757h
17758s/\(.\{148\}\)..*/\1/
17759t more2
17760s/["\\]/\\&/g; s/^/"/; s/$/"/
17761p
17762b
17763:more2
17764s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17765p
17766g
17767s/.\{148\}//
17768t delim
17769' <conf$$subs.awk | sed '
17770/^[^""]/{
17771 N
17772 s/\n//
17773}
17774' >>$CONFIG_STATUS || ac_write_fail=1
17775rm -f conf$$subs.awk
17776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17777_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017778cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017779 for (key in S) S_is_set[key] = 1
17780 FS = ""
17781
17782}
17783{
17784 line = $ 0
17785 nfields = split(line, field, "@")
17786 substed = 0
17787 len = length(field[1])
17788 for (i = 2; i < nfields; i++) {
17789 key = field[i]
17790 keylen = length(key)
17791 if (S_is_set[key]) {
17792 value = S[key]
17793 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17794 len += length(value) + length(field[++i])
17795 substed = 1
17796 } else
17797 len += 1 + keylen
17798 }
17799
17800 print line
17801}
17802
17803_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017805cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17806if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17807 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17808else
17809 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017810fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017811 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017812_ACEOF
17813
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017814# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17815# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816# trailing colons and then remove the whole line if VPATH becomes empty
17817# (actually we leave an empty line to preserve line numbers).
17818if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017819 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17820h
17821s///
17822s/^/:/
17823s/[ ]*$/:/
17824s/:\$(srcdir):/:/g
17825s/:\${srcdir}:/:/g
17826s/:@srcdir@:/:/g
17827s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017829x
17830s/\(=[ ]*\).*/\1/
17831G
17832s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017833s/^[^=]*=[ ]*$//
17834}'
17835fi
17836
Matthias Kloseb9621712010-04-24 17:59:49 +000017837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017838fi # test -n "$CONFIG_FILES"
17839
Matthias Kloseb9621712010-04-24 17:59:49 +000017840# Set up the scripts for CONFIG_HEADERS section.
17841# No need to generate them if there are no CONFIG_HEADERS.
17842# This happens for instance with `./config.status Makefile'.
17843if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017844cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017845BEGIN {
17846_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847
Matthias Kloseb9621712010-04-24 17:59:49 +000017848# Transform confdefs.h into an awk script `defines.awk', embedded as
17849# here-document in config.status, that substitutes the proper values into
17850# config.h.in to produce config.h.
17851
17852# Create a delimiter string that does not exist in confdefs.h, to ease
17853# handling of long lines.
17854ac_delim='%!_!# '
17855for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017856 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17857 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017858 break
17859 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017860 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017861 else
17862 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17863 fi
17864done
17865
17866# For the awk script, D is an array of macro values keyed by name,
17867# likewise P contains macro parameters if any. Preserve backslash
17868# newline sequences.
17869
17870ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17871sed -n '
17872s/.\{148\}/&'"$ac_delim"'/g
17873t rset
17874:rset
17875s/^[ ]*#[ ]*define[ ][ ]*/ /
17876t def
17877d
17878:def
17879s/\\$//
17880t bsnl
17881s/["\\]/\\&/g
17882s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17883D["\1"]=" \3"/p
17884s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17885d
17886:bsnl
17887s/["\\]/\\&/g
17888s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17889D["\1"]=" \3\\\\\\n"\\/p
17890t cont
17891s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17892t cont
17893d
17894:cont
17895n
17896s/.\{148\}/&'"$ac_delim"'/g
17897t clear
17898:clear
17899s/\\$//
17900t bsnlc
17901s/["\\]/\\&/g; s/^/"/; s/$/"/p
17902d
17903:bsnlc
17904s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17905b cont
17906' <confdefs.h | sed '
17907s/'"$ac_delim"'/"\\\
17908"/g' >>$CONFIG_STATUS || ac_write_fail=1
17909
17910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17911 for (key in D) D_is_set[key] = 1
17912 FS = ""
17913}
17914/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17915 line = \$ 0
17916 split(line, arg, " ")
17917 if (arg[1] == "#") {
17918 defundef = arg[2]
17919 mac1 = arg[3]
17920 } else {
17921 defundef = substr(arg[1], 2)
17922 mac1 = arg[2]
17923 }
17924 split(mac1, mac2, "(") #)
17925 macro = mac2[1]
17926 prefix = substr(line, 1, index(line, defundef) - 1)
17927 if (D_is_set[macro]) {
17928 # Preserve the white space surrounding the "#".
17929 print prefix "define", macro P[macro] D[macro]
17930 next
17931 } else {
17932 # Replace #undef with comments. This is necessary, for example,
17933 # in the case of _POSIX_SOURCE, which is predefined and required
17934 # on some systems where configure will not decide to define it.
17935 if (defundef == "undef") {
17936 print "/*", prefix defundef, macro, "*/"
17937 next
17938 }
17939 }
17940}
17941{ print }
17942_ACAWK
17943_ACEOF
17944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017945 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017946fi # test -n "$CONFIG_HEADERS"
17947
17948
17949eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17950shift
17951for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952do
17953 case $ac_tag in
17954 :[FHLC]) ac_mode=$ac_tag; continue;;
17955 esac
17956 case $ac_mode$ac_tag in
17957 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017958 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959 :[FH]-) ac_tag=-:-;;
17960 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17961 esac
17962 ac_save_IFS=$IFS
17963 IFS=:
17964 set x $ac_tag
17965 IFS=$ac_save_IFS
17966 shift
17967 ac_file=$1
17968 shift
17969
17970 case $ac_mode in
17971 :L) ac_source=$1;;
17972 :[FH])
17973 ac_file_inputs=
17974 for ac_f
17975 do
17976 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017977 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 *) # Look for the file first in the build tree, then in the source tree
17979 # (if the path is not absolute). The absolute path cannot be DOS-style,
17980 # because $ac_f cannot contain `:'.
17981 test -f "$ac_f" ||
17982 case $ac_f in
17983 [\\/$]*) false;;
17984 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17985 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017986 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017988 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17989 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990 done
17991
17992 # Let's still pretend it is `configure' which instantiates (i.e., don't
17993 # use $as_me), people would be surprised to read:
17994 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017995 configure_input='Generated from '`
17996 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17997 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998 if test x"$ac_file" != x-; then
17999 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018000 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18001$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018003 # Neutralize special characters interpreted by sed in replacement strings.
18004 case $configure_input in #(
18005 *\&* | *\|* | *\\* )
18006 ac_sed_conf_input=`$as_echo "$configure_input" |
18007 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18008 *) ac_sed_conf_input=$configure_input;;
18009 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010
18011 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018012 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18013 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014 esac
18015 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018016 esac
18017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018019$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018020 X"$ac_file" : 'X\(//\)[^/]' \| \
18021 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018023$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18025 s//\1/
18026 q
18027 }
18028 /^X\(\/\/\)[^/].*/{
18029 s//\1/
18030 q
18031 }
18032 /^X\(\/\/\)$/{
18033 s//\1/
18034 q
18035 }
18036 /^X\(\/\).*/{
18037 s//\1/
18038 q
18039 }
18040 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018041 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018042 ac_builddir=.
18043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044case "$ac_dir" in
18045.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18046*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018047 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018049 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050 case $ac_top_builddir_sub in
18051 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18052 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18053 esac ;;
18054esac
18055ac_abs_top_builddir=$ac_pwd
18056ac_abs_builddir=$ac_pwd$ac_dir_suffix
18057# for backward compatibility:
18058ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018059
18060case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018062 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063 ac_top_srcdir=$ac_top_builddir_sub
18064 ac_abs_top_srcdir=$ac_pwd ;;
18065 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018066 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 ac_top_srcdir=$srcdir
18068 ac_abs_top_srcdir=$srcdir ;;
18069 *) # Relative name.
18070 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18071 ac_top_srcdir=$ac_top_build_prefix$srcdir
18072 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018073esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018075
Martin v. Löwis11437992002-04-12 09:54:03 +000018076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077 case $ac_mode in
18078 :F)
18079 #
18080 # CONFIG_FILE
18081 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018082
18083 case $INSTALL in
18084 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018085 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018086 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018087 ac_MKDIR_P=$MKDIR_P
18088 case $MKDIR_P in
18089 [\\/$]* | ?:[\\/]* ) ;;
18090 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18091 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018092_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093
Matthias Kloseb9621712010-04-24 17:59:49 +000018094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018095# If the template does not know about datarootdir, expand it.
18096# FIXME: This hack should be removed a few years after 2.60.
18097ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018098ac_sed_dataroot='
18099/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100 p
18101 q
18102}
18103/@datadir@/p
18104/@docdir@/p
18105/@infodir@/p
18106/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018107/@mandir@/p'
18108case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109*datarootdir*) ac_datarootdir_seen=yes;;
18110*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018111 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18112$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 ac_datarootdir_hack='
18116 s&@datadir@&$datadir&g
18117 s&@docdir@&$docdir&g
18118 s&@infodir@&$infodir&g
18119 s&@localedir@&$localedir&g
18120 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018121 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122esac
18123_ACEOF
18124
18125# Neutralize VPATH when `$srcdir' = `.'.
18126# Shell code in configure.ac might set extrasub.
18127# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18129ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018130$extrasub
18131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018133:t
18134/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018135s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018137s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138s&@srcdir@&$ac_srcdir&;t t
18139s&@abs_srcdir@&$ac_abs_srcdir&;t t
18140s&@top_srcdir@&$ac_top_srcdir&;t t
18141s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18142s&@builddir@&$ac_builddir&;t t
18143s&@abs_builddir@&$ac_abs_builddir&;t t
18144s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18145s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018146s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018147$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018148"
Victor Stinnere0be4232011-10-25 13:06:09 +020018149eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18150 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018153 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18154 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18155 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018157which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018158$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018159which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018160
Victor Stinnere0be4232011-10-25 13:06:09 +020018161 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018162 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018163 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18164 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018165 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018166 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018167 ;;
18168 :H)
18169 #
18170 # CONFIG_HEADER
18171 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018172 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018173 {
18174 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018175 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18176 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018177 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018178 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018179 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18180$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018181 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018182 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018183 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018184 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018185 fi
18186 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018187 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018188 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018189 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018193
18194 esac
18195
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018196
18197 case $ac_file$ac_mode in
18198 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18199
18200 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201done # for ac_tag
18202
Guido van Rossum627b2d71993-12-24 10:39:16 +000018203
Matthias Kloseb9621712010-04-24 17:59:49 +000018204as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018205_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018206ac_clean_files=$ac_clean_files_save
18207
Matthias Kloseb9621712010-04-24 17:59:49 +000018208test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018209 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018210
Martin v. Löwis11437992002-04-12 09:54:03 +000018211
18212# configure is writing to config.log, and then calls config.status.
18213# config.status does its own redirection, appending to config.log.
18214# Unfortunately, on DOS this fails, as config.log is still kept open
18215# by configure, so config.status won't be able to write to it; its
18216# output is simply discarded. So we exec the FD to /dev/null,
18217# effectively closing config.log, so it can be properly (re)opened and
18218# appended to by config.status. When coming back to configure, we
18219# need to make the FD available again.
18220if test "$no_create" != yes; then
18221 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018222 ac_config_status_args=
18223 test "$silent" = yes &&
18224 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018225 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018226 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018227 exec 5>>config.log
18228 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18229 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018230 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018231fi
18232if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18233 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18234$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018235fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018236
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018237
Christian Heimes75ed8902013-11-20 01:11:18 +010018238echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018239if test ! -f Modules/Setup
18240then
18241 cp $srcdir/Modules/Setup.dist Modules/Setup
18242fi
18243
Christian Heimes75ed8902013-11-20 01:11:18 +010018244echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018245if test ! -f Modules/Setup.local
18246then
18247 echo "# Edit this file for local setup changes" >Modules/Setup.local
18248fi
18249
Christian Heimes75ed8902013-11-20 01:11:18 +010018250echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018251$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018252 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018253 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018254mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018255
18256if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18257 echo "" >&6
18258 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018259 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 +000018260 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018261 echo "" >&6
18262 echo "" >&6
18263fi
18264