blob: caa86677ea11b53738781cef779783e3a2217c78 [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
Christian Heimes892d66e2018-01-29 14:10:18 +0100843with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000844'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 ac_precious_vars='build_alias
846host_alias
847target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100848MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849CC
850CFLAGS
851LDFLAGS
852LIBS
853CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100854CPP
855PKG_CONFIG
856PKG_CONFIG_PATH
857PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000861ac_init_help=
862ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000863ac_unrecognized_opts=
864ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865# The variables have the same names as the options, with
866# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000867cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870no_recursion=
871prefix=NONE
872program_prefix=NONE
873program_suffix=NONE
874program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879x_includes=NONE
880x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000881
882# Installation directory options.
883# These are left unexpanded so users can "make install exec_prefix=/foo"
884# and all the variables that are supposed to be based on exec_prefix
885# by default will actually change.
886# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888bindir='${exec_prefix}/bin'
889sbindir='${exec_prefix}/sbin'
890libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891datarootdir='${prefix}/share'
892datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893sysconfdir='${prefix}/etc'
894sharedstatedir='${prefix}/com'
895localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896includedir='${prefix}/include'
897oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
899infodir='${datarootdir}/info'
900htmldir='${docdir}'
901dvidir='${docdir}'
902pdfdir='${docdir}'
903psdir='${docdir}'
904libdir='${exec_prefix}/lib'
905localedir='${datarootdir}/locale'
906mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 # If the previous option needs an argument, assign it.
913 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 ac_prev=
916 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200920 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
921 *=) ac_optarg= ;;
922 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Accept the important Cygnus configure options, so we can diagnose typos.
926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 case $ac_dashdash$ac_option in
928 --)
929 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -bindir | --bindir | --bindi | --bind | --bin | --bi)
932 ac_prev=bindir ;;
933 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
936 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 -cache-file | --cache-file | --cache-fil | --cache-fi \
942 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
943 ac_prev=cache_file ;;
944 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
945 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 cache_file=$ac_optarg ;;
947
948 --config-cache | -C)
949 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
957 | --dataroo | --dataro | --datar)
958 ac_prev=datarootdir ;;
959 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
960 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
961 datarootdir=$ac_optarg ;;
962
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200967 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
976 esac
977 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978
979 -docdir | --docdir | --docdi | --doc | --do)
980 ac_prev=docdir ;;
981 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
982 docdir=$ac_optarg ;;
983
984 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
985 ac_prev=dvidir ;;
986 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
987 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200993 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt_orig=$ac_useropt
995 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
996 case $ac_user_opts in
997 *"
998"enable_$ac_useropt"
999"*) ;;
1000 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1001 ac_unrecognized_sep=', ';;
1002 esac
1003 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1006 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1007 | --exec | --exe | --ex)
1008 ac_prev=exec_prefix ;;
1009 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1010 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1011 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015 # Obsolete; use --with-gas.
1016 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 -help | --help | --hel | --he | -h)
1019 ac_init_help=long ;;
1020 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1021 ac_init_help=recursive ;;
1022 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1023 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001030 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1031 ac_prev=htmldir ;;
1032 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1033 | --ht=*)
1034 htmldir=$ac_optarg ;;
1035
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 -includedir | --includedir | --includedi | --included | --include \
1037 | --includ | --inclu | --incl | --inc)
1038 ac_prev=includedir ;;
1039 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1040 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -infodir | --infodir | --infodi | --infod | --info | --inf)
1044 ac_prev=infodir ;;
1045 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -libdir | --libdir | --libdi | --libd)
1049 ac_prev=libdir ;;
1050 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1054 | --libexe | --libex | --libe)
1055 ac_prev=libexecdir ;;
1056 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1057 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 -localedir | --localedir | --localedi | --localed | --locale)
1061 ac_prev=localedir ;;
1062 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1063 localedir=$ac_optarg ;;
1064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 ac_prev=localstatedir ;;
1068 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
1072 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1073 ac_prev=mandir ;;
1074 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 # Obsolete; use --without-fp.
1079 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 no_create=yes ;;
1084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1086 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1087 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1090 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1091 | --oldin | --oldi | --old | --ol | --o)
1092 ac_prev=oldincludedir ;;
1093 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1094 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1095 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1099 ac_prev=prefix ;;
1100 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1104 | --program-pre | --program-pr | --program-p)
1105 ac_prev=program_prefix ;;
1106 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1107 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1111 | --program-suf | --program-su | --program-s)
1112 ac_prev=program_suffix ;;
1113 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1114 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -program-transform-name | --program-transform-name \
1118 | --program-transform-nam | --program-transform-na \
1119 | --program-transform-n | --program-transform- \
1120 | --program-transform | --program-transfor \
1121 | --program-transfo | --program-transf \
1122 | --program-trans | --program-tran \
1123 | --progr-tra | --program-tr | --program-t)
1124 ac_prev=program_transform_name ;;
1125 -program-transform-name=* | --program-transform-name=* \
1126 | --program-transform-nam=* | --program-transform-na=* \
1127 | --program-transform-n=* | --program-transform-=* \
1128 | --program-transform=* | --program-transfor=* \
1129 | --program-transfo=* | --program-transf=* \
1130 | --program-trans=* | --program-tran=* \
1131 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001134 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1135 ac_prev=pdfdir ;;
1136 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1137 pdfdir=$ac_optarg ;;
1138
1139 -psdir | --psdir | --psdi | --psd | --ps)
1140 ac_prev=psdir ;;
1141 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1142 psdir=$ac_optarg ;;
1143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1145 | -silent | --silent | --silen | --sile | --sil)
1146 silent=yes ;;
1147
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1149 ac_prev=sbindir ;;
1150 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1151 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153
1154 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1155 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1156 | --sharedst | --shareds | --shared | --share | --shar \
1157 | --sha | --sh)
1158 ac_prev=sharedstatedir ;;
1159 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1160 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1161 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1162 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 -site | --site | --sit)
1166 ac_prev=site ;;
1167 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1171 ac_prev=srcdir ;;
1172 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1176 | --syscon | --sysco | --sysc | --sys | --sy)
1177 ac_prev=sysconfdir ;;
1178 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1179 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1188 verbose=yes ;;
1189
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 -version | --version | --versio | --versi | --vers | -V)
1191 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001197 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt_orig=$ac_useropt
1199 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200 case $ac_user_opts in
1201 *"
1202"with_$ac_useropt"
1203"*) ;;
1204 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1205 ac_unrecognized_sep=', ';;
1206 esac
1207 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001213 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1217 *"
1218"with_$ac_useropt"
1219"*) ;;
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
1222 esac
1223 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 --x)
1226 # Obsolete; use --with-x.
1227 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1230 | --x-incl | --x-inc | --x-in | --x-i)
1231 ac_prev=x_includes ;;
1232 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1233 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1237 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1238 ac_prev=x_libraries ;;
1239 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1240 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001243 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1244Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ;;
1246
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 *=*)
1248 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1249 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 case $ac_envvar in #(
1251 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 export $ac_envvar ;;
1256
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001257 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001262 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 ;;
1264
1265 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266done
1267
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001270 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271fi
1272
Matthias Kloseb9621712010-04-24 17:59:49 +00001273if test -n "$ac_unrecognized_opts"; then
1274 case $enable_option_checking in
1275 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001277 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1278 esac
1279fi
1280
1281# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1283 datadir sysconfdir sharedstatedir localstatedir includedir \
1284 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Christian Heimesff5be6e2018-01-20 13:19:21 +01001285 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001288 # Remove trailing slashes.
1289 case $ac_val in
1290 */ )
1291 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1292 eval $ac_var=\$ac_val;;
1293 esac
1294 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001295 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296 [\\/$]* | ?:[\\/]* ) continue;;
1297 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001299 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001300done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# There might be people who depend on the old broken behavior: `$host'
1303# used to hold the argument of --host etc.
1304# FIXME: To remove some day.
1305build=$build_alias
1306host=$host_alias
1307target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# FIXME: To remove some day.
1310if test "x$host_alias" != x; then
1311 if test "x$build_alias" = x; then
1312 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 elif test "x$build_alias" != "x$host_alias"; then
1314 cross_compiling=yes
1315 fi
1316fi
1317
1318ac_tool_prefix=
1319test -n "$host_alias" && ac_tool_prefix=$host_alias-
1320
1321test "$silent" = yes && exec 6>/dev/null
1322
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324ac_pwd=`pwd` && test -n "$ac_pwd" &&
1325ac_ls_di=`ls -di .` &&
1326ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001327 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330
1331
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332# Find the source files, if location was not specified.
1333if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001336 ac_confdir=`$as_dirname -- "$as_myself" ||
1337$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1338 X"$as_myself" : 'X\(//\)[^/]' \| \
1339 X"$as_myself" : 'X\(//\)$' \| \
1340 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1341$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\/\)[^/].*/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\).*/{
1355 s//\1/
1356 q
1357 }
1358 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001359 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001360 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361 srcdir=..
1362 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001363else
1364 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366if test ! -r "$srcdir/$ac_unique_file"; then
1367 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001368 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1371ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373 pwd)`
1374# When building in place, set srcdir=.
1375if test "$ac_abs_confdir" = "$ac_pwd"; then
1376 srcdir=.
1377fi
1378# Remove unnecessary trailing slashes from srcdir.
1379# Double slashes in file names in object file debugging info
1380# mess up M-x gdb in Emacs.
1381case $srcdir in
1382*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1383esac
1384for ac_var in $ac_precious_vars; do
1385 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_env_${ac_var}_value=\$${ac_var}
1387 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1389done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390
Martin v. Löwis11437992002-04-12 09:54:03 +00001391#
1392# Report the --help message.
1393#
1394if test "$ac_init_help" = "long"; then
1395 # Omit some internal or obsolete options to make the list less imposing.
1396 # This message is too long to be a string in the A/UX 3.1 sh.
1397 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001398\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399
1400Usage: $0 [OPTION]... [VAR=VALUE]...
1401
1402To assign environment variables (e.g., CC, CFLAGS...), specify them as
1403VAR=VALUE. See below for descriptions of some of the useful variables.
1404
1405Defaults for the options are specified in brackets.
1406
1407Configuration:
1408 -h, --help display this help and exit
1409 --help=short display options specific to this package
1410 --help=recursive display the short help of all the included packages
1411 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001412 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --cache-file=FILE cache test results in FILE [disabled]
1414 -C, --config-cache alias for \`--cache-file=config.cache'
1415 -n, --no-create do not create output files
1416 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1417
Martin v. Löwis11437992002-04-12 09:54:03 +00001418Installation directories:
1419 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001420 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
1424By default, \`make install' will install all the files in
1425\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1426an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1427for instance \`--prefix=\$HOME'.
1428
1429For better control, use the options below.
1430
1431Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 --bindir=DIR user executables [EPREFIX/bin]
1433 --sbindir=DIR system admin executables [EPREFIX/sbin]
1434 --libexecdir=DIR program executables [EPREFIX/libexec]
1435 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1436 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1437 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1438 --libdir=DIR object code libraries [EPREFIX/lib]
1439 --includedir=DIR C header files [PREFIX/include]
1440 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1441 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1442 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1443 --infodir=DIR info documentation [DATAROOTDIR/info]
1444 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1445 --mandir=DIR man documentation [DATAROOTDIR/man]
1446 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1447 --htmldir=DIR html documentation [DOCDIR]
1448 --dvidir=DIR dvi documentation [DOCDIR]
1449 --pdfdir=DIR pdf documentation [DOCDIR]
1450 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452
1453 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001458 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460fi
1461
1462if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001463 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001464 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 cat <<\_ACEOF
1467
1468Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1471 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001472 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001473 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --enable-framework[=INSTALLDIR]
1475 Build (MacOSX|Darwin) framework
1476 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001477 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001478 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1479 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001480 --enable-loadable-sqlite-extensions
1481 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-ipv6 Enable ipv6 (with ipv4) support
1483 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001484 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001485 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487Optional Packages:
1488 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1489 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001490 --with-universal-archs=ARCH
1491 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001492 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001493 --with-framework-name=FRAMEWORK
1494 specify an alternate name of the framework built
1495 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001497 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001503 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001504 --with-lto Enable Link Time Optimization in any build. Disabled
1505 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-doc-strings disable/enable documentation strings
1525 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001526 --with(out)-c-locale-coercion
1527 disable/enable C locale coercion to a UTF-8 based
1528 locale
1529 --with(out)-c-locale-warning
1530 disable/enable locale compatibility warning in the C
1531 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001533 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001541 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001542 --with-ssl-default-suites=[python|openssl|STRING]
1543 Override default cipher suites string, python: use
1544 Python's preferred selection (default), openssl:
1545 leave OpenSSL's defaults untouched, STRING: use a
1546 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001547
1548Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001549 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CC C compiler command
1551 CFLAGS C compiler flags
1552 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1553 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001558 PKG_CONFIG path to pkg-config utility
1559 PKG_CONFIG_PATH
1560 directories to add to pkg-config's search path
1561 PKG_CONFIG_LIBDIR
1562 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
1564Use these variables to override the choices made by `configure' or to help
1565it to find libraries and programs with nonstandard names/locations.
1566
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001567Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001570fi
1571
1572if test "$ac_init_help" = "recursive"; then
1573 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 test -d "$ac_dir" ||
1576 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1577 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 ac_builddir=.
1579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580case "$ac_dir" in
1581.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 case $ac_top_builddir_sub in
1587 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1589 esac ;;
1590esac
1591ac_abs_top_builddir=$ac_pwd
1592ac_abs_builddir=$ac_pwd$ac_dir_suffix
1593# for backward compatibility:
1594ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001595
1596case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 ac_top_srcdir=$ac_top_builddir_sub
1600 ac_abs_top_srcdir=$ac_pwd ;;
1601 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$srcdir
1604 ac_abs_top_srcdir=$srcdir ;;
1605 *) # Relative name.
1606 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1607 ac_top_srcdir=$ac_top_build_prefix$srcdir
1608 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001609esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 cd "$ac_dir" || { ac_status=$?; continue; }
1613 # Check for guested configure.
1614 if test -f "$ac_srcdir/configure.gnu"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1617 elif test -f "$ac_srcdir/configure"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622 fi || ac_status=$?
1623 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 done
1625fi
1626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001628if $ac_init_version; then
1629 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001630python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001631generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001632
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001633Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001634This configure script is free software; the Free Software Foundation
1635gives unlimited permission to copy, distribute and modify it.
1636_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001639
1640## ------------------------ ##
1641## Autoconf initialization. ##
1642## ------------------------ ##
1643
1644# ac_fn_c_try_compile LINENO
1645# --------------------------
1646# Try to compile conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_compile ()
1648{
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 rm -f conftest.$ac_objext
1651 if { { ac_try="$ac_compile"
1652case "(($ac_try" in
1653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654 *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658 (eval "$ac_compile") 2>conftest.err
1659 ac_status=$?
1660 if test -s conftest.err; then
1661 grep -v '^ *+' conftest.err >conftest.er1
1662 cat conftest.er1 >&5
1663 mv -f conftest.er1 conftest.err
1664 fi
1665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666 test $ac_status = 0; } && {
1667 test -z "$ac_c_werror_flag" ||
1668 test ! -s conftest.err
1669 } && test -s conftest.$ac_objext; then :
1670 ac_retval=0
1671else
1672 $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675 ac_retval=1
1676fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_compile
1681
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } > conftest.i && {
1704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
1714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
Matthias Kloseb9621712010-04-24 17:59:49 +00001719# ac_fn_c_try_link LINENO
1720# -----------------------
1721# Try to link conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_link ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 rm -f conftest.$ac_objext conftest$ac_exeext
1726 if { { ac_try="$ac_link"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732$as_echo "$ac_try_echo"; } >&5
1733 (eval "$ac_link") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
1740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1741 test $ac_status = 0; } && {
1742 test -z "$ac_c_werror_flag" ||
1743 test ! -s conftest.err
1744 } && test -s conftest$ac_exeext && {
1745 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001746 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 }; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1756 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1757 # interfere with the next link command; also delete a directory that is
1758 # left behind by Apple's compiler. We do this before executing the actions.
1759 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 as_fn_set_status $ac_retval
1762
1763} # ac_fn_c_try_link
1764
Matthias Kloseb9621712010-04-24 17:59:49 +00001765# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1766# -------------------------------------------------------
1767# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1768# the include files in INCLUDES and setting the cache variable VAR
1769# accordingly.
1770ac_fn_c_check_header_mongrel ()
1771{
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001773 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001776if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 $as_echo_n "(cached) " >&6
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782else
1783 # Is the header compilable?
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1785$as_echo_n "checking $2 usability... " >&6; }
1786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1787/* end confdefs.h. */
1788$4
1789#include <$2>
1790_ACEOF
1791if ac_fn_c_try_compile "$LINENO"; then :
1792 ac_header_compiler=yes
1793else
1794 ac_header_compiler=no
1795fi
1796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1798$as_echo "$ac_header_compiler" >&6; }
1799
1800# Is the header present?
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1802$as_echo_n "checking $2 presence... " >&6; }
1803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1804/* end confdefs.h. */
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_cpp "$LINENO"; then :
1808 ac_header_preproc=yes
1809else
1810 ac_header_preproc=no
1811fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001812rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1814$as_echo "$ac_header_preproc" >&6; }
1815
1816# So? What about this header?
1817case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1818 yes:no: )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1820$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1822$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1823 ;;
1824 no:yes:* )
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1826$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1828$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1830$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1832$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1834$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001835( $as_echo "## --------------------------------------- ##
1836## Report this to https://bugs.python.org/ ##
1837## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 ) | sed "s/^/$as_me: WARNING: /" >&2
1839 ;;
1840esac
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001843if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001844 $as_echo_n "(cached) " >&6
1845else
1846 eval "$3=\$ac_header_compiler"
1847fi
1848eval ac_res=\$$3
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1850$as_echo "$ac_res" >&6; }
1851fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001853
1854} # ac_fn_c_check_header_mongrel
1855
1856# ac_fn_c_try_run LINENO
1857# ----------------------
1858# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1859# that executables *can* be run.
1860ac_fn_c_try_run ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 if { { ac_try="$ac_link"
1864case "(($ac_try" in
1865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1866 *) ac_try_echo=$ac_try;;
1867esac
1868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1869$as_echo "$ac_try_echo"; } >&5
1870 (eval "$ac_link") 2>&5
1871 ac_status=$?
1872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1873 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1874 { { case "(($ac_try" in
1875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1876 *) ac_try_echo=$ac_try;;
1877esac
1878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1879$as_echo "$ac_try_echo"; } >&5
1880 (eval "$ac_try") 2>&5
1881 ac_status=$?
1882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1883 test $ac_status = 0; }; }; then :
1884 ac_retval=0
1885else
1886 $as_echo "$as_me: program exited with status $ac_status" >&5
1887 $as_echo "$as_me: failed program was:" >&5
1888sed 's/^/| /' conftest.$ac_ext >&5
1889
1890 ac_retval=$ac_status
1891fi
1892 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894 as_fn_set_status $ac_retval
1895
1896} # ac_fn_c_try_run
1897
1898# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1899# -------------------------------------------------------
1900# Tests whether HEADER exists and can be compiled using the include files in
1901# INCLUDES, setting the cache variable VAR accordingly.
1902ac_fn_c_check_header_compile ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 $as_echo_n "(cached) " >&6
1909else
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$4
1913#include <$2>
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916 eval "$3=yes"
1917else
1918 eval "$3=no"
1919fi
1920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1921fi
1922eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927} # ac_fn_c_check_header_compile
1928
Matthias Kloseb9621712010-04-24 17:59:49 +00001929# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1930# -------------------------------------------
1931# Tests whether TYPE exists after having included INCLUDES, setting cache
1932# variable VAR accordingly.
1933ac_fn_c_check_type ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=no"
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945int
1946main ()
1947{
1948if (sizeof ($2))
1949 return 0;
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958int
1959main ()
1960{
1961if (sizeof (($2)))
1962 return 0;
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 eval "$3=yes"
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976eval ac_res=\$$3
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1978$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001979 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981} # ac_fn_c_check_type
1982
Matthias Kloseb9621712010-04-24 17:59:49 +00001983# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1984# --------------------------------------------
1985# Tries to find the compile-time value of EXPR in a program that includes
1986# INCLUDES, setting VAR accordingly. Returns whether the value could be
1987# computed
1988ac_fn_c_compute_int ()
1989{
1990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1991 if test "$cross_compiling" = yes; then
1992 # Depending upon the size, compute the lo and hi bounds.
1993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994/* end confdefs.h. */
1995$4
1996int
1997main ()
1998{
1999static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002000test_array [0] = 0;
2001return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003 ;
2004 return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 ac_lo=0 ac_mid=0
2009 while :; do
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002017test_array [0] = 0;
2018return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_hi=$ac_mid; break
2026else
2027 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2028 if test $ac_lo -le $ac_mid; then
2029 ac_lo= ac_hi=
2030 break
2031 fi
2032 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035 done
2036else
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$4
2040int
2041main ()
2042{
2043static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 ac_hi=-1 ac_mid=-1
2053 while :; do
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002096test_array [0] = 0;
2097return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002161 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002174if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002229 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002230
2231} # ac_fn_c_check_func
2232
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002233# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2234# ---------------------------------------------
2235# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2236# accordingly.
2237ac_fn_c_check_decl ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 as_decl_name=`echo $2|sed 's/ *(.*//'`
2241 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2243$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2244if eval \${$3+:} false; then :
2245 $as_echo_n "(cached) " >&6
2246else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$4
2250int
2251main ()
2252{
2253#ifndef $as_decl_name
2254#ifdef __cplusplus
2255 (void) $as_decl_use;
2256#else
2257 (void) $as_decl_name;
2258#endif
2259#endif
2260
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_compile "$LINENO"; then :
2266 eval "$3=yes"
2267else
2268 eval "$3=no"
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
2275 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2276
2277} # ac_fn_c_check_decl
2278
Matthias Kloseb9621712010-04-24 17:59:49 +00002279# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2280# ----------------------------------------------------
2281# Tries to find if the field MEMBER exists in type AGGR, after including
2282# INCLUDES, setting cache variable VAR accordingly.
2283ac_fn_c_check_member ()
2284{
2285 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2287$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002288if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002289 $as_echo_n "(cached) " >&6
2290else
2291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292/* end confdefs.h. */
2293$5
2294int
2295main ()
2296{
2297static $2 ac_aggr;
2298if (ac_aggr.$3)
2299return 0;
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304if ac_fn_c_try_compile "$LINENO"; then :
2305 eval "$4=yes"
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$5
2310int
2311main ()
2312{
2313static $2 ac_aggr;
2314if (sizeof ac_aggr.$3)
2315return 0;
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$4=yes"
2322else
2323 eval "$4=no"
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329eval ac_res=\$$4
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002332 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002333
2334} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002336This file contains any messages produced by compilers while
2337running configure, to aid debugging if configure makes a mistake.
2338
Ned Deily4829bc62016-09-12 17:29:04 -04002339It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002340generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002341
2342 $ $0 $@
2343
2344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002346{
2347cat <<_ASUNAME
2348## --------- ##
2349## Platform. ##
2350## --------- ##
2351
2352hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2353uname -m = `(uname -m) 2>/dev/null || echo unknown`
2354uname -r = `(uname -r) 2>/dev/null || echo unknown`
2355uname -s = `(uname -s) 2>/dev/null || echo unknown`
2356uname -v = `(uname -v) 2>/dev/null || echo unknown`
2357
2358/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2359/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2360
2361/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2362/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2363/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002365/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2366/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2367/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2368
2369_ASUNAME
2370
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374 IFS=$as_save_IFS
2375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo "PATH: $as_dir"
2377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380} >&5
2381
2382cat >&5 <<_ACEOF
2383
2384
2385## ----------- ##
2386## Core tests. ##
2387## ----------- ##
2388
2389_ACEOF
2390
2391
2392# Keep a trace of the command line.
2393# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002394# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002395# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002398ac_configure_args0=
2399ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_must_keep_next=false
2401for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002402do
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 for ac_arg
2404 do
2405 case $ac_arg in
2406 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2407 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2408 | -silent | --silent | --silen | --sile | --sil)
2409 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 esac
2413 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002418 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 case $ac_arg in
2421 *=* | --config-cache | -C | -disable-* | --disable-* \
2422 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2423 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2424 | -with-* | --with-* | -without-* | --without-* | --x)
2425 case "$ac_configure_args0 " in
2426 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2427 esac
2428 ;;
2429 -* ) ac_must_keep_next=true ;;
2430 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 ;;
2434 esac
2435 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002436done
Matthias Kloseb9621712010-04-24 17:59:49 +00002437{ ac_configure_args0=; unset ac_configure_args0;}
2438{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440# When interrupted or exit'd, cleanup temporary files, and complete
2441# config.log. We remove comments because anyway the quotes in there
2442# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443# WARNING: Use '\'' to represent an apostrophe within the trap.
2444# 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 +00002445trap 'exit_status=$?
2446 # Save into config.log some information that might help in debugging.
2447 {
2448 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002449
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002450 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002451## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002452## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 echo
2454 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455(
2456 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in #(
2459 *${as_nl}*)
2460 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac
2464 case $ac_var in #(
2465 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2467 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2473 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 "s/'\''/'\''\\\\'\'''\''/g;
2476 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2477 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002478 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac |
2482 sort
2483)
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002485
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002486 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002487## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 echo
2490 for ac_var in $ac_subst_vars
2491 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 eval ac_val=\$$ac_var
2493 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 done | sort
2498 echo
2499
2500 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_files
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514 fi
2515
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 # We do not want a PATH search for config.site.
2575 case $CONFIG_SITE in #((
2576 -*) ac_site_file1=./$CONFIG_SITE;;
2577 */*) ac_site_file1=$CONFIG_SITE;;
2578 *) ac_site_file1=./$CONFIG_SITE;;
2579 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$prefix/share/config.site
2582 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583else
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$ac_default_prefix/share/config.site
2585 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002587for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588do
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 test "x$ac_site_file" = xNONE && continue
2590 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2592$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594 . "$ac_site_file" \
2595 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2597as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002598See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600done
2601
2602if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 # Some versions of bash will fail to source /dev/null (special files
2604 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2605 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2607$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2610 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 esac
2612 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613else
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2615$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 >$cache_file
2617fi
2618
2619# Check that the precious variables saved in the cache have kept the same
2620# value.
2621ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2624 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2626 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $ac_old_set,$ac_new_set in
2628 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2630$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 +00002631 ac_cache_corrupted=: ;;
2632 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_cache_corrupted=: ;;
2636 ,);;
2637 *)
2638 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 # differences in whitespace do not lead to failure.
2640 ac_old_val_w=`echo x $ac_old_val`
2641 ac_new_val_w=`echo x $ac_new_val`
2642 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2644$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2645 ac_cache_corrupted=:
2646 else
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2648$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2649 eval $ac_var=\$ac_old_val
2650 fi
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2652$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2654$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 fi;;
2656 esac
2657 # Pass precious variables to config.status.
2658 if test "$ac_new_set" = set; then
2659 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 *) ac_arg=$ac_var=$ac_new_val ;;
2662 esac
2663 case " $ac_configure_args " in
2664 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 esac
2667 fi
2668done
2669if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2673$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002676## -------------------- ##
2677## Main body of script. ##
2678## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679
Guido van Rossum7f43da71994-08-01 12:15:30 +00002680ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685
Guido van Rossum627b2d71993-12-24 10:39:16 +00002686
Michael W. Hudson54241132001-12-07 15:38:26 +00002687
Trent Nelson4d4ec652012-10-16 08:51:24 -04002688
Christian Heimesff5be6e2018-01-20 13:19:21 +01002689
2690
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002691if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692 # If we're building out-of-tree, we need to make sure the following
2693 # resources get picked up before their $srcdir counterparts.
2694 # Objects/ -> typeslots.inc
2695 # Include/ -> Python-ast.h, graminit.h
2696 # Python/ -> importlib.h
2697 # (A side effect of this is that these resources will automatically be
2698 # regenerated when building out-of-tree, regardless of whether or not
2699 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2700 # off.)
2701 BASECPPFLAGS="-IObjects -IInclude -IPython"
2702else
2703 BASECPPFLAGS=""
2704fi
2705
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706
2707
2708
2709
Victor Stinner9ed34a82017-05-02 22:35:58 +02002710if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712# Extract the first word of "git", so it can be a program name with args.
2713set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2715$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717 $as_echo_n "(cached) " >&6
2718else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719 if test -n "$HAS_GIT"; then
2720 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721else
2722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2723for as_dir in $PATH
2724do
2725 IFS=$as_save_IFS
2726 test -z "$as_dir" && as_dir=.
2727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2731 break 2
2732 fi
2733done
2734 done
2735IFS=$as_save_IFS
2736
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738fi
2739fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740HAS_GIT=$ac_cv_prog_HAS_GIT
2741if test -n "$HAS_GIT"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2743$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746$as_echo "no" >&6; }
2747fi
2748
2749
2750else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754then
Ned Deily554626a2017-03-20 23:41:52 -04002755 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2756 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITVERSION=""
2760 GITTAG=""
2761 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762fi
2763
2764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002766
2767
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002768ac_aux_dir=
2769for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2770 if test -f "$ac_dir/install-sh"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/install-sh -c"
2773 break
2774 elif test -f "$ac_dir/install.sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install.sh -c"
2777 break
2778 elif test -f "$ac_dir/shtool"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/shtool install -c"
2781 break
2782 fi
2783done
2784if test -z "$ac_aux_dir"; then
2785 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2786fi
2787
2788# These three variables are undocumented and unsupported,
2789# and are intended to be withdrawn in a future Autoconf release.
2790# They can cause serious problems if a builder's source tree is in a directory
2791# whose full name contains unusual characters.
2792ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2793ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2794ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2795
2796
2797# Make sure we can run config.sub.
2798$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2799 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2800
2801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2802$as_echo_n "checking build system type... " >&6; }
2803if ${ac_cv_build+:} false; then :
2804 $as_echo_n "(cached) " >&6
2805else
2806 ac_build_alias=$build_alias
2807test "x$ac_build_alias" = x &&
2808 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2809test "x$ac_build_alias" = x &&
2810 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2811ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2812 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2813
2814fi
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2816$as_echo "$ac_cv_build" >&6; }
2817case $ac_cv_build in
2818*-*-*) ;;
2819*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2820esac
2821build=$ac_cv_build
2822ac_save_IFS=$IFS; IFS='-'
2823set x $ac_cv_build
2824shift
2825build_cpu=$1
2826build_vendor=$2
2827shift; shift
2828# Remember, the first character of IFS is used to create $*,
2829# except with old shells:
2830build_os=$*
2831IFS=$ac_save_IFS
2832case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2833
2834
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2836$as_echo_n "checking host system type... " >&6; }
2837if ${ac_cv_host+:} false; then :
2838 $as_echo_n "(cached) " >&6
2839else
2840 if test "x$host_alias" = x; then
2841 ac_cv_host=$ac_cv_build
2842else
2843 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2844 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2845fi
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2849$as_echo "$ac_cv_host" >&6; }
2850case $ac_cv_host in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2853esac
2854host=$ac_cv_host
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_host
2857shift
2858host_cpu=$1
2859host_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863host_os=$*
2864IFS=$ac_save_IFS
2865case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2866
2867
2868
doko@python.orga10e4a92013-01-25 18:45:12 +01002869
2870
Ned Deilyfcbc2462014-08-22 13:32:49 -07002871# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2872rm -f pybuilddir.txt
2873
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002874for ac_prog in python$PACKAGE_VERSION python3 python
2875do
2876 # Extract the first word of "$ac_prog", so it can be a program name with args.
2877set dummy $ac_prog; ac_word=$2
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2879$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002881 $as_echo_n "(cached) " >&6
2882else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883 if test -n "$PYTHON_FOR_REGEN"; then
2884 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885else
2886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887for as_dir in $PATH
2888do
2889 IFS=$as_save_IFS
2890 test -z "$as_dir" && as_dir=.
2891 for ac_exec_ext in '' $ac_executable_extensions; do
2892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002893 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897done
2898 done
2899IFS=$as_save_IFS
2900
2901fi
2902fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002903PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2904if test -n "$PYTHON_FOR_REGEN"; then
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2906$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907else
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2909$as_echo "no" >&6; }
2910fi
2911
2912
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
2918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002919if test "$cross_compiling" = yes; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2921$as_echo_n "checking for python interpreter for cross build... " >&6; }
2922 if test -z "$PYTHON_FOR_BUILD"; then
2923 for interp in python$PACKAGE_VERSION python3 python; do
2924 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002925 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 +02002926 break
2927 fi
2928 interp=
2929 done
2930 if test x$interp = x; then
2931 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2934$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002935 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 +02002936 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002937elif test "$cross_compiling" = maybe; then
2938 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002939else
2940 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Ned Deily4829bc62016-09-12 17:29:04 -04002959VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002986# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990
2991
2992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002993define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002995# Arguments passed to configure.
2996
2997CONFIG_ARGS="$ac_configure_args"
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3000$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003002if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 case $enableval in
3005 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003006 # Locate the best usable SDK, see Mac/README.txt for more
3007 # information
3008 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003009 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003010 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3012 if test ! -d "${enableval}"
3013 then
3014 enableval=/
3015 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
3019 case $enableval in
3020 no)
3021 UNIVERSALSDK=
3022 enable_universalsdk=
3023 ;;
3024 *)
3025 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 if test ! -d "${UNIVERSALSDK}"
3027 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003028 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034else
3035
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041if test -n "${UNIVERSALSDK}"
3042then
Matthias Kloseb9621712010-04-24 17:59:49 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3044$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045else
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003051
Ned Deily87adb6e2013-10-18 21:09:56 -07003052ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054# For backward compatibility reasons we prefer to select '32-bit' if available,
3055# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003056UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057if test "`uname -s`" = "Darwin"
3058then
3059 if test -n "${UNIVERSALSDK}"
3060 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003061 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062 then
3063 UNIVERSAL_ARCHS="intel"
3064 fi
3065 fi
3066fi
3067
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003068
Matthias Kloseb9621712010-04-24 17:59:49 +00003069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3070$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071
3072# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003073if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 UNIVERSAL_ARCHS="$withval"
3076
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077fi
3078
Ned Deily87adb6e2013-10-18 21:09:56 -07003079if test -n "${UNIVERSALSDK}"
3080then
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3082$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3083else
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3085$as_echo "no" >&6; }
3086fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003088
3089# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091 withval=$with_framework_name;
3092 PYTHONFRAMEWORK=${withval}
3093 PYTHONFRAMEWORKDIR=${withval}.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3095
3096else
3097
3098 PYTHONFRAMEWORK=Python
3099 PYTHONFRAMEWORKDIR=Python.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3101
3102fi
3103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003107 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003109 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003110 esac
3111 case $enableval in
3112 no)
3113 PYTHONFRAMEWORK=
3114 PYTHONFRAMEWORKDIR=no-framework
3115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003121 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 if test "x${prefix}" = "xNONE"; then
3123 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3124 else
3125 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3126 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003128 ;;
3129 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003133 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003138
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE" ; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
3146 case "${enableval}" in
3147 /System*)
3148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3149 if test "${prefix}" = "NONE" ; then
3150 # See below
3151 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3152 fi
3153 ;;
3154
3155 /Library*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 ;;
3158
3159 */Library/Frameworks)
3160 MDIR="`dirname "${enableval}"`"
3161 MDIR="`dirname "${MDIR}"`"
3162 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3163
3164 if test "${prefix}" = "NONE"; then
3165 # User hasn't specified the
3166 # --prefix option, but wants to install
3167 # the framework in a non-default location,
3168 # ensure that the compatibility links get
3169 # installed relative to that prefix as well
3170 # instead of in /usr/local.
3171 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3172 fi
3173 ;;
3174
3175 *)
3176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3177 ;;
3178 esac
3179
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003182 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3189
3190 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Guido van Rossum563e7081996-09-10 18:20:48 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORKPREFIX=
3199 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 FRAMEWORKINSTALLFIRST=
3201 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 FRAMEWORKALTINSTALLFIRST=
3203 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003204 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Jack Jansene578a632001-08-15 01:27:14 +00003210 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003211
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213fi
3214
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215
3216
Michael W. Hudson54241132001-12-07 15:38:26 +00003217
3218
3219
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222
3223
3224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003226
Ned Deilyb8f944f2013-11-21 22:42:25 -08003227
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003228
3229cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003230#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003231_ACEOF
3232
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
3259 *)
3260 # for now, limit cross builds to known configurations
3261 MACHDEP="unknown"
3262 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3263 esac
3264 ac_sys_release=
3265 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003267 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003268 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 fi
3274 ac_md_system=`echo $ac_sys_system |
3275 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3276 ac_md_release=`echo $ac_sys_release |
3277 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3278 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003279
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003281 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003282 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003283 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003284 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003286fi
Guido van Rossum91922671997-10-09 20:24:13 +00003287
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003288
3289if test "$cross_compiling" = yes; then
3290 case "$host" in
3291 *-*-linux*)
3292 case "$host_cpu" in
3293 arm*)
3294 _host_cpu=arm
3295 ;;
3296 *)
3297 _host_cpu=$host_cpu
3298 esac
3299 ;;
3300 *-*-cygwin*)
3301 _host_cpu=
3302 ;;
3303 *)
3304 # for now, limit cross builds to known configurations
3305 MACHDEP="unknown"
3306 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3307 esac
3308 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3309fi
3310
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003311# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3312# disable features if it is defined, without any means to access these
3313# features as extensions. For these systems, we skip the definition of
3314# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3315# some feature, make sure there is no alternative way to access this
3316# feature. Also, when using wildcards, make sure you have verified the
3317# need for not defining _XOPEN_SOURCE on all systems matching the
3318# wildcard, and that the wildcard does not include future systems
3319# (which may remove their limitations).
3320case $ac_sys_system/$ac_sys_release in
3321 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3322 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003323 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003324 # In addition, Stefan Krah confirms that issue #1244610 exists through
3325 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003326 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003327 define_xopen_source=no
3328 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3329 # also defined. This can be overridden by defining _BSD_SOURCE
3330 # As this has a different meaning on Linux, only define it on OpenBSD
3331
Matthias Kloseb9621712010-04-24 17:59:49 +00003332$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003333
3334 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003335 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003336 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3337 # also defined. This can be overridden by defining _BSD_SOURCE
3338 # As this has a different meaning on Linux, only define it on OpenBSD
3339
Matthias Kloseb9621712010-04-24 17:59:49 +00003340$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003341
3342 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003343 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3344 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3345 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003346 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 +00003347 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003348 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3349 # request to enable features supported by the standard as a request
3350 # to disable features not supported by the standard. The best way
3351 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3352 # entirely and define __EXTENSIONS__ instead.
3353 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003354 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003355 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3356 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003357 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003358 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 define_xopen_source=no;;
3360 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003361 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003362 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003363 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003364 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3365 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3366 # identifies itself as Darwin/7.*
3367 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3368 # disables platform specific features beyond repair.
3369 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3370 # has no effect, don't bother defining them
3371 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003372 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003373 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003374 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003375 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3376 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3377 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003378 AIX/4)
3379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 AIX/5)
3381 if test `uname -r` -eq 1; then
3382 define_xopen_source=no
3383 fi
3384 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003385 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3386 # defining NI_NUMERICHOST.
3387 QNX/6.3.2)
3388 define_xopen_source=no
3389 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003390
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003391esac
3392
3393if test $define_xopen_source = yes
3394then
Victor Stinner14d098d2011-09-07 22:29:43 +02003395 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003396
Victor Stinner14d098d2011-09-07 22:29:43 +02003397$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003398
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
3400 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3401 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3402 # several APIs are not declared. Since this is also needed in some
3403 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Matthias Kloseb9621712010-04-24 17:59:49 +00003405$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
3407
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003408
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003409$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003411fi
3412
Christian Heimes647cd872013-12-07 23:39:33 +01003413# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3414case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003415 hp*|HP*)
3416 define_stdc_a1=yes;;
3417 *)
3418 define_stdc_a1=no;;
3419esac
3420
3421if test $define_stdc_a1 = yes
3422then
Christian Heimes647cd872013-12-07 23:39:33 +01003423
3424$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3425
Christian Heimesb02bcae2013-12-08 15:21:08 +01003426fi
Christian Heimes647cd872013-12-07 23:39:33 +01003427
Jack Jansen6b08a402004-06-03 12:41:45 +00003428# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3429# it may influence the way we can build extensions, so distutils
3430# needs to check it
3431
Thomas Wouters477c8d52006-05-27 19:21:47 +00003432
Jack Jansen6b08a402004-06-03 12:41:45 +00003433CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003434EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003435
Guido van Rossum627b2d71993-12-24 10:39:16 +00003436# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003437
3438# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3439# for debug/optimization stuff. BASECFLAGS is for flags that are required
3440# just to get things to compile and link. Users are free to override OPT
3441# when running configure or make. The build should not break if they do.
3442# BASECFLAGS should generally not be messed with, however.
3443
3444# XXX shouldn't some/most/all of this code be merged with the stuff later
3445# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3447$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003450if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003452 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003453 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003454 without_gcc=yes;;
3455 yes) CC=gcc
3456 without_gcc=no;;
3457 *) CC=$withval
3458 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003459 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003460else
Martin v. Löwis11437992002-04-12 09:54:03 +00003461
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003462 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003463 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003464 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003465 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003466 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467fi
3468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3470$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003471
Zachary Ware5af85642015-12-21 12:09:17 -06003472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3473$as_echo_n "checking for --with-icc... " >&6; }
3474
3475# Check whether --with-icc was given.
3476if test "${with_icc+set}" = set; then :
3477 withval=$with_icc;
3478 case $withval in
3479 no) CC=${CC:-cc}
3480 with_icc=no;;
3481 yes) CC=icc
3482 CXX=icpc
3483 with_icc=yes;;
3484 *) CC=$withval
3485 with_icc=$withval;;
3486 esac
3487else
3488
3489 with_icc=no
3490fi
3491
3492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3493$as_echo "$with_icc" >&6; }
3494
Guido van Rossum8b131c51995-03-09 14:10:13 +00003495# If the user switches compilers, we can't believe the cache
3496if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3497then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003498 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003499(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003500fi
3501
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003502# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3503# when the compiler supports them, but we don't always want -O2, and
3504# we set -g later.
3505if test -z "$CFLAGS"; then
3506 CFLAGS=
3507fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003508
3509if test "$ac_sys_system" = "Darwin"
3510then
3511 # Compiler selection on MacOSX is more complicated than
3512 # AC_PROG_CC can handle, see Mac/README.txt for more
3513 # information
3514 if test -z "${CC}"
3515 then
3516 found_gcc=
3517 found_clang=
3518 as_save_IFS=$IFS; IFS=:
3519 for as_dir in $PATH
3520 do
3521 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003522 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003524 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003525 fi
3526 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003527 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003528 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003529 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003530 fi
3531 fi
3532 done
3533 IFS=$as_save_IFS
3534
3535 if test -n "$found_gcc" -a -n "$found_clang"
3536 then
3537 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3538 then
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3540$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3541 CC="$found_clang"
3542 CXX="$found_clang++"
3543 fi
3544
3545
3546 elif test -z "$found_gcc" -a -n "$found_clang"
3547 then
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3549$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3550 CC="$found_clang"
3551 CXX="$found_clang++"
3552
3553 elif test -z "$found_gcc" -a -z "$found_clang"
3554 then
3555 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3556 if test -n "${found_clang}"
3557 then
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3559$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3560 CC="${found_clang}"
3561 CXX="`/usr/bin/xcrun -find clang++`"
3562
3563 # else: use default behaviour
3564 fi
3565 fi
3566 fi
3567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003568ac_ext=c
3569ac_cpp='$CPP $CPPFLAGS'
3570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3572ac_compiler_gnu=$ac_cv_c_compiler_gnu
3573if test -n "$ac_tool_prefix"; then
3574 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3575set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3577$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003578if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003580else
3581 if test -n "$CC"; then
3582 ac_cv_prog_CC="$CC" # Let the user override the test.
3583else
Martin v. Löwis11437992002-04-12 09:54:03 +00003584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 $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 +00003593 break 2
3594 fi
3595done
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003598
Jack Jansendd19cf82001-12-06 22:36:17 +00003599fi
3600fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003601CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003602if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3604$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003605else
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612if test -z "$ac_cv_prog_CC"; then
3613 ac_ct_CC=$CC
3614 # Extract the first word of "gcc", so it can be a program name with args.
3615set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3617$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003618if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003620else
3621 if test -n "$ac_ct_CC"; then
3622 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3623else
3624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3625for as_dir in $PATH
3626do
3627 IFS=$as_save_IFS
3628 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003631 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $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 +00003633 break 2
3634 fi
3635done
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003638
3639fi
3640fi
3641ac_ct_CC=$ac_cv_prog_ac_ct_CC
3642if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3644$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003645else
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3647$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003648fi
3649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650 if test "x$ac_ct_CC" = x; then
3651 CC=""
3652 else
3653 case $cross_compiling:$ac_tool_warned in
3654yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657ac_tool_warned=yes ;;
3658esac
3659 CC=$ac_ct_CC
3660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
3662 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003663fi
3664
Jack Jansendd19cf82001-12-06 22:36:17 +00003665if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666 if test -n "$ac_tool_prefix"; then
3667 # 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 +00003668set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003673else
3674 if test -n "$CC"; then
3675 ac_cv_prog_CC="$CC" # Let the user override the test.
3676else
Martin v. Löwis11437992002-04-12 09:54:03 +00003677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 $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 +00003686 break 2
3687 fi
3688done
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003691
3692fi
3693fi
3694CC=$ac_cv_prog_CC
3695if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3697$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003698else
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701fi
3702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706if test -z "$CC"; then
3707 # Extract the first word of "cc", so it can be a program name with args.
3708set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3710$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003711if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
3714 if test -n "$CC"; then
3715 ac_cv_prog_CC="$CC" # Let the user override the test.
3716else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003717 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3719for as_dir in $PATH
3720do
3721 IFS=$as_save_IFS
3722 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3726 ac_prog_rejected=yes
3727 continue
3728 fi
3729 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $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 +00003731 break 2
3732 fi
3733done
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003736
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003737if test $ac_prog_rejected = yes; then
3738 # We found a bogon in the path, so make sure we never use it.
3739 set dummy $ac_cv_prog_CC
3740 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742 # We chose a different compiler from the bogus one.
3743 # However, it has the same basename, so the bogon will be chosen
3744 # first if we set CC to just the basename; use the full file name.
3745 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003746 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747 fi
3748fi
3749fi
3750fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003751CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3754$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003755else
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003758fi
3759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
3762if test -z "$CC"; then
3763 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 do
3766 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3767set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003770if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003772else
3773 if test -n "$CC"; then
3774 ac_cv_prog_CC="$CC" # Let the user override the test.
3775else
Martin v. Löwis11437992002-04-12 09:54:03 +00003776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777for as_dir in $PATH
3778do
3779 IFS=$as_save_IFS
3780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 $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 +00003785 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787done
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
3791fi
3792fi
3793CC=$ac_cv_prog_CC
3794if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3796$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 test -n "$CC" && break
3804 done
3805fi
3806if test -z "$CC"; then
3807 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003809do
3810 # Extract the first word of "$ac_prog", so it can be a program name with args.
3811set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003814if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003816else
3817 if test -n "$ac_ct_CC"; then
3818 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3819else
3820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821for as_dir in $PATH
3822do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 $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 +00003829 break 2
3830 fi
3831done
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835fi
3836fi
3837ac_ct_CC=$ac_cv_prog_ac_ct_CC
3838if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3840$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003841else
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3843$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 test -n "$ac_ct_CC" && break
3848done
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 if test "x$ac_ct_CC" = x; then
3851 CC=""
3852 else
3853 case $cross_compiling:$ac_tool_warned in
3854yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3856$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857ac_tool_warned=yes ;;
3858esac
3859 CC=$ac_ct_CC
3860 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003861fi
3862
3863fi
3864
3865
Matthias Kloseb9621712010-04-24 17:59:49 +00003866test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003868as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003869See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003870
3871# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003872$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3873set X $ac_compile
3874ac_compiler=$2
3875for ac_option in --version -v -V -qversion; do
3876 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877case "(($ac_try" in
3878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3879 *) ac_try_echo=$ac_try;;
3880esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3882$as_echo "$ac_try_echo"; } >&5
3883 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003884 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 if test -s conftest.err; then
3886 sed '10a\
3887... rest of stderr output deleted ...
3888 10q' conftest.err >conftest.er1
3889 cat conftest.er1 >&5
3890 fi
3891 rm -f conftest.er1 conftest.err
3892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893 test $ac_status = 0; }
3894done
Martin v. Löwis11437992002-04-12 09:54:03 +00003895
Matthias Kloseb9621712010-04-24 17:59:49 +00003896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003897/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003898
Martin v. Löwis11437992002-04-12 09:54:03 +00003899int
3900main ()
3901{
3902
3903 ;
3904 return 0;
3905}
3906_ACEOF
3907ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003908ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003909# Try to create an executable without -o first, disregard a.out.
3910# It will help us diagnose broken compilers, and finding out an intuition
3911# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3913$as_echo_n "checking whether the C compiler works... " >&6; }
3914ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3915
3916# The possible output files:
3917ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919ac_rmfiles=
3920for ac_file in $ac_files
3921do
3922 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3925 esac
3926done
3927rm -f $ac_rmfiles
3928
Matthias Kloseb9621712010-04-24 17:59:49 +00003929if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930case "(($ac_try" in
3931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3932 *) ac_try_echo=$ac_try;;
3933esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3935$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3939 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3941# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3942# in a Makefile. We should not override ac_cv_exeext if it was cached,
3943# so that the user can short-circuit this test for compilers unknown to
3944# Autoconf.
3945for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003946do
3947 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003948 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003950 ;;
3951 [ab].out )
3952 # We found the default executable, but exeext='' is most
3953 # certainly right.
3954 break;;
3955 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 then :; else
3958 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3959 fi
3960 # We set ac_cv_exeext here because the later test for it is not
3961 # safe: cross compilers may not add the suffix if given an `-o'
3962 # argument, so we may need to know it at that point already.
3963 # Even if this section looks crufty: it has the advantage of
3964 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965 break;;
3966 * )
3967 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 esac
3969done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970test "$ac_cv_exeext" = no && ac_cv_exeext=
3971
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003972else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 ac_file=''
3974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003975if test -z "$ac_file"; then :
3976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3977$as_echo "no" >&6; }
3978$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003979sed 's/^/| /' conftest.$ac_ext >&5
3980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003983as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003984See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003985else
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3987$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3990$as_echo_n "checking for C compiler default output file name... " >&6; }
3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3992$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3998$as_echo_n "checking for suffix of executables... " >&6; }
3999if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000case "(($ac_try" in
4001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4002 *) ac_try_echo=$ac_try;;
4003esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4005$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4009 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004010 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4011# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4012# work properly (i.e., refer to `conftest.exe'), while it won't with
4013# `rm'.
4014for ac_file in conftest.exe conftest conftest.*; do
4015 test -f "$ac_file" || continue
4016 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4019 break;;
4020 * ) break;;
4021 esac
4022done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004023else
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004026as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004027See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004029rm -f conftest conftest$ac_cv_exeext
4030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4031$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032
4033rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004034EXEEXT=$ac_cv_exeext
4035ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4037/* end confdefs.h. */
4038#include <stdio.h>
4039int
4040main ()
4041{
4042FILE *f = fopen ("conftest.out", "w");
4043 return ferror (f) || fclose (f) != 0;
4044
4045 ;
4046 return 0;
4047}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004049ac_clean_files="$ac_clean_files conftest.out"
4050# Check that the compiler produces executables we can run. If not, either
4051# the compiler is broken, or we cross compile.
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4053$as_echo_n "checking whether we are cross compiling... " >&6; }
4054if test "$cross_compiling" != yes; then
4055 { { ac_try="$ac_link"
4056case "(($ac_try" in
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4059esac
4060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061$as_echo "$ac_try_echo"; } >&5
4062 (eval "$ac_link") 2>&5
4063 ac_status=$?
4064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }
4066 if { ac_try='./conftest$ac_cv_exeext'
4067 { { case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070esac
4071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072$as_echo "$ac_try_echo"; } >&5
4073 (eval "$ac_try") 2>&5
4074 ac_status=$?
4075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076 test $ac_status = 0; }; }; then
4077 cross_compiling=no
4078 else
4079 if test "$cross_compiling" = maybe; then
4080 cross_compiling=yes
4081 else
4082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004084as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004085If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004086See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 fi
4088 fi
4089fi
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4091$as_echo "$cross_compiling" >&6; }
4092
4093rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4094ac_clean_files=$ac_clean_files_save
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4096$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004097if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 $as_echo_n "(cached) " >&6
4099else
4100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101/* end confdefs.h. */
4102
4103int
4104main ()
4105{
4106
4107 ;
4108 return 0;
4109}
4110_ACEOF
4111rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004112if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113case "(($ac_try" in
4114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4115 *) ac_try_echo=$ac_try;;
4116esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004117eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4118$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4122 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123 for ac_file in conftest.o conftest.obj conftest.*; do
4124 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4128 break;;
4129 esac
4130done
4131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004133sed 's/^/| /' conftest.$ac_ext >&5
4134
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004137as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004138See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004140rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4143$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004144OBJEXT=$ac_cv_objext
4145ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4147$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004150else
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004153
Martin v. Löwis11437992002-04-12 09:54:03 +00004154int
4155main ()
4156{
4157#ifndef __GNUC__
4158 choke me
4159#endif
4160
4161 ;
4162 return 0;
4163}
4164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 ac_compiler_gnu=yes
4167else
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004171ac_cv_c_compiler_gnu=$ac_compiler_gnu
4172
4173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4175$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4176if test $ac_compiler_gnu = yes; then
4177 GCC=yes
4178else
4179 GCC=
4180fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004181ac_test_CFLAGS=${CFLAGS+set}
4182ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4184$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004185if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004187else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188 ac_save_c_werror_flag=$ac_c_werror_flag
4189 ac_c_werror_flag=yes
4190 ac_cv_prog_cc_g=no
4191 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004194
Martin v. Löwis11437992002-04-12 09:54:03 +00004195int
4196main ()
4197{
4198
4199 ;
4200 return 0;
4201}
4202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004203if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004204 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004205else
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 CFLAGS=""
4207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208/* end confdefs.h. */
4209
4210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219
Matthias Kloseb9621712010-04-24 17:59:49 +00004220else
4221 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004222 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224/* end confdefs.h. */
4225
4226int
4227main ()
4228{
4229
4230 ;
4231 return 0;
4232}
4233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242 ac_c_werror_flag=$ac_save_c_werror_flag
4243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4245$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004246if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248elif test $ac_cv_prog_cc_g = yes; then
4249 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004250 CFLAGS="-g -O2"
4251 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253 fi
4254else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255 if test "$GCC" = yes; then
4256 CFLAGS="-O2"
4257 else
4258 CFLAGS=
4259 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4262$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004263if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004264 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004265else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004267ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004269/* end confdefs.h. */
4270#include <stdarg.h>
4271#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004272struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004273/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4274struct buf { int x; };
4275FILE * (*rcsopen) (struct buf *, struct stat *, int);
4276static char *e (p, i)
4277 char **p;
4278 int i;
4279{
4280 return p[i];
4281}
4282static char *f (char * (*g) (char **, int), char **p, ...)
4283{
4284 char *s;
4285 va_list v;
4286 va_start (v,p);
4287 s = g (p, va_arg (v,int));
4288 va_end (v);
4289 return s;
4290}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004291
4292/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4293 function prototypes and stuff, but not '\xHH' hex character constants.
4294 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4297 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004299int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4302 inside strings and character constants. */
4303#define FOO(x) 'x'
4304int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4305
Skip Montanaro6dead952003-09-25 14:50:04 +00004306int test (int i, double x);
4307struct s1 {int (*f) (int a);};
4308struct s2 {int (*f) (double a);};
4309int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4310int argc;
4311char **argv;
4312int
4313main ()
4314{
4315return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4316 ;
4317 return 0;
4318}
4319_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4321 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004322do
4323 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327rm -f core conftest.err conftest.$ac_objext
4328 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004329done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004331CC=$ac_save_CC
4332
4333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334# AC_CACHE_VAL
4335case "x$ac_cv_prog_cc_c89" in
4336 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4338$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4341$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004342 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4345$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004346esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004347if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004348
Matthias Kloseb9621712010-04-24 17:59:49 +00004349fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004350
Martin v. Löwis11437992002-04-12 09:54:03 +00004351ac_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
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004357ac_ext=c
4358ac_cpp='$CPP $CPPFLAGS'
4359ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4360ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4361ac_compiler_gnu=$ac_cv_c_compiler_gnu
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4363$as_echo_n "checking how to run the C preprocessor... " >&6; }
4364# On Suns, sometimes $CPP names a directory.
4365if test -n "$CPP" && test -d "$CPP"; then
4366 CPP=
4367fi
4368if test -z "$CPP"; then
4369 if ${ac_cv_prog_CPP+:} false; then :
4370 $as_echo_n "(cached) " >&6
4371else
4372 # Double quotes because CPP needs to be expanded
4373 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4374 do
4375 ac_preproc_ok=false
4376for ac_c_preproc_warn_flag in '' yes
4377do
4378 # Use a header file that comes with gcc, so configuring glibc
4379 # with a fresh cross-compiler works.
4380 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4381 # <limits.h> exists even on freestanding compilers.
4382 # On the NeXT, cc -E runs the code through the compiler's parser,
4383 # not just through cpp. "Syntax error" is here to catch this case.
4384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4385/* end confdefs.h. */
4386#ifdef __STDC__
4387# include <limits.h>
4388#else
4389# include <assert.h>
4390#endif
4391 Syntax error
4392_ACEOF
4393if ac_fn_c_try_cpp "$LINENO"; then :
4394
4395else
4396 # Broken: fails on valid input.
4397continue
4398fi
4399rm -f conftest.err conftest.i conftest.$ac_ext
4400
4401 # OK, works on sane cases. Now check whether nonexistent headers
4402 # can be detected and how.
4403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4404/* end confdefs.h. */
4405#include <ac_nonexistent.h>
4406_ACEOF
4407if ac_fn_c_try_cpp "$LINENO"; then :
4408 # Broken: success on invalid input.
4409continue
4410else
4411 # Passes both tests.
4412ac_preproc_ok=:
4413break
4414fi
4415rm -f conftest.err conftest.i conftest.$ac_ext
4416
4417done
4418# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4419rm -f conftest.i conftest.err conftest.$ac_ext
4420if $ac_preproc_ok; then :
4421 break
4422fi
4423
4424 done
4425 ac_cv_prog_CPP=$CPP
4426
4427fi
4428 CPP=$ac_cv_prog_CPP
4429else
4430 ac_cv_prog_CPP=$CPP
4431fi
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4433$as_echo "$CPP" >&6; }
4434ac_preproc_ok=false
4435for ac_c_preproc_warn_flag in '' yes
4436do
4437 # Use a header file that comes with gcc, so configuring glibc
4438 # with a fresh cross-compiler works.
4439 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4440 # <limits.h> exists even on freestanding compilers.
4441 # On the NeXT, cc -E runs the code through the compiler's parser,
4442 # not just through cpp. "Syntax error" is here to catch this case.
4443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4444/* end confdefs.h. */
4445#ifdef __STDC__
4446# include <limits.h>
4447#else
4448# include <assert.h>
4449#endif
4450 Syntax error
4451_ACEOF
4452if ac_fn_c_try_cpp "$LINENO"; then :
4453
4454else
4455 # Broken: fails on valid input.
4456continue
4457fi
4458rm -f conftest.err conftest.i conftest.$ac_ext
4459
4460 # OK, works on sane cases. Now check whether nonexistent headers
4461 # can be detected and how.
4462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4463/* end confdefs.h. */
4464#include <ac_nonexistent.h>
4465_ACEOF
4466if ac_fn_c_try_cpp "$LINENO"; then :
4467 # Broken: success on invalid input.
4468continue
4469else
4470 # Passes both tests.
4471ac_preproc_ok=:
4472break
4473fi
4474rm -f conftest.err conftest.i conftest.$ac_ext
4475
4476done
4477# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4478rm -f conftest.i conftest.err conftest.$ac_ext
4479if $ac_preproc_ok; then :
4480
4481else
4482 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4483$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4484as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4485See \`config.log' for more details" "$LINENO" 5; }
4486fi
4487
4488ac_ext=c
4489ac_cpp='$CPP $CPPFLAGS'
4490ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4491ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4492ac_compiler_gnu=$ac_cv_c_compiler_gnu
4493
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4495$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4496if ${ac_cv_path_GREP+:} false; then :
4497 $as_echo_n "(cached) " >&6
4498else
4499 if test -z "$GREP"; then
4500 ac_path_GREP_found=false
4501 # Loop through the user's path and test for each of PROGNAME-LIST
4502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4504do
4505 IFS=$as_save_IFS
4506 test -z "$as_dir" && as_dir=.
4507 for ac_prog in grep ggrep; do
4508 for ac_exec_ext in '' $ac_executable_extensions; do
4509 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4510 as_fn_executable_p "$ac_path_GREP" || continue
4511# Check for GNU ac_path_GREP and select it if it is found.
4512 # Check for GNU $ac_path_GREP
4513case `"$ac_path_GREP" --version 2>&1` in
4514*GNU*)
4515 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4516*)
4517 ac_count=0
4518 $as_echo_n 0123456789 >"conftest.in"
4519 while :
4520 do
4521 cat "conftest.in" "conftest.in" >"conftest.tmp"
4522 mv "conftest.tmp" "conftest.in"
4523 cp "conftest.in" "conftest.nl"
4524 $as_echo 'GREP' >> "conftest.nl"
4525 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4526 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4527 as_fn_arith $ac_count + 1 && ac_count=$as_val
4528 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4529 # Best one so far, save it but keep looking for a better one
4530 ac_cv_path_GREP="$ac_path_GREP"
4531 ac_path_GREP_max=$ac_count
4532 fi
4533 # 10*(2^10) chars as input seems more than enough
4534 test $ac_count -gt 10 && break
4535 done
4536 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4537esac
4538
4539 $ac_path_GREP_found && break 3
4540 done
4541 done
4542 done
4543IFS=$as_save_IFS
4544 if test -z "$ac_cv_path_GREP"; then
4545 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4546 fi
4547else
4548 ac_cv_path_GREP=$GREP
4549fi
4550
4551fi
4552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4553$as_echo "$ac_cv_path_GREP" >&6; }
4554 GREP="$ac_cv_path_GREP"
4555
4556
Łukasz Langaa785c872016-09-09 17:37:37 -07004557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4558$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4559if ${ac_cv_path_SED+:} false; then :
4560 $as_echo_n "(cached) " >&6
4561else
4562 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4563 for ac_i in 1 2 3 4 5 6 7; do
4564 ac_script="$ac_script$as_nl$ac_script"
4565 done
4566 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4567 { ac_script=; unset ac_script;}
4568 if test -z "$SED"; then
4569 ac_path_SED_found=false
4570 # Loop through the user's path and test for each of PROGNAME-LIST
4571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4572for as_dir in $PATH
4573do
4574 IFS=$as_save_IFS
4575 test -z "$as_dir" && as_dir=.
4576 for ac_prog in sed gsed; do
4577 for ac_exec_ext in '' $ac_executable_extensions; do
4578 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4579 as_fn_executable_p "$ac_path_SED" || continue
4580# Check for GNU ac_path_SED and select it if it is found.
4581 # Check for GNU $ac_path_SED
4582case `"$ac_path_SED" --version 2>&1` in
4583*GNU*)
4584 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4585*)
4586 ac_count=0
4587 $as_echo_n 0123456789 >"conftest.in"
4588 while :
4589 do
4590 cat "conftest.in" "conftest.in" >"conftest.tmp"
4591 mv "conftest.tmp" "conftest.in"
4592 cp "conftest.in" "conftest.nl"
4593 $as_echo '' >> "conftest.nl"
4594 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4595 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4596 as_fn_arith $ac_count + 1 && ac_count=$as_val
4597 if test $ac_count -gt ${ac_path_SED_max-0}; then
4598 # Best one so far, save it but keep looking for a better one
4599 ac_cv_path_SED="$ac_path_SED"
4600 ac_path_SED_max=$ac_count
4601 fi
4602 # 10*(2^10) chars as input seems more than enough
4603 test $ac_count -gt 10 && break
4604 done
4605 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4606esac
4607
4608 $ac_path_SED_found && break 3
4609 done
4610 done
4611 done
4612IFS=$as_save_IFS
4613 if test -z "$ac_cv_path_SED"; then
4614 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4615 fi
4616else
4617 ac_cv_path_SED=$SED
4618fi
4619
4620fi
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4622$as_echo "$ac_cv_path_SED" >&6; }
4623 SED="$ac_cv_path_SED"
4624 rm -f conftest.sed
4625
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004626
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004627
4628
Matthias Kloseb9621712010-04-24 17:59:49 +00004629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4630$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004632# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004633if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004634 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004635
4636 case $withval in
4637 no) with_cxx_main=no
4638 MAINCC='$(CC)';;
4639 yes) with_cxx_main=yes
4640 MAINCC='$(CXX)';;
4641 *) with_cxx_main=yes
4642 MAINCC=$withval
4643 if test -z "$CXX"
4644 then
4645 CXX=$withval
4646 fi;;
4647 esac
4648else
4649
4650 with_cxx_main=no
4651 MAINCC='$(CC)'
4652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004653fi
4654
Matthias Kloseb9621712010-04-24 17:59:49 +00004655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4656$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004657
4658preset_cxx="$CXX"
4659if test -z "$CXX"
4660then
4661 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004662 gcc) if test -n "$ac_tool_prefix"; then
4663 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4664set dummy ${ac_tool_prefix}g++; ac_word=$2
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666$as_echo_n "checking for $ac_word... " >&6; }
4667if ${ac_cv_path_CXX+:} false; then :
4668 $as_echo_n "(cached) " >&6
4669else
4670 case $CXX in
4671 [\\/]* | ?:[\\/]*)
4672 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4673 ;;
4674 *)
4675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4676for as_dir in notfound
4677do
4678 IFS=$as_save_IFS
4679 test -z "$as_dir" && as_dir=.
4680 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004682 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4684 break 2
4685 fi
4686done
4687 done
4688IFS=$as_save_IFS
4689
4690 ;;
4691esac
4692fi
4693CXX=$ac_cv_path_CXX
4694if test -n "$CXX"; then
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4696$as_echo "$CXX" >&6; }
4697else
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4699$as_echo "no" >&6; }
4700fi
4701
4702
4703fi
4704if test -z "$ac_cv_path_CXX"; then
4705 ac_pt_CXX=$CXX
4706 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004707set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4709$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004710if ${ac_cv_path_ac_pt_CXX+:} false; then :
4711 $as_echo_n "(cached) " >&6
4712else
4713 case $ac_pt_CXX in
4714 [\\/]* | ?:[\\/]*)
4715 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4716 ;;
4717 *)
4718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719for as_dir in notfound
4720do
4721 IFS=$as_save_IFS
4722 test -z "$as_dir" && as_dir=.
4723 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004725 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4727 break 2
4728 fi
4729done
4730 done
4731IFS=$as_save_IFS
4732
4733 ;;
4734esac
4735fi
4736ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4737if test -n "$ac_pt_CXX"; then
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4739$as_echo "$ac_pt_CXX" >&6; }
4740else
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4742$as_echo "no" >&6; }
4743fi
4744
4745 if test "x$ac_pt_CXX" = x; then
4746 CXX="g++"
4747 else
4748 case $cross_compiling:$ac_tool_warned in
4749yes:)
4750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4752ac_tool_warned=yes ;;
4753esac
4754 CXX=$ac_pt_CXX
4755 fi
4756else
4757 CXX="$ac_cv_path_CXX"
4758fi
4759 ;;
4760 cc) if test -n "$ac_tool_prefix"; then
4761 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4762set dummy ${ac_tool_prefix}c++; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004765if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767else
4768 case $CXX in
4769 [\\/]* | ?:[\\/]*)
4770 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4771 ;;
4772 *)
4773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774for as_dir in notfound
4775do
4776 IFS=$as_save_IFS
4777 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004779 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782 break 2
4783 fi
4784done
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004786IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 ;;
4789esac
4790fi
4791CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004792if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4794$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795else
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004799
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004800
4801fi
4802if test -z "$ac_cv_path_CXX"; then
4803 ac_pt_CXX=$CXX
4804 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4807$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004809 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 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 +00004814 ;;
4815 *)
4816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4817for as_dir in notfound
4818do
4819 IFS=$as_save_IFS
4820 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825 break 2
4826 fi
4827done
Matthias Kloseb9621712010-04-24 17:59:49 +00004828 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004829IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004830
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831 ;;
4832esac
4833fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004834ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4835if test -n "$ac_pt_CXX"; then
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4837$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004838else
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4840$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004842
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004843 if test "x$ac_pt_CXX" = x; then
4844 CXX="c++"
4845 else
4846 case $cross_compiling:$ac_tool_warned in
4847yes:)
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4850ac_tool_warned=yes ;;
4851esac
4852 CXX=$ac_pt_CXX
4853 fi
4854else
4855 CXX="$ac_cv_path_CXX"
4856fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858 clang|*/clang) if test -n "$ac_tool_prefix"; then
4859 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4860set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4862$as_echo_n "checking for $ac_word... " >&6; }
4863if ${ac_cv_path_CXX+:} false; then :
4864 $as_echo_n "(cached) " >&6
4865else
4866 case $CXX in
4867 [\\/]* | ?:[\\/]*)
4868 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4869 ;;
4870 *)
4871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4872for as_dir in notfound
4873do
4874 IFS=$as_save_IFS
4875 test -z "$as_dir" && as_dir=.
4876 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004878 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4880 break 2
4881 fi
4882done
4883 done
4884IFS=$as_save_IFS
4885
Ned Deilycbfb9a52012-06-23 16:02:19 -07004886 ;;
4887esac
4888fi
4889CXX=$ac_cv_path_CXX
4890if test -n "$CXX"; then
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4892$as_echo "$CXX" >&6; }
4893else
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004898
4899fi
4900if test -z "$ac_cv_path_CXX"; then
4901 ac_pt_CXX=$CXX
4902 # Extract the first word of "clang++", so it can be a program name with args.
4903set dummy clang++; ac_word=$2
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4905$as_echo_n "checking for $ac_word... " >&6; }
4906if ${ac_cv_path_ac_pt_CXX+:} false; then :
4907 $as_echo_n "(cached) " >&6
4908else
4909 case $ac_pt_CXX in
4910 [\\/]* | ?:[\\/]*)
4911 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4912 ;;
4913 *)
4914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4915for as_dir in notfound
4916do
4917 IFS=$as_save_IFS
4918 test -z "$as_dir" && as_dir=.
4919 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004920 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004921 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4923 break 2
4924 fi
4925done
4926 done
4927IFS=$as_save_IFS
4928
4929 ;;
4930esac
4931fi
4932ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4933if test -n "$ac_pt_CXX"; then
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4935$as_echo "$ac_pt_CXX" >&6; }
4936else
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4938$as_echo "no" >&6; }
4939fi
4940
4941 if test "x$ac_pt_CXX" = x; then
4942 CXX="clang++"
4943 else
4944 case $cross_compiling:$ac_tool_warned in
4945yes:)
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4947$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4948ac_tool_warned=yes ;;
4949esac
4950 CXX=$ac_pt_CXX
4951 fi
4952else
4953 CXX="$ac_cv_path_CXX"
4954fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004955 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004956 icc|*/icc) if test -n "$ac_tool_prefix"; then
4957 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4958set dummy ${ac_tool_prefix}icpc; ac_word=$2
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4960$as_echo_n "checking for $ac_word... " >&6; }
4961if ${ac_cv_path_CXX+:} false; then :
4962 $as_echo_n "(cached) " >&6
4963else
4964 case $CXX in
4965 [\\/]* | ?:[\\/]*)
4966 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4967 ;;
4968 *)
4969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in notfound
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
4974 for ac_exec_ext in '' $ac_executable_extensions; do
4975 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4976 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4978 break 2
4979 fi
4980done
4981 done
4982IFS=$as_save_IFS
4983
4984 ;;
4985esac
4986fi
4987CXX=$ac_cv_path_CXX
4988if test -n "$CXX"; then
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4990$as_echo "$CXX" >&6; }
4991else
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993$as_echo "no" >&6; }
4994fi
4995
4996
4997fi
4998if test -z "$ac_cv_path_CXX"; then
4999 ac_pt_CXX=$CXX
5000 # Extract the first word of "icpc", so it can be a program name with args.
5001set dummy icpc; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if ${ac_cv_path_ac_pt_CXX+:} false; then :
5005 $as_echo_n "(cached) " >&6
5006else
5007 case $ac_pt_CXX in
5008 [\\/]* | ?:[\\/]*)
5009 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5010 ;;
5011 *)
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in notfound
5014do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
5018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023done
5024 done
5025IFS=$as_save_IFS
5026
5027 ;;
5028esac
5029fi
5030ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5031if test -n "$ac_pt_CXX"; then
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5033$as_echo "$ac_pt_CXX" >&6; }
5034else
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039 if test "x$ac_pt_CXX" = x; then
5040 CXX="icpc"
5041 else
5042 case $cross_compiling:$ac_tool_warned in
5043yes:)
5044{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5045$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5046ac_tool_warned=yes ;;
5047esac
5048 CXX=$ac_pt_CXX
5049 fi
5050else
5051 CXX="$ac_cv_path_CXX"
5052fi
5053 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054 esac
5055 if test "$CXX" = "notfound"
5056 then
5057 CXX=""
5058 fi
5059fi
5060if test -z "$CXX"
5061then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005062 if test -n "$ac_tool_prefix"; then
5063 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5064 do
5065 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005069if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005071else
5072 if test -n "$CXX"; then
5073 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5074else
5075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078 IFS=$as_save_IFS
5079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005080 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005082 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084 break 2
5085 fi
5086done
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005088IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005089
5090fi
5091fi
5092CXX=$ac_cv_prog_CXX
5093if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5095$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005096else
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5098$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005099fi
5100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005102 test -n "$CXX" && break
5103 done
5104fi
5105if test -z "$CXX"; then
5106 ac_ct_CXX=$CXX
5107 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5108do
5109 # Extract the first word of "$ac_prog", so it can be a program name with args.
5110set dummy $ac_prog; ac_word=$2
5111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5112$as_echo_n "checking for $ac_word... " >&6; }
5113if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5114 $as_echo_n "(cached) " >&6
5115else
5116 if test -n "$ac_ct_CXX"; then
5117 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5118else
5119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5120for as_dir in $PATH
5121do
5122 IFS=$as_save_IFS
5123 test -z "$as_dir" && as_dir=.
5124 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005126 ac_cv_prog_ac_ct_CXX="$ac_prog"
5127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5128 break 2
5129 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005130done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005131 done
5132IFS=$as_save_IFS
5133
5134fi
5135fi
5136ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5137if test -n "$ac_ct_CXX"; then
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5139$as_echo "$ac_ct_CXX" >&6; }
5140else
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5142$as_echo "no" >&6; }
5143fi
5144
5145
5146 test -n "$ac_ct_CXX" && break
5147done
5148
5149 if test "x$ac_ct_CXX" = x; then
5150 CXX="notfound"
5151 else
5152 case $cross_compiling:$ac_tool_warned in
5153yes:)
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5156ac_tool_warned=yes ;;
5157esac
5158 CXX=$ac_ct_CXX
5159 fi
5160fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005161
5162 if test "$CXX" = "notfound"
5163 then
5164 CXX=""
5165 fi
5166fi
5167if test "$preset_cxx" != "$CXX"
5168then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005169 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005170
5171 By default, distutils will build C++ extension modules with \"$CXX\".
5172 If this is not intended, then set CXX on the configure command line.
5173 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005174$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005175
5176 By default, distutils will build C++ extension modules with \"$CXX\".
5177 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005178 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179fi
5180
5181
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5183
5184
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5186$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5187cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005188#undef bfin
5189#undef cris
5190#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005191#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005192#undef hppa
5193#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005194#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005195#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005196#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005197#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005198#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005199#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005200 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005201#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005202# if defined(__x86_64__) && defined(__LP64__)
5203 x86_64-linux-gnu
5204# elif defined(__x86_64__) && defined(__ILP32__)
5205 x86_64-linux-gnux32
5206# elif defined(__i386__)
5207 i386-linux-gnu
5208# elif defined(__aarch64__) && defined(__AARCH64EL__)
5209# if defined(__ILP32__)
5210 aarch64_ilp32-linux-gnu
5211# else
5212 aarch64-linux-gnu
5213# endif
5214# elif defined(__aarch64__) && defined(__AARCH64EB__)
5215# if defined(__ILP32__)
5216 aarch64_be_ilp32-linux-gnu
5217# else
5218 aarch64_be-linux-gnu
5219# endif
5220# elif defined(__alpha__)
5221 alpha-linux-gnu
5222# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5223# if defined(__ARMEL__)
5224 arm-linux-gnueabihf
5225# else
5226 armeb-linux-gnueabihf
5227# endif
5228# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5229# if defined(__ARMEL__)
5230 arm-linux-gnueabi
5231# else
5232 armeb-linux-gnueabi
5233# endif
5234# elif defined(__hppa__)
5235 hppa-linux-gnu
5236# elif defined(__ia64__)
5237 ia64-linux-gnu
5238# elif defined(__m68k__) && !defined(__mcoldfire__)
5239 m68k-linux-gnu
5240# elif defined(__mips_hard_float) && defined(_MIPSEL)
5241# if _MIPS_SIM == _ABIO32
5242 mipsel-linux-gnu
5243# elif _MIPS_SIM == _ABIN32
5244 mips64el-linux-gnuabin32
5245# elif _MIPS_SIM == _ABI64
5246 mips64el-linux-gnuabi64
5247# else
5248# error unknown platform triplet
5249# endif
5250# elif defined(__mips_hard_float)
5251# if _MIPS_SIM == _ABIO32
5252 mips-linux-gnu
5253# elif _MIPS_SIM == _ABIN32
5254 mips64-linux-gnuabin32
5255# elif _MIPS_SIM == _ABI64
5256 mips64-linux-gnuabi64
5257# else
5258# error unknown platform triplet
5259# endif
5260# elif defined(__or1k__)
5261 or1k-linux-gnu
5262# elif defined(__powerpc__) && defined(__SPE__)
5263 powerpc-linux-gnuspe
5264# elif defined(__powerpc64__)
5265# if defined(__LITTLE_ENDIAN__)
5266 powerpc64le-linux-gnu
5267# else
5268 powerpc64-linux-gnu
5269# endif
5270# elif defined(__powerpc__)
5271 powerpc-linux-gnu
5272# elif defined(__s390x__)
5273 s390x-linux-gnu
5274# elif defined(__s390__)
5275 s390-linux-gnu
5276# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5277 sh4-linux-gnu
5278# elif defined(__sparc__) && defined(__arch64__)
5279 sparc64-linux-gnu
5280# elif defined(__sparc__)
5281 sparc-linux-gnu
5282# else
5283# error unknown platform triplet
5284# endif
5285#elif defined(__FreeBSD_kernel__)
5286# if defined(__LP64__)
5287 x86_64-kfreebsd-gnu
5288# elif defined(__i386__)
5289 i386-kfreebsd-gnu
5290# else
5291# error unknown platform triplet
5292# endif
5293#elif defined(__gnu_hurd__)
5294 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005295#elif defined(__APPLE__)
5296 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005297#else
5298# error unknown platform triplet
5299#endif
5300
5301EOF
5302
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005303if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005304 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5306$as_echo "$PLATFORM_TRIPLET" >&6; }
5307else
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5309$as_echo "none" >&6; }
5310fi
5311rm -f conftest.c conftest.out
5312
5313if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5314 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5315 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5316 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005317elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5318 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005319fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005320
doko@ubuntu.com55532312016-06-14 08:55:19 +02005321if test x$MULTIARCH != x; then
5322 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5323fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005324
5325
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5327$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5328save_LDFLAGS="$LDFLAGS"
5329LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005330
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5332/* end confdefs.h. */
5333
5334int
5335main ()
5336{
5337
5338 ;
5339 return 0;
5340}
5341_ACEOF
5342if ac_fn_c_try_link "$LINENO"; then :
5343 NO_AS_NEEDED="-Wl,--no-as-needed"
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5345$as_echo "yes" >&6; }
5346else
5347 NO_AS_NEEDED=""
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349$as_echo "no" >&6; }
5350fi
5351rm -f core conftest.err conftest.$ac_objext \
5352 conftest$ac_exeext conftest.$ac_ext
5353LDFLAGS="$save_LDFLAGS"
5354
5355
5356
5357# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005358
Matthias Kloseb9621712010-04-24 17:59:49 +00005359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5360$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005361if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363else
5364 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5365 then ac_cv_path_EGREP="$GREP -E"
5366 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 # Loop through the user's path and test for each of PROGNAME-LIST
5370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5372do
5373 IFS=$as_save_IFS
5374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 for ac_prog in egrep; do
5376 for ac_exec_ext in '' $ac_executable_extensions; do
5377 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005378 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005379# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005380 # Check for GNU $ac_path_EGREP
5381case `"$ac_path_EGREP" --version 2>&1` in
5382*GNU*)
5383 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5384*)
5385 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387 while :
5388 do
5389 cat "conftest.in" "conftest.in" >"conftest.tmp"
5390 mv "conftest.tmp" "conftest.in"
5391 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5394 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5397 # Best one so far, save it but keep looking for a better one
5398 ac_cv_path_EGREP="$ac_path_EGREP"
5399 ac_path_EGREP_max=$ac_count
5400 fi
5401 # 10*(2^10) chars as input seems more than enough
5402 test $ac_count -gt 10 && break
5403 done
5404 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5405esac
5406
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 $ac_path_EGREP_found && break 3
5408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005413 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 +00005414 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005415else
5416 ac_cv_path_EGREP=$EGREP
5417fi
5418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005419 fi
5420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5422$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005424
5425
Matthias Kloseb9621712010-04-24 17:59:49 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5427$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005428if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 $as_echo_n "(cached) " >&6
5430else
5431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005432/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005433#include <stdlib.h>
5434#include <stdarg.h>
5435#include <string.h>
5436#include <float.h>
5437
5438int
5439main ()
5440{
5441
5442 ;
5443 return 0;
5444}
5445_ACEOF
5446if ac_fn_c_try_compile "$LINENO"; then :
5447 ac_cv_header_stdc=yes
5448else
5449 ac_cv_header_stdc=no
5450fi
5451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5452
5453if test $ac_cv_header_stdc = yes; then
5454 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5456/* end confdefs.h. */
5457#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005458
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005459_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005461 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005463else
Matthias Kloseb9621712010-04-24 17:59:49 +00005464 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005465fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005466rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467
Matthias Kloseb9621712010-04-24 17:59:49 +00005468fi
5469
5470if test $ac_cv_header_stdc = yes; then
5471 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5473/* end confdefs.h. */
5474#include <stdlib.h>
5475
5476_ACEOF
5477if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5478 $EGREP "free" >/dev/null 2>&1; then :
5479
5480else
5481 ac_cv_header_stdc=no
5482fi
5483rm -f conftest*
5484
5485fi
5486
5487if test $ac_cv_header_stdc = yes; then
5488 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5489 if test "$cross_compiling" = yes; then :
5490 :
5491else
5492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5493/* end confdefs.h. */
5494#include <ctype.h>
5495#include <stdlib.h>
5496#if ((' ' & 0x0FF) == 0x020)
5497# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5498# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5499#else
5500# define ISLOWER(c) \
5501 (('a' <= (c) && (c) <= 'i') \
5502 || ('j' <= (c) && (c) <= 'r') \
5503 || ('s' <= (c) && (c) <= 'z'))
5504# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5505#endif
5506
5507#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5508int
5509main ()
5510{
5511 int i;
5512 for (i = 0; i < 256; i++)
5513 if (XOR (islower (i), ISLOWER (i))
5514 || toupper (i) != TOUPPER (i))
5515 return 2;
5516 return 0;
5517}
5518_ACEOF
5519if ac_fn_c_try_run "$LINENO"; then :
5520
5521else
5522 ac_cv_header_stdc=no
5523fi
5524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5525 conftest.$ac_objext conftest.beam conftest.$ac_ext
5526fi
5527
5528fi
5529fi
5530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5531$as_echo "$ac_cv_header_stdc" >&6; }
5532if test $ac_cv_header_stdc = yes; then
5533
5534$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5535
5536fi
5537
5538# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5539for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5540 inttypes.h stdint.h unistd.h
5541do :
5542 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5543ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5544"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005545if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 cat >>confdefs.h <<_ACEOF
5547#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5548_ACEOF
5549
5550fi
5551
5552done
5553
5554
5555
5556 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 +02005557if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005558 MINIX=yes
5559else
5560 MINIX=
5561fi
5562
5563
5564 if test "$MINIX" = yes; then
5565
5566$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5567
5568
5569$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5570
5571
5572$as_echo "#define _MINIX 1" >>confdefs.h
5573
5574 fi
5575
5576
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5578$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005579if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005580 $as_echo_n "(cached) " >&6
5581else
5582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5583/* end confdefs.h. */
5584
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005585# define __EXTENSIONS__ 1
5586 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005587int
5588main ()
5589{
5590
5591 ;
5592 return 0;
5593}
5594_ACEOF
5595if ac_fn_c_try_compile "$LINENO"; then :
5596 ac_cv_safe_to_define___extensions__=yes
5597else
5598 ac_cv_safe_to_define___extensions__=no
5599fi
5600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5601fi
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5603$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5604 test $ac_cv_safe_to_define___extensions__ = yes &&
5605 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5606
5607 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5608
5609 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5610
5611 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5612
5613 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5614
5615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616
Xavier de Gaye95750b12016-07-09 11:05:42 +02005617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5618$as_echo_n "checking for the Android API level... " >&6; }
5619cat >> conftest.c <<EOF
5620#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005621android_api = __ANDROID_API__
5622arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005623#else
5624#error not Android
5625#endif
5626EOF
5627
5628if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005629 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5630 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5632$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005633 if test -z "$ANDROID_API_LEVEL"; then
5634 echo 'Fatal: you must define __ANDROID_API__'
5635 exit 1
5636 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005637
5638cat >>confdefs.h <<_ACEOF
5639#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5640_ACEOF
5641
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005642
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5644$as_echo_n "checking for the Android arm ABI... " >&6; }
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5646$as_echo "$_arm_arch" >&6; }
5647 if test "$_arm_arch" = 7; then
5648 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5649 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5650 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005651else
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5653$as_echo "not Android" >&6; }
5654fi
5655rm -f conftest.c conftest.out
5656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657# Check for unsupported systems
5658case $ac_sys_system/$ac_sys_release in
5659atheos*|Linux*/1*)
5660 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5661 echo See README for details.
5662 exit 1;;
5663esac
5664
5665
Matthias Kloseb9621712010-04-24 17:59:49 +00005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5667$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668
5669# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005670if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 withval=$with_suffix;
5672 case $withval in
5673 no) EXEEXT=;;
5674 yes) EXEEXT=.exe;;
5675 *) EXEEXT=$withval;;
5676 esac
5677fi
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5680$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
5682# Test whether we're running on a non-case-sensitive system, in which
5683# case we give a warning if no ext is given
5684
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5686$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687if test ! -d CaseSensitiveTestDir; then
5688mkdir CaseSensitiveTestDir
5689fi
5690
5691if test -d casesensitivetestdir
5692then
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5694$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695 BUILDEXEEXT=.exe
5696else
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5698$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699 BUILDEXEEXT=$EXEEXT
5700fi
5701rmdir CaseSensitiveTestDir
5702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703case $ac_sys_system in
5704hp*|HP*)
5705 case $CC in
5706 cc|*/cc) CC="$CC -Ae";;
5707 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708esac
5709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5712$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713if test -z "$LIBRARY"
5714then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005715 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5718$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719
5720# LDLIBRARY is the name of the library to link against (as opposed to the
5721# name of the library into which to insert object files). BLDLIBRARY is also
5722# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5723# is blank as the main program is not linked directly against LDLIBRARY.
5724# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5725# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5726# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5727# DLLLIBRARY is the shared (i.e., DLL) library.
5728#
5729# RUNSHARED is used to run shared python without installed libraries
5730#
5731# INSTSONAME is the name of the shared library that will be use to install
5732# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005733#
5734# LDVERSION is the shared library version number, normally the Python version
5735# with the ABI build flags appended.
5736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737
5738
5739
5740
5741
5742
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744LDLIBRARY="$LIBRARY"
5745BLDLIBRARY='$(LDLIBRARY)'
5746INSTSONAME='$(LDLIBRARY)'
5747DLLLIBRARY=''
5748LDLIBRARYDIR=''
5749RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005750LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
5752# LINKCC is the command that links the python executable -- default is $(CC).
5753# If CXX is set, and if it is needed to link a main function that was
5754# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5755# python might then depend on the C++ runtime
5756# This is altered for AIX in order to build the export list before
5757# linking.
5758
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5760$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761if test -z "$LINKCC"
5762then
5763 LINKCC='$(PURIFY) $(MAINCC)'
5764 case $ac_sys_system in
5765 AIX*)
5766 exp_extra="\"\""
5767 if test $ac_sys_release -ge 5 -o \
5768 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5769 exp_extra="."
5770 fi
5771 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772 QNX*)
5773 # qcc must be used because the other compilers do not
5774 # support -N.
5775 LINKCC=qcc;;
5776 esac
5777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5779$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
5781# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5782# make sure we default having it set to "no": this is used by
5783# distutils.unixccompiler to know if it should add --enable-new-dtags
5784# to linker command lines, and failing to detect GNU ld simply results
5785# in the same bahaviour as before.
5786
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5788$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789ac_prog=ld
5790if test "$GCC" = yes; then
5791 ac_prog=`$CC -print-prog-name=ld`
5792fi
5793case `"$ac_prog" -V 2>&1 < /dev/null` in
5794 *GNU*)
5795 GNULD=yes;;
5796 *)
5797 GNULD=no;;
5798esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5800$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5803$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005805if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 enableval=$enable_shared;
5807fi
5808
5809
5810if test -z "$enable_shared"
5811then
5812 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005813 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 enable_shared="yes";;
5815 *)
5816 enable_shared="no";;
5817 esac
5818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5820$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5823$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005825if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005826 enableval=$enable_profiling;
5827fi
5828
5829if test "x$enable_profiling" = xyes; then
5830 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005831 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833/* end confdefs.h. */
5834int main() { return 0; }
5835_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836if ac_fn_c_try_link "$LINENO"; then :
5837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005839 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841rm -f core conftest.err conftest.$ac_objext \
5842 conftest$ac_exeext conftest.$ac_ext
5843 CC="$ac_save_cc"
5844else
5845 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5848$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849
doko@ubuntu.comba015832012-06-30 16:52:05 +02005850if test "x$enable_profiling" = xyes; then
5851 BASECFLAGS="-pg $BASECFLAGS"
5852 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853fi
5854
Matthias Kloseb9621712010-04-24 17:59:49 +00005855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5856$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
5858# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5859# library that we build, but we do not want to link against it (we
5860# will find it with a -framework option). For this reason there is an
5861# extra variable BLDLIBRARY against which Python and the extension
5862# modules are linked, BLDLIBRARY. This is normally the same as
5863# LDLIBRARY, but empty for MacOSX framework builds.
5864if test "$enable_framework"
5865then
5866 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005867 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868 BLDLIBRARY=''
5869else
5870 BLDLIBRARY='$(LDLIBRARY)'
5871fi
5872
5873# Other platforms follow
5874if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005875 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876
Matthias Kloseb9621712010-04-24 17:59:49 +00005877$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
5879 case $ac_sys_system in
5880 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005881 LDLIBRARY='libpython$(LDVERSION).dll.a'
5882 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 ;;
5884 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005885 LDLIBRARY='libpython$(LDVERSION).so'
5886 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005887 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005889 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005890 then
5891 PY3LIBRARY=libpython3.so
5892 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005894 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005895 LDLIBRARY='libpython$(LDVERSION).so'
5896 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005897 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005899 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005900 then
5901 PY3LIBRARY=libpython3.so
5902 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
5904 hp*|HP*)
5905 case `uname -m` in
5906 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
5909 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
5912 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).dylib'
5918 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005919 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005921 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005923 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005924 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
5926 esac
5927else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005928 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929 case $ac_sys_system in
5930 CYGWIN*)
5931 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005932 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
5934 esac
5935fi
5936
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005937if test "$cross_compiling" = yes; then
5938 RUNSHARED=
5939fi
5940
Matthias Kloseb9621712010-04-24 17:59:49 +00005941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5942$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005945if test -n "$ac_tool_prefix"; then
5946 for ac_prog in ar aal
5947 do
5948 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5949set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5951$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005952if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954else
5955 if test -n "$AR"; then
5956 ac_cv_prog_AR="$AR" # Let the user override the test.
5957else
5958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5959for as_dir in $PATH
5960do
5961 IFS=$as_save_IFS
5962 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005963 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005964 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005965 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 break 2
5968 fi
5969done
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971IFS=$as_save_IFS
5972
5973fi
5974fi
5975AR=$ac_cv_prog_AR
5976if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5978$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979else
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
5983
5984
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005985 test -n "$AR" && break
5986 done
5987fi
5988if test -z "$AR"; then
5989 ac_ct_AR=$AR
5990 for ac_prog in ar aal
5991do
5992 # Extract the first word of "$ac_prog", so it can be a program name with args.
5993set dummy $ac_prog; ac_word=$2
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995$as_echo_n "checking for $ac_word... " >&6; }
5996if ${ac_cv_prog_ac_ct_AR+:} false; then :
5997 $as_echo_n "(cached) " >&6
5998else
5999 if test -n "$ac_ct_AR"; then
6000 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6001else
6002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH
6004do
6005 IFS=$as_save_IFS
6006 test -z "$as_dir" && as_dir=.
6007 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006009 ac_cv_prog_ac_ct_AR="$ac_prog"
6010 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6011 break 2
6012 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006014 done
6015IFS=$as_save_IFS
6016
6017fi
6018fi
6019ac_ct_AR=$ac_cv_prog_ac_ct_AR
6020if test -n "$ac_ct_AR"; then
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6022$as_echo "$ac_ct_AR" >&6; }
6023else
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6025$as_echo "no" >&6; }
6026fi
6027
6028
6029 test -n "$ac_ct_AR" && break
6030done
6031
6032 if test "x$ac_ct_AR" = x; then
6033 AR="ar"
6034 else
6035 case $cross_compiling:$ac_tool_warned in
6036yes:)
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6038$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6039ac_tool_warned=yes ;;
6040esac
6041 AR=$ac_ct_AR
6042 fi
6043fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044
6045
6046# tweak ARFLAGS only if the user didn't set it on the command line
6047
6048if test -z "$ARFLAGS"
6049then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006050 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051fi
6052
doko@ubuntu.com58844492012-06-30 18:25:32 +02006053if test -n "$ac_tool_prefix"; then
6054 for ac_prog in readelf
6055 do
6056 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6057set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6059$as_echo_n "checking for $ac_word... " >&6; }
6060if ${ac_cv_prog_READELF+:} false; then :
6061 $as_echo_n "(cached) " >&6
6062else
6063 if test -n "$READELF"; then
6064 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6065else
6066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067for as_dir in $PATH
6068do
6069 IFS=$as_save_IFS
6070 test -z "$as_dir" && as_dir=.
6071 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006072 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006073 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6075 break 2
6076 fi
6077done
6078 done
6079IFS=$as_save_IFS
6080
6081fi
6082fi
6083READELF=$ac_cv_prog_READELF
6084if test -n "$READELF"; then
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6086$as_echo "$READELF" >&6; }
6087else
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6089$as_echo "no" >&6; }
6090fi
6091
6092
6093 test -n "$READELF" && break
6094 done
6095fi
6096if test -z "$READELF"; then
6097 ac_ct_READELF=$READELF
6098 for ac_prog in readelf
6099do
6100 # Extract the first word of "$ac_prog", so it can be a program name with args.
6101set dummy $ac_prog; ac_word=$2
6102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6103$as_echo_n "checking for $ac_word... " >&6; }
6104if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6105 $as_echo_n "(cached) " >&6
6106else
6107 if test -n "$ac_ct_READELF"; then
6108 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6109else
6110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6111for as_dir in $PATH
6112do
6113 IFS=$as_save_IFS
6114 test -z "$as_dir" && as_dir=.
6115 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006117 ac_cv_prog_ac_ct_READELF="$ac_prog"
6118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6119 break 2
6120 fi
6121done
6122 done
6123IFS=$as_save_IFS
6124
6125fi
6126fi
6127ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6128if test -n "$ac_ct_READELF"; then
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6130$as_echo "$ac_ct_READELF" >&6; }
6131else
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6133$as_echo "no" >&6; }
6134fi
6135
6136
6137 test -n "$ac_ct_READELF" && break
6138done
6139
6140 if test "x$ac_ct_READELF" = x; then
6141 READELF=":"
6142 else
6143 case $cross_compiling:$ac_tool_warned in
6144yes:)
6145{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6146$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6147ac_tool_warned=yes ;;
6148esac
6149 READELF=$ac_ct_READELF
6150 fi
6151fi
6152
6153if test "$cross_compiling" = yes; then
6154 case "$READELF" in
6155 readelf|:)
6156 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6157 ;;
6158 esac
6159fi
6160
6161
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006164hp*|HP*)
6165 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166 if test -z "$INSTALL"
6167 then
6168 INSTALL="${srcdir}/install-sh -c"
6169 fi
6170esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171# Find a good install program. We prefer a C program (faster),
6172# so one script is as good as another. But avoid the broken or
6173# incompatible versions:
6174# SysV /etc/install, /usr/sbin/install
6175# SunOS /usr/etc/install
6176# IRIX /sbin/install
6177# AIX /bin/install
6178# AmigaOS /C/install, which installs bootblocks on floppy discs
6179# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6180# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6181# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6182# OS/2's system install, which has a completely different semantic
6183# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006184# Reject install programs that cannot install multiple files.
6185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6186$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006188if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190else
6191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192for as_dir in $PATH
6193do
6194 IFS=$as_save_IFS
6195 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006196 # Account for people who put trailing slashes in PATH elements.
6197case $as_dir/ in #((
6198 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201 /usr/ucb/* ) ;;
6202 *)
6203 # OSF1 and SCO ODT 3.0 have their own names for install.
6204 # Don't use installbsd from OSF since it installs stuff as root
6205 # by default.
6206 for ac_prog in ginstall scoinst install; do
6207 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006208 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209 if test $ac_prog = install &&
6210 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6211 # AIX install. It has an incompatible calling convention.
6212 :
6213 elif test $ac_prog = install &&
6214 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6215 # program-specific install script used by HP pwplus--don't use.
6216 :
6217 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006218 rm -rf conftest.one conftest.two conftest.dir
6219 echo one > conftest.one
6220 echo two > conftest.two
6221 mkdir conftest.dir
6222 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6223 test -s conftest.one && test -s conftest.two &&
6224 test -s conftest.dir/conftest.one &&
6225 test -s conftest.dir/conftest.two
6226 then
6227 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6228 break 3
6229 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230 fi
6231 fi
6232 done
6233 done
6234 ;;
6235esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006236
6237 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238IFS=$as_save_IFS
6239
Matthias Kloseb9621712010-04-24 17:59:49 +00006240rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241
6242fi
6243 if test "${ac_cv_path_install+set}" = set; then
6244 INSTALL=$ac_cv_path_install
6245 else
6246 # As a last resort, use the slow shell script. Don't cache a
6247 # value for INSTALL within a source directory, because that will
6248 # break other packages using the cache if that directory is
6249 # removed, or if the value is a relative name.
6250 INSTALL=$ac_install_sh
6251 fi
6252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6254$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255
6256# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6257# It thinks the first close brace ends the variable substitution.
6258test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6259
6260test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6261
6262test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6263
Matthias Klose93a0ef12012-03-15 18:08:34 +01006264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6265$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6266if test -z "$MKDIR_P"; then
6267 if ${ac_cv_path_mkdir+:} false; then :
6268 $as_echo_n "(cached) " >&6
6269else
6270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6271for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6272do
6273 IFS=$as_save_IFS
6274 test -z "$as_dir" && as_dir=.
6275 for ac_prog in mkdir gmkdir; do
6276 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006277 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006278 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6279 'mkdir (GNU coreutils) '* | \
6280 'mkdir (coreutils) '* | \
6281 'mkdir (fileutils) '4.1*)
6282 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6283 break 3;;
6284 esac
6285 done
6286 done
6287 done
6288IFS=$as_save_IFS
6289
6290fi
6291
6292 test -d ./--version && rmdir ./--version
6293 if test "${ac_cv_path_mkdir+set}" = set; then
6294 MKDIR_P="$ac_cv_path_mkdir -p"
6295 else
6296 # As a last resort, use the slow shell script. Don't cache a
6297 # value for MKDIR_P within a source directory, because that will
6298 # break other packages using the cache if that directory is
6299 # removed, or if the value is a relative name.
6300 MKDIR_P="$ac_install_sh -d"
6301 fi
6302fi
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6304$as_echo "$MKDIR_P" >&6; }
6305
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306
6307# Not every filesystem supports hard links
6308
6309if test -z "$LN" ; then
6310 case $ac_sys_system in
6311 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312 *) LN=ln;;
6313 esac
6314fi
6315
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006316# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006317
6318ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6322$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323
6324# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006325if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326 withval=$with_pydebug;
6327if test "$withval" != no
6328then
6329
Matthias Kloseb9621712010-04-24 17:59:49 +00006330$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331
Matthias Kloseb9621712010-04-24 17:59:49 +00006332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6333$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006335 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006336else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338fi
6339else
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6341$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342fi
6343
6344
T. Woutersddbfa2c2017-05-23 01:30:49 +02006345# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6346# the ABI. This allows enabling assertions without changing the ABI.
6347assertions='false'
6348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6349$as_echo_n "checking for --with-assertions... " >&6; }
6350
6351# Check whether --with-assertions was given.
6352if test "${with_assertions+set}" = set; then :
6353 withval=$with_assertions;
6354if test "$withval" != no
6355then
6356 assertions='true'
6357fi
6358fi
6359
6360if test "$assertions" = 'true'; then
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6362$as_echo "yes" >&6; }
6363elif test "$Py_DEBUG" = 'true'; then
6364 assertions='true'
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6366$as_echo "implied by --with-pydebug" >&6; }
6367else
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }
6370fi
6371
Brett Cannon63d98bc2016-09-06 17:12:40 -07006372# Enable optimization flags
6373
6374
6375Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6377$as_echo_n "checking for --enable-optimizations... " >&6; }
6378# Check whether --enable-optimizations was given.
6379if test "${enable_optimizations+set}" = set; then :
6380 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006381if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006382then
6383 Py_OPT='true'
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6385$as_echo "yes" >&6; };
6386else
6387 Py_OPT='false'
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6389$as_echo "no" >&6; };
6390fi
6391else
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006397 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6398 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006399 # 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 +00006400 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006401 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006402 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006403 DEF_MAKE_RULE="build_all"
6404else
6405 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006406 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006407 DEF_MAKE_RULE="all"
6408fi
6409
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006410# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6412$as_echo_n "checking for --with-lto... " >&6; }
6413
6414# Check whether --with-lto was given.
6415if test "${with_lto+set}" = set; then :
6416 withval=$with_lto;
6417if test "$withval" != no
6418then
6419 Py_LTO='true'
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6421$as_echo "yes" >&6; };
6422else
6423 Py_LTO='false'
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425$as_echo "no" >&6; };
6426fi
6427else
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
6430fi
6431
6432if test "$Py_LTO" = 'true' ; then
6433 case $CC in
6434 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006435 case $ac_sys_system in
6436 Darwin*)
6437 # Any changes made here should be reflected in the GCC+Darwin case below
6438 LTOFLAGS="-flto -Wl,-export_dynamic"
6439 ;;
6440 *)
6441 LTOFLAGS="-flto"
6442 ;;
6443 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006444 ;;
6445 *gcc*)
6446 case $ac_sys_system in
6447 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006448 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006449 ;;
6450 *)
6451 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6452 ;;
6453 esac
6454 ;;
6455 esac
octaviansoldea4c814012017-09-08 12:14:33 -07006456 CFLAGS="$CFLAGS $LTOFLAGS"
6457 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006458fi
6459
Brett Cannon7188a3e2015-09-18 15:13:44 -07006460# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006461
6462
6463
6464
6465
Gregory P. Smith799520c2016-09-07 16:10:00 -07006466# Make this work on systems where llvm tools are not installed with their
6467# normal names in the default $PATH (ie: Ubuntu). They exist under the
6468# non-suffixed name in their versioned llvm directory.
6469llvm_bin_dir=''
6470llvm_path="${PATH}"
6471if test "${CC}" = "clang"
6472then
6473 clang_bin=`which clang`
6474 # Some systems install clang elsewhere as a symlink to the real path
6475 # which is where the related llvm tools are located.
6476 if test -L "${clang_bin}"
6477 then
6478 clang_dir=`dirname "${clang_bin}"`
6479 clang_bin=`readlink "${clang_bin}"`
6480 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6481 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6482 fi
6483fi
Zachary Ware5af85642015-12-21 12:09:17 -06006484
Gregory P. Smith799520c2016-09-07 16:10:00 -07006485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6486$as_echo_n "checking target system type... " >&6; }
6487if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006488 $as_echo_n "(cached) " >&6
6489else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006490 if test "x$target_alias" = x; then
6491 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006492else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006493 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6494 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6495fi
6496
6497fi
6498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6499$as_echo "$ac_cv_target" >&6; }
6500case $ac_cv_target in
6501*-*-*) ;;
6502*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6503esac
6504target=$ac_cv_target
6505ac_save_IFS=$IFS; IFS='-'
6506set x $ac_cv_target
6507shift
6508target_cpu=$1
6509target_vendor=$2
6510shift; shift
6511# Remember, the first character of IFS is used to create $*,
6512# except with old shells:
6513target_os=$*
6514IFS=$ac_save_IFS
6515case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6516
6517
6518# The aliases save the names the user supplied, while $host etc.
6519# will get canonicalized.
6520test -n "$target_alias" &&
6521 test "$program_prefix$program_suffix$program_transform_name" = \
6522 NONENONEs,x,x, &&
6523 program_prefix=${target_alias}-
6524# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6525set dummy $target_alias-llvm-profdata; ac_word=$2
6526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6527$as_echo_n "checking for $ac_word... " >&6; }
6528if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6529 $as_echo_n "(cached) " >&6
6530else
6531 case $LLVM_PROFDATA in
6532 [\\/]* | ?:[\\/]*)
6533 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6534 ;;
6535 *)
6536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6537for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006538do
6539 IFS=$as_save_IFS
6540 test -z "$as_dir" && as_dir=.
6541 for ac_exec_ext in '' $ac_executable_extensions; do
6542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006543 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6545 break 2
6546 fi
6547done
6548 done
6549IFS=$as_save_IFS
6550
Gregory P. Smith799520c2016-09-07 16:10:00 -07006551 ;;
6552esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006553fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006554LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6555if test -n "$LLVM_PROFDATA"; then
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6557$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006558else
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6560$as_echo "no" >&6; }
6561fi
6562
6563
Gregory P. Smith799520c2016-09-07 16:10:00 -07006564if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6565 if test "$build" = "$target"; then
6566 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6567 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6568set dummy llvm-profdata; ac_word=$2
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6570$as_echo_n "checking for $ac_word... " >&6; }
6571if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6572 $as_echo_n "(cached) " >&6
6573else
6574 case $ac_pt_LLVM_PROFDATA in
6575 [\\/]* | ?:[\\/]*)
6576 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6577 ;;
6578 *)
6579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6580for as_dir in ${llvm_path}
6581do
6582 IFS=$as_save_IFS
6583 test -z "$as_dir" && as_dir=.
6584 for ac_exec_ext in '' $ac_executable_extensions; do
6585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6586 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6588 break 2
6589 fi
6590done
6591 done
6592IFS=$as_save_IFS
6593
6594 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6595 ;;
6596esac
6597fi
6598ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6599if test -n "$ac_pt_LLVM_PROFDATA"; then
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6601$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6602else
6603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606
6607 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6608 else
6609 LLVM_PROFDATA="''"
6610 fi
6611else
6612 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6613fi
6614
6615
6616if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6617then
6618 LLVM_PROF_FOUND="found"
6619else
6620 LLVM_PROF_FOUND="not-found"
6621fi
6622if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6623then
6624 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6625 if test -n "${found_llvm_profdata}"
6626 then
6627 # llvm-profdata isn't directly in $PATH in some cases.
6628 # https://apple.stackexchange.com/questions/197053/
6629 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6630 LLVM_PROF_FOUND=found
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6632$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6633 fi
6634fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006635LLVM_PROF_ERR=no
6636case $CC in
6637 *clang*)
6638 # Any changes made here should be reflected in the GCC+Darwin case below
6639 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6640 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006641 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6643 if test $LLVM_PROF_FOUND = not-found
6644 then
6645 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 if test "${REQUIRE_PGO}" = "yes"
6647 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006648 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 -07006649 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006650 fi
6651 ;;
6652 *gcc*)
6653 case $ac_sys_system in
6654 Darwin*)
6655 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6656 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006657 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006658 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006659 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006660 then
6661 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 if test "${REQUIRE_PGO}" = "yes"
6663 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006664 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 -07006665 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006666 fi
6667 ;;
6668 *)
6669 PGO_PROF_GEN_FLAG="-fprofile-generate"
6670 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6671 LLVM_PROF_MERGER="true"
6672 LLVM_PROF_FILE=""
6673 ;;
6674 esac
6675 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006676 *icc*)
6677 PGO_PROF_GEN_FLAG="-prof-gen"
6678 PGO_PROF_USE_FLAG="-prof-use"
6679 LLVM_PROF_MERGER="true"
6680 LLVM_PROF_FILE=""
6681 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006682esac
6683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6685# merged with this chunk of code?
6686
6687# Optimizer/debugger flags
6688# ------------------------
6689# (The following bit of code is complicated enough - please keep things
6690# indented properly. Just pretend you're editing Python code. ;-)
6691
6692# There are two parallel sets of case statements below, one that checks to
6693# see if OPT was set and one that does BASECFLAGS setting based upon
6694# compiler and platform. BASECFLAGS tweaks need to be made even if the
6695# user set OPT.
6696
6697# tweak OPT based on compiler and platform, only if the user didn't set
6698# it on the command line
6699
Victor Stinner9ed34a82017-05-02 22:35:58 +02006700
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006701if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006702then
6703 case $GCC in
6704 yes)
6705 if test "$CC" != 'g++' ; then
6706 STRICT_PROTO="-Wstrict-prototypes"
6707 fi
6708 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6709 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6710 WRAP="-fwrapv"
6711 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006712
Stefan Krahaf04ff22011-12-08 22:20:31 +01006713 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006714 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006715 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006716 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006717 *)
6718 if $CC --version 2>&1 | grep -q clang
6719 then
6720 cc_is_clang=1
6721 else
6722 cc_is_clang=
6723 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006724 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006725
Victor Stinner35f3d242017-04-21 12:35:24 +02006726 if test -n "${cc_is_clang}"
6727 then
6728 # Clang also needs -fwrapv
6729 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006730 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6731 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006732 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006733 fi
6734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735 case $ac_cv_prog_cc_g in
6736 yes)
6737 if test "$Py_DEBUG" = 'true' ; then
6738 # Optimization messes up debuggers, so turn it off for
6739 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006740 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006741 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006742 else
Victor Stinner28205b22017-04-21 11:24:34 +02006743 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006744 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745 else
Victor Stinner28205b22017-04-21 11:24:34 +02006746 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747 fi
6748 ;;
6749 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006750 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751 ;;
6752 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006753
Victor Stinner826f83f2017-04-28 15:07:10 +02006754 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756 case $ac_sys_system in
6757 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6758 ;;
6759 esac
6760 ;;
6761
6762 *)
6763 OPT="-O"
6764 ;;
6765 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766fi
6767
6768
6769
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006770
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006771# The -arch flags for universal builds on OSX
6772UNIVERSAL_ARCH_FLAGS=
6773
6774
6775# tweak BASECFLAGS based on compiler and platform
6776case $GCC in
6777yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006778 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006779
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6781$as_echo_n "checking for -Wextra... " >&6; }
6782 ac_save_cc="$CC"
6783 CC="$CC -Wextra -Werror"
6784 if ${ac_cv_extra_warnings+:} false; then :
6785 $as_echo_n "(cached) " >&6
6786else
6787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6788/* end confdefs.h. */
6789
6790
6791int
6792main ()
6793{
6794
6795 ;
6796 return 0;
6797}
6798
6799_ACEOF
6800if ac_fn_c_try_compile "$LINENO"; then :
6801
6802 ac_cv_extra_warnings=yes
6803
6804else
6805
6806 ac_cv_extra_warnings=no
6807
6808fi
6809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6810fi
6811
6812 CC="$ac_save_cc"
6813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6814$as_echo "$ac_cv_extra_warnings" >&6; }
6815
6816 if test $ac_cv_extra_warnings = yes
6817 then
6818 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6819 fi
6820
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006821 # Python doesn't violate C99 aliasing rules, but older versions of
6822 # GCC produce warnings for legal Python code. Enable
6823 # -fno-strict-aliasing on versions of GCC that support but produce
6824 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6826$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827 ac_save_cc="$CC"
6828 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006829 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006830 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006835
Matthias Kloseb159a552010-04-25 21:00:44 +00006836
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006837int
6838main ()
6839{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006840
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006841 ;
6842 return 0;
6843}
Matthias Kloseb159a552010-04-25 21:00:44 +00006844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006846if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006847
6848 CC="$ac_save_cc -fstrict-aliasing"
6849 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006851/* end confdefs.h. */
6852
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006853 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006854int
6855main ()
6856{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006857double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006858 ;
6859 return 0;
6860}
Matthias Kloseb159a552010-04-25 21:00:44 +00006861
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006863if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006864
6865 ac_cv_no_strict_aliasing=no
6866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867else
Matthias Kloseb159a552010-04-25 21:00:44 +00006868
6869 ac_cv_no_strict_aliasing=yes
6870
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006871fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006873
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006874else
Matthias Kloseb159a552010-04-25 21:00:44 +00006875
6876 ac_cv_no_strict_aliasing=no
6877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006880fi
6881
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006882 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006883 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6885$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006886 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 then
6888 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6889 fi
6890
Zachary Ware5af85642015-12-21 12:09:17 -06006891 # ICC doesn't recognize the option, but only emits a warning
6892 ## XXX does it emit an unused result warning and can it be disabled?
6893 case "$CC" in
6894 *icc*)
6895 ac_cv_disable_unused_result_warning=no
6896 ;;
6897 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6899$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6900 ac_save_cc="$CC"
6901 CC="$CC -Wunused-result -Werror"
6902 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006903 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006904 $as_echo_n "(cached) " >&6
6905else
6906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6907/* end confdefs.h. */
6908
6909
6910int
6911main ()
6912{
6913
6914 ;
6915 return 0;
6916}
6917
6918_ACEOF
6919if ac_fn_c_try_compile "$LINENO"; then :
6920
6921 ac_cv_disable_unused_result_warning=yes
6922
6923else
6924
6925 ac_cv_disable_unused_result_warning=no
6926
6927fi
6928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6929fi
6930
6931 CFLAGS="$save_CFLAGS"
6932 CC="$ac_save_cc"
6933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6934$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006935 ;;
6936 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006937
6938 if test $ac_cv_disable_unused_result_warning = yes
6939 then
6940 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006941 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6942 fi
6943
6944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6945$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6946 ac_save_cc="$CC"
6947 CC="$CC -Wunused-parameter -Werror"
6948 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6949 $as_echo_n "(cached) " >&6
6950else
6951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6952/* end confdefs.h. */
6953
6954
6955int
6956main ()
6957{
6958
6959 ;
6960 return 0;
6961}
6962
6963_ACEOF
6964if ac_fn_c_try_compile "$LINENO"; then :
6965
6966 ac_cv_disable_unused_parameter_warning=yes
6967
6968else
6969
6970 ac_cv_disable_unused_parameter_warning=no
6971
6972fi
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6974fi
6975
6976 CC="$ac_save_cc"
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6978$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6979
6980 if test $ac_cv_disable_unused_parameter_warning = yes
6981 then
6982 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6983 fi
6984
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6986$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6987 ac_save_cc="$CC"
6988 CC="$CC -Wmissing-field-initializers -Werror"
6989 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6990 $as_echo_n "(cached) " >&6
6991else
6992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6993/* end confdefs.h. */
6994
6995
6996int
6997main ()
6998{
6999
7000 ;
7001 return 0;
7002}
7003
7004_ACEOF
7005if ac_fn_c_try_compile "$LINENO"; then :
7006
7007 ac_cv_disable_missing_field_initializers=yes
7008
7009else
7010
7011 ac_cv_disable_missing_field_initializers=no
7012
7013fi
7014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7015fi
7016
7017 CC="$ac_save_cc"
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7019$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7020
7021 if test $ac_cv_disable_missing_field_initializers = yes
7022 then
7023 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007024 fi
7025
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7027$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7028 ac_save_cc="$CC"
7029 CC="$CC -Wsign-compare"
7030 save_CFLAGS="$CFLAGS"
7031 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7032 $as_echo_n "(cached) " >&6
7033else
7034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7035/* end confdefs.h. */
7036
7037
7038int
7039main ()
7040{
7041
7042 ;
7043 return 0;
7044}
7045
7046_ACEOF
7047if ac_fn_c_try_compile "$LINENO"; then :
7048
7049 ac_cv_enable_sign_compare_warning=yes
7050
7051else
7052
7053 ac_cv_enable_sign_compare_warning=no
7054
7055fi
7056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7057fi
7058
7059 CFLAGS="$save_CFLAGS"
7060 CC="$ac_save_cc"
7061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7062$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7063
7064 if test $ac_cv_enable_sign_compare_warning = yes
7065 then
7066 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7067 fi
7068
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7070$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7071 ac_save_cc="$CC"
7072 CC="$CC -Wunreachable-code"
7073 save_CFLAGS="$CFLAGS"
7074 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7075 $as_echo_n "(cached) " >&6
7076else
7077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078/* end confdefs.h. */
7079
7080
7081int
7082main ()
7083{
7084
7085 ;
7086 return 0;
7087}
7088
7089_ACEOF
7090if ac_fn_c_try_compile "$LINENO"; then :
7091
7092 ac_cv_enable_unreachable_code_warning=yes
7093
7094else
7095
7096 ac_cv_enable_unreachable_code_warning=no
7097
7098fi
7099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7100fi
7101
7102 CFLAGS="$save_CFLAGS"
7103 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007104
7105 # Don't enable unreachable code warning in debug mode, since it usually
7106 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007107 # Issue #24324: Unfortunately, the unreachable code warning does not work
7108 # correctly on gcc and has been silently removed from the compiler.
7109 # It is supported on clang but on OS X systems gcc may be an alias
7110 # for clang. Try to determine if the compiler is not really gcc and,
7111 # if so, only then enable the warning.
7112 if test $ac_cv_enable_unreachable_code_warning = yes && \
7113 test "$Py_DEBUG" != "true" && \
7114 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007115 then
7116 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007117 else
7118 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007119 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7121$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007122
Victor Stinner193ee0a2017-02-06 14:24:00 +01007123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7124$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7125 ac_save_cc="$CC"
7126 CC="$CC -Werror=implicit-function-declaration"
7127 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7128 $as_echo_n "(cached) " >&6
7129else
7130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7131/* end confdefs.h. */
7132
7133
7134int
7135main ()
7136{
7137
7138 ;
7139 return 0;
7140}
7141
7142_ACEOF
7143if ac_fn_c_try_compile "$LINENO"; then :
7144
7145 ac_cv_enable_implicit_function_declaration_error=yes
7146
7147else
7148
7149 ac_cv_enable_implicit_function_declaration_error=no
7150
7151fi
7152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7153fi
7154
7155 CC="$ac_save_cc"
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7157$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7158
7159 if test $ac_cv_enable_implicit_function_declaration_error = yes
7160 then
7161 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7162 fi
7163
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007164 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7165 # support. Without this, treatment of subnormals doesn't follow
7166 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007167 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007168 alpha*)
7169 BASECFLAGS="$BASECFLAGS -mieee"
7170 ;;
7171 esac
7172
7173 case $ac_sys_system in
7174 SCO_SV*)
7175 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7176 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007177
7178 # is there any other compiler on Darwin besides gcc?
7179 Darwin*)
7180 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7181 # used to be here, but non-Apple gcc doesn't accept them.
7182 if test "${CC}" = gcc
7183 then
7184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007185$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007186 case "${UNIVERSALSDK}" in
7187 */MacOSX10.4u.sdk)
7188 # Build using 10.4 SDK, force usage of gcc when the
7189 # compiler is gcc, otherwise the user will get very
7190 # confusing error messages when building on OSX 10.6
7191 CC=gcc-4.0
7192 CPP=cpp-4.0
7193 ;;
7194 esac
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007196$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007197 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198
Ned Deily87adb6e2013-10-18 21:09:56 -07007199 if test "${enable_universalsdk}"
7200 then
7201 case "$UNIVERSAL_ARCHS" in
7202 32-bit)
7203 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7204 LIPO_32BIT_FLAGS=""
7205 ARCH_RUN_32BIT=""
7206 ;;
7207 64-bit)
7208 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7209 LIPO_32BIT_FLAGS=""
7210 ARCH_RUN_32BIT="true"
7211 ;;
7212 all)
7213 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7214 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7215 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7216 ;;
7217 intel)
7218 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7219 LIPO_32BIT_FLAGS="-extract i386"
7220 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7221 ;;
7222 intel-32)
7223 UNIVERSAL_ARCH_FLAGS="-arch i386"
7224 LIPO_32BIT_FLAGS=""
7225 ARCH_RUN_32BIT=""
7226 ;;
7227 3-way)
7228 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7229 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7230 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7231 ;;
7232 *)
7233 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7234 ;;
7235 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007236
Ned Deily87adb6e2013-10-18 21:09:56 -07007237 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7238 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7239 if test "${UNIVERSALSDK}" != "/"
7240 then
7241 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7242 fi
7243 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007244
Ned Deily87adb6e2013-10-18 21:09:56 -07007245 # Calculate an appropriate deployment target for this build:
7246 # The deployment target value is used explicitly to enable certain
7247 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007248 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007249 # component of the string returned by distutils.get_platform().
7250 #
7251 # Use the value from:
7252 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7253 # 2. the operating system version of the build machine if >= 10.6
7254 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7255 # below to pick either 10.3, 10.4, or 10.5 as the target.
7256 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257
Ned Deily87adb6e2013-10-18 21:09:56 -07007258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7259$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007260 cur_target_major=`sw_vers -productVersion | \
7261 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7262 cur_target_minor=`sw_vers -productVersion | \
7263 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7264 cur_target="${cur_target_major}.${cur_target_minor}"
7265 if test ${cur_target_major} -eq 10 && \
7266 test ${cur_target_minor} -ge 3 && \
7267 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007268 then
Ned Deily36820b62014-06-25 13:44:22 -07007269 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007270 cur_target=10.3
7271 if test ${enable_universalsdk}
7272 then
7273 case "$UNIVERSAL_ARCHS" in
7274 all|3-way|intel|64-bit)
7275 # These configurations were first supported in 10.5
7276 cur_target='10.5'
7277 ;;
7278 esac
7279 else
7280 if test `/usr/bin/arch` = "i386"
7281 then
7282 # 10.4 was the first release to support Intel archs
7283 cur_target="10.4"
7284 fi
7285 fi
7286 fi
7287 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007288
Ned Deily87adb6e2013-10-18 21:09:56 -07007289 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7290 # environment with a value that is the same as what we'll use
7291 # in the Makefile to ensure that we'll get the same compiler
7292 # environment during configure and build time.
7293 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7294 export MACOSX_DEPLOYMENT_TARGET
7295 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7297$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007298
Ned Deily87adb6e2013-10-18 21:09:56 -07007299 # end of Darwin* tests
7300 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007301 esac
7302 ;;
7303
7304*)
7305 case $ac_sys_system in
7306 OpenUNIX*|UnixWare*)
7307 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7308 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007309 SCO_SV*)
7310 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7311 ;;
7312 esac
7313 ;;
7314esac
7315
Zachary Ware5af85642015-12-21 12:09:17 -06007316# ICC needs -fp-model strict or floats behave badly
7317case "$CC" in
7318*icc*)
7319 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7320 ;;
7321esac
7322
T. Woutersddbfa2c2017-05-23 01:30:49 +02007323if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324 :
7325else
7326 OPT="-DNDEBUG $OPT"
7327fi
7328
7329if test "$ac_arch_flags"
7330then
7331 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7332fi
7333
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334# On some compilers, pthreads are available without further options
7335# (e.g. MacOS X). On some of these systems, the compiler will not
7336# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7337# So we have to see first whether pthreads are available without
7338# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7340$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007341if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343else
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345 ac_cv_pthread_is_default=no
7346else
Matthias Kloseb9621712010-04-24 17:59:49 +00007347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348/* end confdefs.h. */
7349
Stefan Krah7dba5942012-11-22 22:49:11 +01007350#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351#include <pthread.h>
7352
7353void* routine(void* p){return NULL;}
7354
7355int main(){
7356 pthread_t p;
7357 if(pthread_create(&p,NULL,routine,NULL)!=0)
7358 return 1;
7359 (void)pthread_detach(p);
7360 return 0;
7361}
7362
7363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007364if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365
7366 ac_cv_pthread_is_default=yes
7367 ac_cv_kthread=no
7368 ac_cv_pthread=no
7369
7370else
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375fi
7376
7377
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378fi
7379
Matthias Kloseb9621712010-04-24 17:59:49 +00007380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7381$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007382
7383
7384if test $ac_cv_pthread_is_default = yes
7385then
7386 ac_cv_kpthread=no
7387else
7388# -Kpthread, if available, provides the right #defines
7389# and linker options to make pthread_create available
7390# Some compilers won't report that they do not support -Kpthread,
7391# so we need to run a program to see whether it really made the
7392# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7394$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007395if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397else
7398 ac_save_cc="$CC"
7399CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007400if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401 ac_cv_kpthread=no
7402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404/* end confdefs.h. */
7405
Stefan Krah7dba5942012-11-22 22:49:11 +01007406#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407#include <pthread.h>
7408
7409void* routine(void* p){return NULL;}
7410
7411int main(){
7412 pthread_t p;
7413 if(pthread_create(&p,NULL,routine,NULL)!=0)
7414 return 1;
7415 (void)pthread_detach(p);
7416 return 0;
7417}
7418
7419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007420if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421 ac_cv_kpthread=yes
7422else
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7426 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427fi
7428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429CC="$ac_save_cc"
7430fi
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7433$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434fi
7435
7436if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7437then
7438# -Kthread, if available, provides the right #defines
7439# and linker options to make pthread_create available
7440# Some compilers won't report that they do not support -Kthread,
7441# so we need to run a program to see whether it really made the
7442# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7444$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007445if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447else
7448 ac_save_cc="$CC"
7449CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007450if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451 ac_cv_kthread=no
7452else
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454/* end confdefs.h. */
7455
Stefan Krah7dba5942012-11-22 22:49:11 +01007456#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457#include <pthread.h>
7458
7459void* routine(void* p){return NULL;}
7460
7461int main(){
7462 pthread_t p;
7463 if(pthread_create(&p,NULL,routine,NULL)!=0)
7464 return 1;
7465 (void)pthread_detach(p);
7466 return 0;
7467}
7468
7469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007470if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471 ac_cv_kthread=yes
7472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477fi
7478
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479CC="$ac_save_cc"
7480fi
7481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7483$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484fi
7485
7486if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7487then
7488# -pthread, if available, provides the right #defines
7489# and linker options to make pthread_create available
7490# Some compilers won't report that they do not support -pthread,
7491# so we need to run a program to see whether it really made the
7492# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7494$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007495if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497else
7498 ac_save_cc="$CC"
7499CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007500if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501 ac_cv_pthread=no
7502else
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504/* end confdefs.h. */
7505
Stefan Krah7dba5942012-11-22 22:49:11 +01007506#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507#include <pthread.h>
7508
7509void* routine(void* p){return NULL;}
7510
7511int main(){
7512 pthread_t p;
7513 if(pthread_create(&p,NULL,routine,NULL)!=0)
7514 return 1;
7515 (void)pthread_detach(p);
7516 return 0;
7517}
7518
7519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007520if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521 ac_cv_pthread=yes
7522else
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7526 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527fi
7528
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529CC="$ac_save_cc"
7530fi
7531
Matthias Kloseb9621712010-04-24 17:59:49 +00007532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7533$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534fi
7535
7536# If we have set a CC compiler flag for thread support then
7537# check if it works for CXX, too.
7538ac_cv_cxx_thread=no
7539if test ! -z "$CXX"
7540then
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7542$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543ac_save_cxx="$CXX"
7544
7545if test "$ac_cv_kpthread" = "yes"
7546then
7547 CXX="$CXX -Kpthread"
7548 ac_cv_cxx_thread=yes
7549elif test "$ac_cv_kthread" = "yes"
7550then
7551 CXX="$CXX -Kthread"
7552 ac_cv_cxx_thread=yes
7553elif test "$ac_cv_pthread" = "yes"
7554then
7555 CXX="$CXX -pthread"
7556 ac_cv_cxx_thread=yes
7557fi
7558
7559if test $ac_cv_cxx_thread = yes
7560then
7561 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7562 $CXX -c conftest.$ac_ext 2>&5
7563 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7564 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7565 then
7566 ac_cv_cxx_thread=yes
7567 else
7568 ac_cv_cxx_thread=no
7569 fi
7570 rm -fr conftest*
7571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7573$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007574fi
7575CXX="$ac_save_cxx"
7576
7577
7578# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7580$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007581if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007582 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585/* end confdefs.h. */
7586#include <stdlib.h>
7587#include <stdarg.h>
7588#include <string.h>
7589#include <float.h>
7590
7591int
7592main ()
7593{
7594
7595 ;
7596 return 0;
7597}
7598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007599if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007600 ac_cv_header_stdc=yes
7601else
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7605
7606if test $ac_cv_header_stdc = yes; then
7607 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609/* end confdefs.h. */
7610#include <string.h>
7611
7612_ACEOF
7613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 $EGREP "memchr" >/dev/null 2>&1; then :
7615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616else
7617 ac_cv_header_stdc=no
7618fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007619rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007620
7621fi
7622
7623if test $ac_cv_header_stdc = yes; then
7624 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626/* end confdefs.h. */
7627#include <stdlib.h>
7628
7629_ACEOF
7630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 $EGREP "free" >/dev/null 2>&1; then :
7632
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633else
7634 ac_cv_header_stdc=no
7635fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007636rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637
7638fi
7639
7640if test $ac_cv_header_stdc = yes; then
7641 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007642 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643 :
7644else
Matthias Kloseb9621712010-04-24 17:59:49 +00007645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646/* end confdefs.h. */
7647#include <ctype.h>
7648#include <stdlib.h>
7649#if ((' ' & 0x0FF) == 0x020)
7650# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7651# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7652#else
7653# define ISLOWER(c) \
7654 (('a' <= (c) && (c) <= 'i') \
7655 || ('j' <= (c) && (c) <= 'r') \
7656 || ('s' <= (c) && (c) <= 'z'))
7657# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7658#endif
7659
7660#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7661int
7662main ()
7663{
7664 int i;
7665 for (i = 0; i < 256; i++)
7666 if (XOR (islower (i), ISLOWER (i))
7667 || toupper (i) != TOUPPER (i))
7668 return 2;
7669 return 0;
7670}
7671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007672if ac_fn_c_try_run "$LINENO"; then :
7673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007674else
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7678 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679fi
7680
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681fi
7682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7684$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685if test $ac_cv_header_stdc = yes; then
7686
Matthias Kloseb9621712010-04-24 17:59:49 +00007687$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688
7689fi
7690
stratakise768c862018-01-23 16:11:24 +01007691for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007692fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007693ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007694sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007695unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007696poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007697sys/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 +01007698sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007699sys/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 +01007700sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007701sys/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 -07007702libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007703linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007704sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007705do :
7706 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7707ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007708if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007710#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007711_ACEOF
7712
7713fi
7714
Guido van Rossum627b2d71993-12-24 10:39:16 +00007715done
7716
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007717ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007718for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7721$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007722if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007726/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007727#include <sys/types.h>
7728#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730int
7731main ()
7732{
7733if ((DIR *) 0)
7734return 0;
7735 ;
7736 return 0;
7737}
7738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007740 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007741else
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007746eval ac_res=\$$as_ac_Header
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7748$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007751#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007752_ACEOF
7753
7754ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007756
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007757done
7758# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7759if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7761$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007762if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764else
Martin v. Löwis11437992002-04-12 09:54:03 +00007765 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769/* Override any GCC internal prototype to avoid an error.
7770 Use char because int might match the return type of a GCC
7771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007772#ifdef __cplusplus
7773extern "C"
7774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007775char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007776int
7777main ()
7778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007780 ;
7781 return 0;
7782}
7783_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784for ac_lib in '' dir; do
7785 if test -z "$ac_lib"; then
7786 ac_res="none required"
7787 else
7788 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007789 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794rm -f core conftest.err conftest.$ac_objext \
7795 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007796 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799done
Victor Stinnere0be4232011-10-25 13:06:09 +02007800if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802else
7803 ac_cv_search_opendir=no
7804fi
7805rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007806LIBS=$ac_func_search_save_LIBS
7807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7809$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007811if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007815
Michael W. Hudson54241132001-12-07 15:38:26 +00007816else
Matthias Kloseb9621712010-04-24 17:59:49 +00007817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7818$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007821else
7822 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007826/* Override any GCC internal prototype to avoid an error.
7827 Use char because int might match the return type of a GCC
7828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007829#ifdef __cplusplus
7830extern "C"
7831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007832char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007833int
7834main ()
7835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 ;
7838 return 0;
7839}
7840_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841for ac_lib in '' x; do
7842 if test -z "$ac_lib"; then
7843 ac_res="none required"
7844 else
7845 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851rm -f core conftest.err conftest.$ac_objext \
7852 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007853 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007856done
Victor Stinnere0be4232011-10-25 13:06:09 +02007857if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859else
7860 ac_cv_search_opendir=no
7861fi
7862rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007863LIBS=$ac_func_search_save_LIBS
7864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7866$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007868if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871fi
7872
7873fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007874
Matthias Kloseb9621712010-04-24 17:59:49 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7876$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007877if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007879else
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007881/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007882#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007883int
7884main ()
7885{
7886return makedev(0, 0);
7887 ;
7888 return 0;
7889}
7890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007892 ac_cv_header_sys_types_h_makedev=yes
7893else
Matthias Kloseb9621712010-04-24 17:59:49 +00007894 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007898
7899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7901$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007902
7903if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007904ac_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 +02007905if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007908
7909fi
7910
7911
7912
7913 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 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 +02007915if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007916
Matthias Kloseb9621712010-04-24 17:59:49 +00007917$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007918
7919fi
7920
7921
7922 fi
7923fi
7924
Michael W. Hudson54241132001-12-07 15:38:26 +00007925
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007926# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7927# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7928SAVE_CFLAGS=$CFLAGS
7929CFLAGS="-std=c99 $CFLAGS"
7930for ac_header in bluetooth/bluetooth.h
7931do :
7932 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7933if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7934 cat >>confdefs.h <<_ACEOF
7935#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7936_ACEOF
7937
7938fi
7939
7940done
7941
7942CFLAGS=$SAVE_CFLAGS
7943
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007944# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7945for ac_header in net/if.h
7946do :
7947 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7948#ifdef STDC_HEADERS
7949# include <stdlib.h>
7950# include <stddef.h>
7951#else
7952# ifdef HAVE_STDLIB_H
7953# include <stdlib.h>
7954# endif
7955#endif
7956#ifdef HAVE_SYS_SOCKET_H
7957# include <sys/socket.h>
7958#endif
7959
7960"
Victor Stinnere0be4232011-10-25 13:06:09 +02007961if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007962 cat >>confdefs.h <<_ACEOF
7963#define HAVE_NET_IF_H 1
7964_ACEOF
7965
7966fi
7967
7968done
7969
7970
Martin v. Löwis11017b12006-01-14 18:12:57 +00007971# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007972for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007973do :
7974 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 +00007975#ifdef HAVE_ASM_TYPES_H
7976#include <asm/types.h>
7977#endif
7978#ifdef HAVE_SYS_SOCKET_H
7979#include <sys/socket.h>
7980#endif
7981
Matthias Kloseb9621712010-04-24 17:59:49 +00007982"
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007984 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007985#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007986_ACEOF
7987
7988fi
7989
7990done
7991
7992
caaveryeffc12f2017-09-06 18:18:10 -04007993for ac_header in linux/vm_sockets.h
7994do :
7995 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
7996#ifdef HAVE_SYS_SOCKET_H
7997#include <sys/socket.h>
7998#endif
7999
8000"
8001if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8002 cat >>confdefs.h <<_ACEOF
8003#define HAVE_LINUX_VM_SOCKETS_H 1
8004_ACEOF
8005
8006fi
8007
8008done
8009
8010
Charles-François Natali47413c12011-10-06 19:47:44 +02008011# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008012for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008013do :
8014 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8015ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8016#ifdef HAVE_SYS_SOCKET_H
8017#include <sys/socket.h>
8018#endif
8019
8020"
8021if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8022 cat >>confdefs.h <<_ACEOF
8023#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8024_ACEOF
8025
8026fi
8027
8028done
8029
8030
Guido van Rossum627b2d71993-12-24 10:39:16 +00008031# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008032was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8034$as_echo_n "checking for clock_t in time.h... " >&6; }
8035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008036/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008037#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
8039_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008042 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008043else
Martin v. Löwis11437992002-04-12 09:54:03 +00008044
8045
Matthias Kloseb9621712010-04-24 17:59:49 +00008046$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008047
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008048
Guido van Rossum627b2d71993-12-24 10:39:16 +00008049fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008050rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008051
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8053$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008054
Matthias Kloseb9621712010-04-24 17:59:49 +00008055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8056$as_echo_n "checking for makedev... " >&6; }
8057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008058/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008059
Jesus Cea740f53a2010-04-28 11:35:30 +00008060#if defined(MAJOR_IN_MKDEV)
8061#include <sys/mkdev.h>
8062#elif defined(MAJOR_IN_SYSMACROS)
8063#include <sys/sysmacros.h>
8064#else
8065#include <sys/types.h>
8066#endif
8067
Neal Norwitz11690112002-07-30 01:08:28 +00008068int
8069main ()
8070{
Jesus Cea740f53a2010-04-28 11:35:30 +00008071
8072 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008073 ;
8074 return 0;
8075}
Matthias Kloseb159a552010-04-25 21:00:44 +00008076
Neal Norwitz11690112002-07-30 01:08:28 +00008077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008078if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008079 ac_cv_has_makedev=yes
8080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083rm -f core conftest.err conftest.$ac_objext \
8084 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8086$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008087if test "$ac_cv_has_makedev" = "yes"; then
8088
Matthias Kloseb9621712010-04-24 17:59:49 +00008089$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008090
8091fi
8092
Christian Heimes985ecdc2013-11-20 11:46:18 +01008093# byte swapping
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8095$as_echo_n "checking for le64toh... " >&6; }
8096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8097/* end confdefs.h. */
8098
8099#ifdef HAVE_ENDIAN_H
8100#include <endian.h>
8101#elif defined(HAVE_SYS_ENDIAN_H)
8102#include <sys/endian.h>
8103#endif
8104
8105int
8106main ()
8107{
8108
8109 le64toh(1)
8110 ;
8111 return 0;
8112}
8113
8114_ACEOF
8115if ac_fn_c_try_link "$LINENO"; then :
8116 ac_cv_has_le64toh=yes
8117else
8118 ac_cv_has_le64toh=no
8119fi
8120rm -f core conftest.err conftest.$ac_objext \
8121 conftest$ac_exeext conftest.$ac_ext
8122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8123$as_echo "$ac_cv_has_le64toh" >&6; }
8124if test "$ac_cv_has_le64toh" = "yes"; then
8125
8126$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8127
8128fi
8129
Martin v. Löwis399a6892002-10-04 10:22:02 +00008130use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008131# Don't use largefile support for GNU/Hurd
8132case $ac_sys_system in GNU*)
8133 use_lfs=no
8134esac
8135
Martin v. Löwis399a6892002-10-04 10:22:02 +00008136if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008137# Two defines needed to enable largefile support on various platforms
8138# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008139case $ac_sys_system/$ac_sys_release in
8140AIX*)
8141
8142$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8143
8144 ;;
8145esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008146
Matthias Kloseb9621712010-04-24 17:59:49 +00008147$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008148
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008151
Martin v. Löwis399a6892002-10-04 10:22:02 +00008152fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008153
Guido van Rossum84e7b241996-08-19 21:59:00 +00008154# Add some code to confdefs.h so that the test for off_t works on SCO
8155cat >> confdefs.h <<\EOF
8156#if defined(SCO_DS)
8157#undef _OFF_T
8158#endif
8159EOF
8160
Guido van Rossumef2255b2000-03-10 22:30:29 +00008161# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008162ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008163if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008165else
Martin v. Löwis11437992002-04-12 09:54:03 +00008166
8167cat >>confdefs.h <<_ACEOF
8168#define mode_t int
8169_ACEOF
8170
8171fi
8172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008174if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008176else
Martin v. Löwis11437992002-04-12 09:54:03 +00008177
8178cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008180_ACEOF
8181
8182fi
8183
Matthias Kloseb9621712010-04-24 17:59:49 +00008184ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008185if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008187else
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
8189cat >>confdefs.h <<_ACEOF
8190#define pid_t int
8191_ACEOF
8192
8193fi
8194
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008197#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008198_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008199
Matthias Kloseb9621712010-04-24 17:59:49 +00008200ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008201if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008202
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008203else
Martin v. Löwis11437992002-04-12 09:54:03 +00008204
8205cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008207_ACEOF
8208
8209fi
8210
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8212$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008213if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008215else
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008218#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008219
8220_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223 ac_cv_type_uid_t=yes
8224else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008225 ac_cv_type_uid_t=no
8226fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008227rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8231$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008232if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008233
Matthias Kloseb9621712010-04-24 17:59:49 +00008234$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008235
8236
Matthias Kloseb9621712010-04-24 17:59:49 +00008237$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008238
8239fi
8240
Mark Dickinson983bc162012-12-02 12:11:38 +00008241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244
Matthias Kloseb9621712010-04-24 17:59:49 +00008245$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008246
8247fi
8248
Stefan Krah1919b7e2012-03-21 18:25:23 +01008249ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8250if test "x$ac_cv_type___uint128_t" = xyes; then :
8251
8252$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8253
8254fi
8255
Jack Jansendd19cf82001-12-06 22:36:17 +00008256
Michael W. Hudson54241132001-12-07 15:38:26 +00008257# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008258# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259# The cast to long int works around a bug in the HP C Compiler
8260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8262# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8264$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008265if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008267else
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 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 +00008269
Martin v. Löwis11437992002-04-12 09:54:03 +00008270else
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 if test "$ac_cv_type_int" = yes; then
8272 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8273$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008274as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008275See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276 else
8277 ac_cv_sizeof_int=0
8278 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280
Martin v. Löwis11437992002-04-12 09:54:03 +00008281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8283$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284
8285
8286
Martin v. Löwis11437992002-04-12 09:54:03 +00008287cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008288#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008289_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008290
8291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292# The cast to long int works around a bug in the HP C Compiler
8293# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8294# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8295# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8297$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008298if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008300else
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 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 +00008302
Martin v. Löwis11437992002-04-12 09:54:03 +00008303else
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 if test "$ac_cv_type_long" = yes; then
8305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008307as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008308See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309 else
8310 ac_cv_sizeof_long=0
8311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8316$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008317
8318
8319
Martin v. Löwis11437992002-04-12 09:54:03 +00008320cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008322_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008323
8324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325# The cast to long int works around a bug in the HP C Compiler
8326# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8327# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8328# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8330$as_echo_n "checking size of long long... " >&6; }
8331if ${ac_cv_sizeof_long_long+:} false; then :
8332 $as_echo_n "(cached) " >&6
8333else
8334 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8335
8336else
8337 if test "$ac_cv_type_long_long" = yes; then
8338 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8339$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8340as_fn_error 77 "cannot compute sizeof (long long)
8341See \`config.log' for more details" "$LINENO" 5; }
8342 else
8343 ac_cv_sizeof_long_long=0
8344 fi
8345fi
8346
8347fi
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8349$as_echo "$ac_cv_sizeof_long_long" >&6; }
8350
8351
8352
8353cat >>confdefs.h <<_ACEOF
8354#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8355_ACEOF
8356
8357
8358# The cast to long int works around a bug in the HP C Compiler
8359# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8360# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8361# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8363$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008364if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 if test "$ac_cv_type_void_p" = yes; then
8371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008373as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008374See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375 else
8376 ac_cv_sizeof_void_p=0
8377 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8382$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383
8384
8385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008387#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008388_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008389
8390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8396$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008401
Martin v. Löwis11437992002-04-12 09:54:03 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 if test "$ac_cv_type_short" = yes; then
8404 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8405$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008406as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008407See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408 else
8409 ac_cv_sizeof_short=0
8410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8415$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008416
8417
8418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008420#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008421_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008422
8423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424# The cast to long int works around a bug in the HP C Compiler
8425# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8426# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8427# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8429$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008430if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 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 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435else
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 if test "$ac_cv_type_float" = yes; then
8437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008439as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008440See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441 else
8442 ac_cv_sizeof_float=0
8443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8448$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449
8450
8451
Martin v. Löwis11437992002-04-12 09:54:03 +00008452cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008453#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008454_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008455
8456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457# The cast to long int works around a bug in the HP C Compiler
8458# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8459# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8460# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8462$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008463if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008465else
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468else
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 if test "$ac_cv_type_double" = yes; then
8470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008472as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008473See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 else
8475 ac_cv_sizeof_double=0
8476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8481$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482
8483
8484
Martin v. Löwis11437992002-04-12 09:54:03 +00008485cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008486#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008487_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008488
8489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490# The cast to long int works around a bug in the HP C Compiler
8491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8493# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8495$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008496if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501else
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 if test "$ac_cv_type_fpos_t" = yes; then
8503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8504$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008505as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008506See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_fpos_t=0
8509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8514$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515
8516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008519#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008520_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008521
Michael W. Hudson54241132001-12-07 15:38:26 +00008522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523# The cast to long int works around a bug in the HP C Compiler
8524# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8525# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8526# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8528$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008529if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008531else
Matthias Kloseb9621712010-04-24 17:59:49 +00008532 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 +00008533
Martin v. Löwis18e16552006-02-15 17:27:45 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if test "$ac_cv_type_size_t" = yes; then
8536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008538as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008539See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008540 else
8541 ac_cv_sizeof_size_t=0
8542 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544
Martin v. Löwis18e16552006-02-15 17:27:45 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8547$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548
8549
8550
Martin v. Löwis18e16552006-02-15 17:27:45 +00008551cat >>confdefs.h <<_ACEOF
8552#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8553_ACEOF
8554
8555
Christian Heimes400adb02008-02-01 08:12:03 +00008556# The cast to long int works around a bug in the HP C Compiler
8557# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8558# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8559# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8561$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008562if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 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 +00008566
Christian Heimes400adb02008-02-01 08:12:03 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if test "$ac_cv_type_pid_t" = yes; then
8569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8570$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008571as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008572See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008573 else
8574 ac_cv_sizeof_pid_t=0
8575 fi
8576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577
Christian Heimes400adb02008-02-01 08:12:03 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8580$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008581
8582
8583
8584cat >>confdefs.h <<_ACEOF
8585#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8586_ACEOF
8587
8588
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008589# The cast to long int works around a bug in the HP C Compiler
8590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
8593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8594$as_echo_n "checking size of uintptr_t... " >&6; }
8595if ${ac_cv_sizeof_uintptr_t+:} false; then :
8596 $as_echo_n "(cached) " >&6
8597else
8598 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8599
8600else
8601 if test "$ac_cv_type_uintptr_t" = yes; then
8602 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8604as_fn_error 77 "cannot compute sizeof (uintptr_t)
8605See \`config.log' for more details" "$LINENO" 5; }
8606 else
8607 ac_cv_sizeof_uintptr_t=0
8608 fi
8609fi
8610
8611fi
8612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8613$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8614
8615
8616
8617cat >>confdefs.h <<_ACEOF
8618#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8619_ACEOF
8620
8621
Michael W. Hudson54241132001-12-07 15:38:26 +00008622
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8624$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008625have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008627/* end confdefs.h. */
8628
8629int
8630main ()
8631{
8632long double x; x = (long double)0;
8633 ;
8634 return 0;
8635}
8636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008637if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008638
8639
Matthias Kloseb9621712010-04-24 17:59:49 +00008640$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008641
8642 have_long_double=yes
8643
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008644fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8647$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008648if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008649# The cast to long int works around a bug in the HP C Compiler
8650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8652# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8654$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008655if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008657else
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 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 +00008659
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 if test "$ac_cv_type_long_double" = yes; then
8662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008664as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008665See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008666 else
8667 ac_cv_sizeof_long_double=0
8668 fi
8669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8673$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008674
8675
8676
8677cat >>confdefs.h <<_ACEOF
8678#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8679_ACEOF
8680
8681
8682fi
8683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008684# The cast to long int works around a bug in the HP C Compiler
8685# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8686# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8687# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8689$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 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 +00008694
Thomas Woutersb2137042007-02-01 18:02:27 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 if test "$ac_cv_type__Bool" = yes; then
8697 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8698$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008699as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008700See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 else
8702 ac_cv_sizeof__Bool=0
8703 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008705
Thomas Woutersb2137042007-02-01 18:02:27 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8708$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709
8710
8711
Thomas Woutersb2137042007-02-01 18:02:27 +00008712cat >>confdefs.h <<_ACEOF
8713#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8714_ACEOF
8715
8716
Thomas Woutersb2137042007-02-01 18:02:27 +00008717
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008718# The cast to long int works around a bug in the HP C Compiler
8719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8721# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8723$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008724if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008726else
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008728#ifdef HAVE_SYS_TYPES_H
8729#include <sys/types.h>
8730#endif
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008733
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008734else
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 if test "$ac_cv_type_off_t" = yes; then
8736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008738as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008739See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008740 else
8741 ac_cv_sizeof_off_t=0
8742 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8747$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749
8750
Martin v. Löwis11437992002-04-12 09:54:03 +00008751cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008752#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008753_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008754
Michael W. Hudson54241132001-12-07 15:38:26 +00008755
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8758$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008759if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008760 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008763
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8765$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008766else
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8768$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008769fi
8770
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008771# The cast to long int works around a bug in the HP C Compiler
8772# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8773# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8774# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8776$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008777if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781#ifdef HAVE_SYS_TYPES_H
8782#include <sys/types.h>
8783#endif
8784#ifdef HAVE_TIME_H
8785#include <time.h>
8786#endif
8787
Matthias Kloseb9621712010-04-24 17:59:49 +00008788"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 if test "$ac_cv_type_time_t" = yes; then
8792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008794as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008795See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008796 else
8797 ac_cv_sizeof_time_t=0
8798 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8803$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008805
8806
Martin v. Löwis11437992002-04-12 09:54:03 +00008807cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008808#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008809_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008810
Michael W. Hudson54241132001-12-07 15:38:26 +00008811
8812
Trent Mick635f6fb2000-08-23 21:33:05 +00008813# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008814ac_save_cc="$CC"
8815if test "$ac_cv_kpthread" = "yes"
8816then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008817elif test "$ac_cv_kthread" = "yes"
8818then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819elif test "$ac_cv_pthread" = "yes"
8820then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008821fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008822
Matthias Kloseb9621712010-04-24 17:59:49 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8824$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008825have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008827/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008828
8829 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Guido van Rossum12580492000-09-24 16:47:19 +00008833pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 ;
8835 return 0;
8836}
Matthias Kloseb159a552010-04-25 21:00:44 +00008837
Martin v. Löwis11437992002-04-12 09:54:03 +00008838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008839if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008840 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8844$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008845if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8848# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8849# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8851$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008852if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854else
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856#ifdef HAVE_PTHREAD_H
8857#include <pthread.h>
8858#endif
8859
Matthias Kloseb9621712010-04-24 17:59:49 +00008860"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008862else
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 if test "$ac_cv_type_pthread_t" = yes; then
8864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008866as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008867See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008868 else
8869 ac_cv_sizeof_pthread_t=0
8870 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008872
Trent Mick635f6fb2000-08-23 21:33:05 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8875$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008876
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008877
8878
Martin v. Löwis11437992002-04-12 09:54:03 +00008879cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008880#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008881_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008882
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883
Trent Mick635f6fb2000-08-23 21:33:05 +00008884fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008885
8886# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8887# This checking will be unnecessary after removing deprecated TLS API.
8888# The cast to long int works around a bug in the HP C Compiler
8889# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8890# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8891# This bug is HP SR number 8606223364.
8892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8893$as_echo_n "checking size of pthread_key_t... " >&6; }
8894if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8895 $as_echo_n "(cached) " >&6
8896else
8897 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8898"; then :
8899
8900else
8901 if test "$ac_cv_type_pthread_key_t" = yes; then
8902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8904as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8905See \`config.log' for more details" "$LINENO" 5; }
8906 else
8907 ac_cv_sizeof_pthread_key_t=0
8908 fi
8909fi
8910
8911fi
8912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8913$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8914
8915
8916
8917cat >>confdefs.h <<_ACEOF
8918#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8919_ACEOF
8920
8921
8922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8923$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8924if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8926/* end confdefs.h. */
8927#include <pthread.h>
8928int
8929main ()
8930{
8931pthread_key_t k; k * 1;
8932 ;
8933 return 0;
8934}
8935_ACEOF
8936if ac_fn_c_try_compile "$LINENO"; then :
8937 ac_pthread_key_t_is_arithmetic_type=yes
8938else
8939 ac_pthread_key_t_is_arithmetic_type=no
8940
8941fi
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
8944$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
8945 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
8946
8947$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
8948
8949 fi
8950else
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8952$as_echo "no" >&6; }
8953fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008954CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008955
Michael W. Hudson54241132001-12-07 15:38:26 +00008956
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008957case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008958 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008959 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8960 ;;
8961 Darwin/*)
8962 OTHER_LIBTOOL_OPT=""
8963 ;;
8964esac
8965
8966
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008967
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008968case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008969 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008970 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8971 if test "${enable_universalsdk}"; then
8972 :
8973 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008974 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008975 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008976 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008977 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008978 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008979 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008980 if test ${gcc_version} '<' 4.0
8981 then
8982 LIBTOOL_CRUFT="-lcc_dynamic"
8983 else
8984 LIBTOOL_CRUFT=""
8985 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008987 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008991
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008992 #include <unistd.h>
8993 int main(int argc, char*argv[])
8994 {
8995 if (sizeof(long) == 4) {
8996 return 0;
8997 } else {
8998 return 1;
8999 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009000 }
9001
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009003if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009004 ac_osx_32bit=yes
9005else
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9009 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009010fi
9011
9012
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009013 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009014 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009015 i386)
9016 MACOSX_DEFAULT_ARCH="i386"
9017 ;;
9018 ppc)
9019 MACOSX_DEFAULT_ARCH="ppc"
9020 ;;
9021 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009022 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009023 ;;
9024 esac
9025 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009026 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009027 i386)
9028 MACOSX_DEFAULT_ARCH="x86_64"
9029 ;;
9030 ppc)
9031 MACOSX_DEFAULT_ARCH="ppc64"
9032 ;;
9033 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009034 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009035 ;;
9036 esac
9037
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038 fi
9039
9040 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009041 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009042 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9045$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009046if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009047then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009048 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009050 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009051
Matthias Kloseb9621712010-04-24 17:59:49 +00009052$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9055$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009056 if test $enable_shared = "yes"
9057 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009058 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 +00009059 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009060else
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9062$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009063fi
9064
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9066$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009067case $ac_sys_system/$ac_sys_release in
9068 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009069
Matthias Kloseb9621712010-04-24 17:59:49 +00009070$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9073$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009074 ;;
9075 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009078 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009079esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009080
Guido van Rossum0a516c91994-09-12 10:58:40 +00009081# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009082
Michael W. Hudson54241132001-12-07 15:38:26 +00009083
9084
9085
9086
Benjamin Peterson99f03762010-04-11 22:15:28 +00009087
Thomas Wouters477c8d52006-05-27 19:21:47 +00009088
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009089# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9090# -- usually .so, .sl on HP-UX, .dll on Cygwin
9091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9092$as_echo_n "checking the extension of shared libraries... " >&6; }
9093if test -z "$SHLIB_SUFFIX"; then
9094 case $ac_sys_system in
9095 hp*|HP*)
9096 case `uname -m` in
9097 ia64) SHLIB_SUFFIX=.so;;
9098 *) SHLIB_SUFFIX=.sl;;
9099 esac
9100 ;;
9101 CYGWIN*) SHLIB_SUFFIX=.dll;;
9102 *) SHLIB_SUFFIX=.so;;
9103 esac
9104fi
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9106$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009107
Guido van Rossum0a516c91994-09-12 10:58:40 +00009108# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009109# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110# (Shared libraries in this instance are shared modules to be loaded into
9111# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9113$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009114if test -z "$LDSHARED"
9115then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009116 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009117 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009118 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009119 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009120 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009122 if test "$GCC" = "yes" ; then
9123 LDSHARED='$(CC) -shared'
9124 LDCXXSHARED='$(CXX) -shared'
9125 else
9126 LDSHARED='$(CC) -G'
9127 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009128 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009129 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009130 if test "$GCC" = "yes" ; then
9131 LDSHARED='$(CC) -shared'
9132 LDCXXSHARED='$(CXX) -shared'
9133 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009134 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009135 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009136 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009137 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009138 LDSHARED='$(CC) -bundle'
9139 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009140 if test "$enable_framework" ; then
9141 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009142 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9143 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009144 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009145 else
9146 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009147 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009148 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009149 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009150 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009151 LDSHARED='$(CC) -bundle'
9152 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009153 if test "$enable_framework" ; then
9154 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009155 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9156 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009157 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009158 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009159 # No framework, use the Python app as bundle-loader
9160 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009161 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009163 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009164 Darwin/*)
9165 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9166 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009167
Ned Deily36820b62014-06-25 13:44:22 -07009168 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9169 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9170 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9171 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9172 if test ${dep_target_major} -eq 10 && \
9173 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009174 then
Ned Deily36820b62014-06-25 13:44:22 -07009175 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009176 LDSHARED='$(CC) -bundle'
9177 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009178 if test "$enable_framework" ; then
9179 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009180 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9181 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009182 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009183 else
9184 # No framework, use the Python app as bundle-loader
9185 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9186 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009187 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009188 fi
Ned Deily36820b62014-06-25 13:44:22 -07009189 else
9190 # building for OS X 10.3 and later
9191 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9192 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9193 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009194 fi
9195 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009196 Linux*|GNU*|QNX*)
9197 LDSHARED='$(CC) -shared'
9198 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009199 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009200 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009201 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009202 LDSHARED='$(CC) -shared'
9203 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009204 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009205 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009206 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009207 OpenBSD*)
9208 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9209 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009210 LDSHARED='$(CC) -shared $(CCSHARED)'
9211 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009212 else
9213 case `uname -r` in
9214 [01].* | 2.[0-7] | 2.[0-7].*)
9215 LDSHARED="ld -Bshareable ${LDFLAGS}"
9216 ;;
9217 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009218 LDSHARED='$(CC) -shared $(CCSHARED)'
9219 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009220 ;;
9221 esac
9222 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009223 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009224 LDSHARED='$(CC) -shared'
9225 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009226 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 if test "$GCC" = "yes" ; then
9228 LDSHARED='$(CC) -shared'
9229 LDCXXSHARED='$(CXX) -shared'
9230 else
9231 LDSHARED='$(CC) -G'
9232 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009233 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009234 SCO_SV*)
9235 LDSHARED='$(CC) -Wl,-G,-Bexport'
9236 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9237 CYGWIN*)
9238 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9239 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009240 *) LDSHARED="ld";;
9241 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9244$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009245LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009246BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009247# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009248# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9250$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009251if test -z "$CCSHARED"
9252then
Guido van Rossum07397971997-04-29 21:49:50 +00009253 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009254 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009255 then CCSHARED="-fPIC";
9256 elif test `uname -p` = sparc;
9257 then CCSHARED="-xcode=pic32";
9258 else CCSHARED="-Kpic";
9259 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009260 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009261 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009262 else CCSHARED="+z";
9263 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009264 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009265 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009266 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009267 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009268 if test "$GCC" = "yes"
9269 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009270 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009271 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009272 SCO_SV*)
9273 if test "$GCC" = "yes"
9274 then CCSHARED="-fPIC"
9275 else CCSHARED="-Kpic -belf"
9276 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009277 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9280$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009281# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009282# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9284$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009285if test -z "$LINKFORSHARED"
9286then
Guido van Rossum07397971997-04-29 21:49:50 +00009287 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009288 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009289 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009290 LINKFORSHARED="-Wl,-E -Wl,+s";;
9291# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009292 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009293 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009294 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009296 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009297
9298 # Issue #18075: the default maximum stack size (8MBytes) is too
9299 # small for the default recursion limit. Increase the stack size
9300 # to ensure that tests don't crash
9301 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9302
Jack Jansene578a632001-08-15 01:27:14 +00009303 if test "$enable_framework"
9304 then
Jack Jansenda49e192005-01-07 13:08:22 +00009305 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009306 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009307 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009308 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009309 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009310 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009311 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009312 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9313 then
9314 LINKFORSHARED="-Wl,--export-dynamic"
9315 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009316 SunOS/5*) case $CC in
9317 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009318 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009319 then
9320 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009321 fi;;
9322 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009323 CYGWIN*)
9324 if test $enable_shared = "no"
9325 then
9326 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9327 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009328 QNX*)
9329 # -Wl,-E causes the symbols to be added to the dynamic
9330 # symbol table so that they can be found when a module
9331 # is loaded. -N 2048K causes the stack size to be set
9332 # to 2048 kilobytes so that the stack doesn't overflow
9333 # when running test_compile.py.
9334 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009335 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9338$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009339
Michael W. Hudson54241132001-12-07 15:38:26 +00009340
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009341
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9343$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009344if test ! "$LIBRARY" = "$LDLIBRARY"
9345then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009346 case $ac_sys_system in
9347 CYGWIN*)
9348 # Cygwin needs CCSHARED when building extension DLLs
9349 # but not when building the interpreter DLL.
9350 CFLAGSFORSHARED='';;
9351 *)
9352 CFLAGSFORSHARED='$(CCSHARED)'
9353 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9356$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009357
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009358# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9359# library (with --enable-shared).
9360# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009361# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9362# if it is not required, since it creates a dependency of the shared library
9363# to LIBS. This, in turn, means that applications linking the shared libpython
9364# don't need to link LIBS explicitly. The default should be only changed
9365# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9368$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009369case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009370 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009371 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009372esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9374$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009375
9376
Guido van Rossum627b2d71993-12-24 10:39:16 +00009377# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9379$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009380if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009381 $as_echo_n "(cached) " >&6
9382else
9383 ac_check_lib_save_LIBS=$LIBS
9384LIBS="-lsendfile $LIBS"
9385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9386/* end confdefs.h. */
9387
9388/* Override any GCC internal prototype to avoid an error.
9389 Use char because int might match the return type of a GCC
9390 builtin and then its argument prototype would still apply. */
9391#ifdef __cplusplus
9392extern "C"
9393#endif
9394char sendfile ();
9395int
9396main ()
9397{
9398return sendfile ();
9399 ;
9400 return 0;
9401}
9402_ACEOF
9403if ac_fn_c_try_link "$LINENO"; then :
9404 ac_cv_lib_sendfile_sendfile=yes
9405else
9406 ac_cv_lib_sendfile_sendfile=no
9407fi
9408rm -f core conftest.err conftest.$ac_objext \
9409 conftest$ac_exeext conftest.$ac_ext
9410LIBS=$ac_check_lib_save_LIBS
9411fi
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9413$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009414if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009415 cat >>confdefs.h <<_ACEOF
9416#define HAVE_LIBSENDFILE 1
9417_ACEOF
9418
9419 LIBS="-lsendfile $LIBS"
9420
9421fi
9422
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9424$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009425if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009427else
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009429LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433/* Override any GCC internal prototype to avoid an error.
9434 Use char because int might match the return type of a GCC
9435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009436#ifdef __cplusplus
9437extern "C"
9438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009439char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009440int
9441main ()
9442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ;
9445 return 0;
9446}
9447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009450else
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009453rm -f core conftest.err conftest.$ac_objext \
9454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009455LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9458$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009459if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 cat >>confdefs.h <<_ACEOF
9461#define HAVE_LIBDL 1
9462_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009463
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009464 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009465
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009466fi
9467 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9469$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009470if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009472else
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009474LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478/* Override any GCC internal prototype to avoid an error.
9479 Use char because int might match the return type of a GCC
9480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009481#ifdef __cplusplus
9482extern "C"
9483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009484char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009485int
9486main ()
9487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 ;
9490 return 0;
9491}
9492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009495else
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009498rm -f core conftest.err conftest.$ac_objext \
9499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009500LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9503$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009504if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 cat >>confdefs.h <<_ACEOF
9506#define HAVE_LIBDLD 1
9507_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009508
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009509 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009510
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009511fi
9512 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009513
Michael Felt0d3ccb42017-12-30 22:39:20 +01009514# checks for uuid.h location
9515for ac_header in uuid/uuid.h uuid.h
9516do :
9517 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9518ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9519if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9520 cat >>confdefs.h <<_ACEOF
9521#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9522_ACEOF
9523
9524fi
9525
9526done
9527
9528
Berker Peksag9a10ff42017-11-08 23:09:16 +03009529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9530$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9532/* end confdefs.h. */
9533#include <uuid/uuid.h>
9534int
9535main ()
9536{
9537
9538#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009539void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009540#endif
9541
9542 ;
9543 return 0;
9544}
9545_ACEOF
9546if ac_fn_c_try_compile "$LINENO"; then :
9547
9548$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9549
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9551$as_echo "yes" >&6; }
9552else
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554$as_echo "no" >&6; }
9555
9556fi
9557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9558
Michael Felt0d3ccb42017-12-30 22:39:20 +01009559# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009560# FreeBSD and OpenBSD provides support as well
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9562$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9564/* end confdefs.h. */
9565#include <uuid.h>
9566int
9567main ()
9568{
9569
9570#ifndef uuid_create
9571void *x = uuid_create
9572#endif
9573
9574 ;
9575 return 0;
9576}
9577_ACEOF
9578if ac_fn_c_try_compile "$LINENO"; then :
9579
9580$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9581
9582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9583$as_echo "yes" >&6; }
9584else
9585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
9587
9588fi
9589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9590
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009591# 'Real Time' functions on Solaris
9592# posix4 on Solaris 2.6
9593# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009598else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009599 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603/* Override any GCC internal prototype to avoid an error.
9604 Use char because int might match the return type of a GCC
9605 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606#ifdef __cplusplus
9607extern "C"
9608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009609char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009610int
9611main ()
9612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ;
9615 return 0;
9616}
9617_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618for ac_lib in '' pthread rt posix4; do
9619 if test -z "$ac_lib"; then
9620 ac_res="none required"
9621 else
9622 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009623 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009625 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628rm -f core conftest.err conftest.$ac_objext \
9629 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009630 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633done
Victor Stinnere0be4232011-10-25 13:06:09 +02009634if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636else
9637 ac_cv_search_sem_init=no
9638fi
9639rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009640LIBS=$ac_func_search_save_LIBS
9641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9643$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009645if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009647
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009648fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009649
Martin v. Löwis519adae2003-09-20 10:47:47 +00009650
Martin v. Löwis19d17342003-06-14 21:03:05 +00009651# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9653$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009654if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009656else
9657 ac_check_lib_save_LIBS=$LIBS
9658LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009660/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662/* Override any GCC internal prototype to avoid an error.
9663 Use char because int might match the return type of a GCC
9664 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009665#ifdef __cplusplus
9666extern "C"
9667#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009668char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009669int
9670main ()
9671{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009673 ;
9674 return 0;
9675}
9676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009678 ac_cv_lib_intl_textdomain=yes
9679else
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009682rm -f core conftest.err conftest.$ac_objext \
9683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009684LIBS=$ac_check_lib_save_LIBS
9685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9687$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009688if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009689
Matthias Kloseb9621712010-04-24 17:59:49 +00009690$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009691
Brett Cannonc6d936e2009-06-07 20:09:53 +00009692 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009693fi
9694
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009695
9696# checks for system dependent C++ extensions support
9697case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9699$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009702
Georg Brandl59e87bd2011-02-15 19:48:59 +00009703 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009704int
9705main ()
9706{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009707loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ;
9709 return 0;
9710}
Matthias Kloseb159a552010-04-25 21:00:44 +00009711
Martin v. Löwis11437992002-04-12 09:54:03 +00009712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009713if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009714
Matthias Kloseb159a552010-04-25 21:00:44 +00009715
Matthias Kloseb9621712010-04-24 17:59:49 +00009716$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
Matthias Kloseb159a552010-04-25 21:00:44 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009719$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009720
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009721else
Matthias Kloseb159a552010-04-25 21:00:44 +00009722
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009724$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009725
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009727rm -f core conftest.err conftest.$ac_objext \
9728 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009729 *) ;;
9730esac
9731
Christian Heimes985ecdc2013-11-20 11:46:18 +01009732# check for systems that require aligned memory access
9733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9734$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009735if ${ac_cv_aligned_required+:} false; then :
9736 $as_echo_n "(cached) " >&6
9737else
9738 if test "$cross_compiling" = yes; then :
9739 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009740else
9741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9742/* end confdefs.h. */
9743
9744int main()
9745{
9746 char s[16];
9747 int i, *p1, *p2;
9748 for (i=0; i < 16; i++)
9749 s[i] = i;
9750 p1 = (int*)(s+1);
9751 p2 = (int*)(s+2);
9752 if (*p1 == *p2)
9753 return 1;
9754 return 0;
9755}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009756_ACEOF
9757if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009758 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009759else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009760 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009761fi
9762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9763 conftest.$ac_objext conftest.beam conftest.$ac_ext
9764fi
9765
9766
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009767fi
9768
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9770$as_echo "$ac_cv_aligned_required" >&6; }
9771if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009772
9773$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9774
9775fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009776
9777# str, bytes and memoryview hash algorithm
9778
9779
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9781$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9782
9783# Check whether --with-hash_algorithm was given.
9784if test "${with_hash_algorithm+set}" = set; then :
9785 withval=$with_hash_algorithm;
9786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9787$as_echo "$withval" >&6; }
9788case "$withval" in
9789 siphash24)
9790 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9791
9792 ;;
9793 fnv)
9794 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9795
9796 ;;
9797 *)
9798 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9799 ;;
9800esac
9801
9802else
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9804$as_echo "default" >&6; }
9805fi
9806
9807
Charles-François Natalid30b0222014-05-08 23:08:51 +01009808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9809$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9810
9811# Check whether --with-address_sanitizer was given.
9812if test "${with_address_sanitizer+set}" = set; then :
9813 withval=$with_address_sanitizer;
9814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9815$as_echo "$withval" >&6; }
9816BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9817LDFLAGS="-fsanitize=address $LDFLAGS"
9818
9819else
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
9822fi
9823
9824
Guido van Rossum70c7f481998-03-26 18:44:10 +00009825# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9827$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009828if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009830else
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009832LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836/* Override any GCC internal prototype to avoid an error.
9837 Use char because int might match the return type of a GCC
9838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009839#ifdef __cplusplus
9840extern "C"
9841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009842char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009843int
9844main ()
9845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ;
9848 return 0;
9849}
9850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009851if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009852 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009853else
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009856rm -f core conftest.err conftest.$ac_objext \
9857 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009858LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9861$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009862if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009863 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009864fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009865 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9867$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009868if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009870else
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009872LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876/* Override any GCC internal prototype to avoid an error.
9877 Use char because int might match the return type of a GCC
9878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879#ifdef __cplusplus
9880extern "C"
9881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009882char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009883int
9884main ()
9885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ;
9888 return 0;
9889}
9890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009898LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9901$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009902if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009903 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009904fi
9905 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009906
Matthias Kloseb9621712010-04-24 17:59:49 +00009907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9908$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009911if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9914$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009915LIBS="$withval $LIBS"
9916
9917else
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9919$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920fi
9921
Guido van Rossum7f43da71994-08-01 12:15:30 +00009922
Victor Stinner8291b5e2015-03-20 16:03:14 +01009923
9924
9925
9926
9927
9928
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009929
Victor Stinner8291b5e2015-03-20 16:03:14 +01009930if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9931 if test -n "$ac_tool_prefix"; then
9932 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9933set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9935$as_echo_n "checking for $ac_word... " >&6; }
9936if ${ac_cv_path_PKG_CONFIG+:} false; then :
9937 $as_echo_n "(cached) " >&6
9938else
9939 case $PKG_CONFIG in
9940 [\\/]* | ?:[\\/]*)
9941 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9942 ;;
9943 *)
9944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9945for as_dir in $PATH
9946do
9947 IFS=$as_save_IFS
9948 test -z "$as_dir" && as_dir=.
9949 for ac_exec_ext in '' $ac_executable_extensions; do
9950 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9951 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9953 break 2
9954 fi
9955done
9956 done
9957IFS=$as_save_IFS
9958
9959 ;;
9960esac
9961fi
9962PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9963if test -n "$PKG_CONFIG"; then
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9965$as_echo "$PKG_CONFIG" >&6; }
9966else
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
9969fi
9970
9971
9972fi
9973if test -z "$ac_cv_path_PKG_CONFIG"; then
9974 ac_pt_PKG_CONFIG=$PKG_CONFIG
9975 # Extract the first word of "pkg-config", so it can be a program name with args.
9976set dummy pkg-config; ac_word=$2
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9978$as_echo_n "checking for $ac_word... " >&6; }
9979if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9980 $as_echo_n "(cached) " >&6
9981else
9982 case $ac_pt_PKG_CONFIG in
9983 [\\/]* | ?:[\\/]*)
9984 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9985 ;;
9986 *)
9987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9988for as_dir in $PATH
9989do
9990 IFS=$as_save_IFS
9991 test -z "$as_dir" && as_dir=.
9992 for ac_exec_ext in '' $ac_executable_extensions; do
9993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9994 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9996 break 2
9997 fi
9998done
9999 done
10000IFS=$as_save_IFS
10001
10002 ;;
10003esac
10004fi
10005ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10006if test -n "$ac_pt_PKG_CONFIG"; then
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10008$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10009else
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
10012fi
10013
10014 if test "x$ac_pt_PKG_CONFIG" = x; then
10015 PKG_CONFIG=""
10016 else
10017 case $cross_compiling:$ac_tool_warned in
10018yes:)
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10021ac_tool_warned=yes ;;
10022esac
10023 PKG_CONFIG=$ac_pt_PKG_CONFIG
10024 fi
10025else
10026 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10027fi
10028
10029fi
10030if test -n "$PKG_CONFIG"; then
10031 _pkg_min_version=0.9.0
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10033$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10034 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10036$as_echo "yes" >&6; }
10037 else
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10039$as_echo "no" >&6; }
10040 PKG_CONFIG=""
10041 fi
10042fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010043
10044# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10046$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010047
10048# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010049if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010050 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010051else
10052 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010053fi
10054
10055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10057$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010058
10059# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10061$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010062
10063# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010064if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010065 withval=$with_system_ffi;
10066fi
10067
10068
Zachary Waref40d4dd2016-09-17 01:25:24 -050010069if test "$ac_sys_system" = "Darwin"
10070then
10071 case "$with_system_ffi" in
10072 "")
10073 with_system_ffi="no"
10074 ;;
10075 yes|no)
10076 ;;
10077 *)
10078 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10079 ;;
10080 esac
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10082$as_echo "$with_system_ffi" >&6; }
10083else
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10085$as_echo "yes" >&6; }
10086 if test "$with_system_ffi" != ""
10087 then
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10089$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10090 fi
10091 with_system_ffi="yes"
10092fi
Zachary Ware935043d2016-09-09 17:01:21 -070010093
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010094if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010095 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10096else
10097 LIBFFI_INCLUDEDIR=""
10098fi
10099
10100
Stefan Krah60187b52012-03-23 19:06:27 +010010101# Check for use of the system libmpdec library
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10103$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10104
10105# Check whether --with-system_libmpdec was given.
10106if test "${with_system_libmpdec+set}" = set; then :
10107 withval=$with_system_libmpdec;
10108else
10109 with_system_libmpdec="no"
10110fi
10111
10112
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10114$as_echo "$with_system_libmpdec" >&6; }
10115
Benjamin Peterson076ed002010-10-31 17:11:02 +000010116# Check for support for loadable sqlite extensions
10117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10118$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10119# Check whether --enable-loadable-sqlite-extensions was given.
10120if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10121 enableval=$enable_loadable_sqlite_extensions;
10122else
10123 enable_loadable_sqlite_extensions="no"
10124fi
10125
10126
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10128$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10129
Ned Deilyd819b932013-09-06 01:07:05 -070010130# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10131
10132
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10134$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10135
10136# Check whether --with-tcltk-includes was given.
10137if test "${with_tcltk_includes+set}" = set; then :
10138 withval=$with_tcltk_includes;
10139else
10140 with_tcltk_includes="default"
10141fi
10142
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10144$as_echo "$with_tcltk_includes" >&6; }
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10146$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10147
10148# Check whether --with-tcltk-libs was given.
10149if test "${with_tcltk_libs+set}" = set; then :
10150 withval=$with_tcltk_libs;
10151else
10152 with_tcltk_libs="default"
10153fi
10154
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10156$as_echo "$with_tcltk_libs" >&6; }
10157if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10158then
10159 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10160 then
10161 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10162 fi
10163 TCLTK_INCLUDES=""
10164 TCLTK_LIBS=""
10165else
10166 TCLTK_INCLUDES="$with_tcltk_includes"
10167 TCLTK_LIBS="$with_tcltk_libs"
10168fi
10169
Matthias Klose55708cc2009-04-30 08:06:49 +000010170# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10172$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010173
10174# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010175if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010176 withval=$with_dbmliborder;
10177if test x$with_dbmliborder = xyes
10178then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010179as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010180else
10181 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10182 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10183 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010184 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010185 fi
10186 done
10187fi
10188fi
10189
Matthias Kloseb9621712010-04-24 17:59:49 +000010190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10191$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193
Martin v. Löwis11437992002-04-12 09:54:03 +000010194
10195# Templates for things AC_DEFINEd more than once.
10196# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010197
10198
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010199if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010200then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010201 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010203
10204 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010205elif test "$ac_cv_kpthread" = "yes"
10206then
10207 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010208 if test "$ac_cv_cxx_thread" = "yes"; then
10209 CXX="$CXX -Kpthread"
10210 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010211 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010212elif test "$ac_cv_kthread" = "yes"
10213then
10214 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010215 if test "$ac_cv_cxx_thread" = "yes"; then
10216 CXX="$CXX -Kthread"
10217 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010218 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010219elif test "$ac_cv_pthread" = "yes"
10220then
10221 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010222 if test "$ac_cv_cxx_thread" = "yes"; then
10223 CXX="$CXX -pthread"
10224 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010225 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010226else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010227 if test ! -z "$withval" -a -d "$withval"
10228 then LDFLAGS="$LDFLAGS -L$withval"
10229 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010230
10231 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010232 # define _POSIX_THREADS in unistd.h. Some apparently don't
10233 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10235$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010237/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010238
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010239#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010240#ifdef _POSIX_THREADS
10241yes
10242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010243
10244_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010247 unistd_defines_pthreads=yes
10248else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010249 unistd_defines_pthreads=no
10250fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010251rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010252
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10254$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010255
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010257
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010258 # Just looking for pthread_create in libpthread is not enough:
10259 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10260 # So we really have to include pthread.h, and then link.
10261 _libs=$LIBS
10262 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10264$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010266/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010267
10268#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010269#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010270
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010271void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010272int
10273main ()
10274{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010275
10276pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 ;
10278 return 0;
10279}
10280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010281if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010282
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10284$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010285 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010286
Guido van Rossum02a1c402000-02-25 19:26:31 +000010287else
Martin v. Löwis11437992002-04-12 09:54:03 +000010288
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010289 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010291if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010292
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010293 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010294
Guido van Rossumad678af1998-10-02 14:42:15 +000010295else
Guido van Rossumad678af1998-10-02 14:42:15 +000010296
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10298$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010299if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010301else
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010303LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307/* Override any GCC internal prototype to avoid an error.
10308 Use char because int might match the return type of a GCC
10309 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010310#ifdef __cplusplus
10311extern "C"
10312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010313char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010314int
10315main ()
10316{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 ;
10319 return 0;
10320}
10321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010322if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010324else
Matthias Kloseb9621712010-04-24 17:59:49 +000010325 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010327rm -f core conftest.err conftest.$ac_objext \
10328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010329LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10332$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010333if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010334
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010335 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010336 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010337
Greg Steinadf63d62000-07-05 10:38:09 +000010338else
Greg Steinadf63d62000-07-05 10:38:09 +000010339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10341$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010342if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010344else
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010346LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350/* Override any GCC internal prototype to avoid an error.
10351 Use char because int might match the return type of a GCC
10352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010353#ifdef __cplusplus
10354extern "C"
10355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010356char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010357int
10358main ()
10359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ;
10362 return 0;
10363}
10364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010365if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010367else
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010370rm -f core conftest.err conftest.$ac_objext \
10371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010372LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10375$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010376if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010377
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010378 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010379 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010380
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010381else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010382
Matthias Kloseb9621712010-04-24 17:59:49 +000010383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10384$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010385if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010389LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393/* Override any GCC internal prototype to avoid an error.
10394 Use char because int might match the return type of a GCC
10395 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396#ifdef __cplusplus
10397extern "C"
10398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010399char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010400int
10401main ()
10402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010403return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ;
10405 return 0;
10406}
10407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010408if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010410else
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010413rm -f core conftest.err conftest.$ac_objext \
10414 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010415LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10418$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010419if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010420
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010421 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010422 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010423
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010424else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010425
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10427$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010428if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010430else
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010432LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436/* Override any GCC internal prototype to avoid an error.
10437 Use char because int might match the return type of a GCC
10438 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010439#ifdef __cplusplus
10440extern "C"
10441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010442char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010443int
10444main ()
10445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ;
10448 return 0;
10449}
10450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010451if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010453else
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010456rm -f core conftest.err conftest.$ac_objext \
10457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010458LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10461$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010462if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010463
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010464 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010465 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010466
Guido van Rossumb93a8621998-05-07 13:27:32 +000010467else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010468
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010469 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10470
Guido van Rossum2d38f911996-06-26 19:47:01 +000010471fi
10472
Guido van Rossum627b2d71993-12-24 10:39:16 +000010473
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010474fi
10475
Guido van Rossum0be3e491997-05-22 20:33:33 +000010476fi
10477
Guido van Rossum49545951997-12-02 19:28:29 +000010478fi
10479
Guido van Rossumb93a8621998-05-07 13:27:32 +000010480fi
10481
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010483rm -f core conftest.err conftest.$ac_objext \
10484 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10487$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010488if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010490else
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010492LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496/* Override any GCC internal prototype to avoid an error.
10497 Use char because int might match the return type of a GCC
10498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010499#ifdef __cplusplus
10500extern "C"
10501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010502char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503int
10504main ()
10505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ;
10508 return 0;
10509}
10510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010511if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010513else
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010518LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10521$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010522if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010523
Martin v. Löwis130fb172001-07-19 11:00:41 +000010524 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010525
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526fi
10527
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010528
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010530
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010531if test "$posix_threads" = "yes"; then
10532 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010533
Matthias Kloseb9621712010-04-24 17:59:49 +000010534$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535
10536 fi
10537
10538 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10539 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010540 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010542
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010543 ;;
10544 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010545$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546
10547 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010548 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010549$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010550
10551 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552 esac
10553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10555$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010556 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010558else
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010560 ac_cv_pthread_system_supported=no
10561else
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010563/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010564
10565 #include <stdio.h>
10566 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010567 void *foo(void *parm) {
10568 return NULL;
10569 }
10570 main() {
10571 pthread_attr_t attr;
10572 pthread_t id;
10573 if (pthread_attr_init(&attr)) exit(-1);
10574 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10575 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10576 exit(0);
10577 }
10578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010580 ac_cv_pthread_system_supported=yes
10581else
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588
Guido van Rossum627b2d71993-12-24 10:39:16 +000010589fi
10590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10592$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593 if test "$ac_cv_pthread_system_supported" = "yes"; then
10594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596
10597 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 for ac_func in pthread_sigmask
10599do :
10600 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010601if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010603#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010605 case $ac_sys_system in
10606 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010609
10610 ;;
10611 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612fi
10613done
10614
pdoxe14679c2017-10-05 00:01:56 -070010615 for ac_func in pthread_getcpuclockid
10616do :
10617 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10618if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10619 cat >>confdefs.h <<_ACEOF
10620#define HAVE_PTHREAD_GETCPUCLOCKID 1
10621_ACEOF
10622
10623fi
10624done
10625
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626fi
10627
10628
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010629# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010630
Matthias Kloseb9621712010-04-24 17:59:49 +000010631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10632$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010634if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010639 ipv6=no
10640 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10642$as_echo "yes" >&6; }
10643 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010644
10645 ipv6=yes
10646 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648else
Martin v. Löwis11437992002-04-12 09:54:03 +000010649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010651/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010652 /* AF_INET6 available check */
10653#include <sys/types.h>
10654#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010655int
10656main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010658int domain = AF_INET6;
10659 ;
10660 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661}
Martin v. Löwis11437992002-04-12 09:54:03 +000010662_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010663if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10666$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010667 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669else
Matthias Kloseb159a552010-04-25 21:00:44 +000010670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010673 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010674
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010678if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10680$as_echo_n "checking if RFC2553 API is available... " >&6; }
10681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010683
10684 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010685#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010686int
10687main ()
10688{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010689struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010690 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010691 ;
10692 return 0;
10693}
Matthias Kloseb159a552010-04-25 21:00:44 +000010694
Martin v. Löwis11437992002-04-12 09:54:03 +000010695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010696if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010700 ipv6=yes
10701
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010702else
Matthias Kloseb159a552010-04-25 21:00:44 +000010703
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010705$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010706 ipv6=no
10707
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010710fi
10711
10712if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010714
10715fi
10716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717fi
10718
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719
10720ipv6type=unknown
10721ipv6lib=none
10722ipv6trylibc=no
10723
10724if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10726$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010727 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10728 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729 case $i in
10730 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734#include <netinet/in.h>
10735#ifdef IPV6_INRIA_VERSION
10736yes
10737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010738_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010741 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010742fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010743rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744
10745 ;;
10746 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010749
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010750#include <netinet/in.h>
10751#ifdef __KAME__
10752yes
10753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010754_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757 ipv6type=$i;
10758 ipv6lib=inet6
10759 ipv6libdir=/usr/local/v6/lib
10760 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010762rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763
10764 ;;
10765 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769#include <features.h>
10770#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10771yes
10772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776 ipv6type=$i;
10777 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010779rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780
10781 ;;
10782 linux-inet6)
10783 if test -d /usr/inet6; then
10784 ipv6type=$i
10785 ipv6lib=inet6
10786 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010787 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 fi
10789 ;;
10790 solaris)
10791 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010792 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793 ipv6type=$i
10794 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 fi
10796 fi
10797 ;;
10798 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802#include <sys/param.h>
10803#ifdef _TOSHIBA_INET6
10804yes
10805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010806_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 ipv6type=$i;
10810 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010811 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010813rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814
10815 ;;
10816 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010819
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820#include </usr/local/v6/include/sys/v6config.h>
10821#ifdef __V6D__
10822yes
10823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010824_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 ipv6type=$i;
10828 ipv6lib=v6;
10829 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010830 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010832rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833
10834 ;;
10835 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010838
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839#include <sys/param.h>
10840#ifdef _ZETA_MINAMI_INET6
10841yes
10842#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010843_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846 ipv6type=$i;
10847 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010848 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010850rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851
10852 ;;
10853 esac
10854 if test "$ipv6type" != "unknown"; then
10855 break
10856 fi
10857 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10859$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860fi
10861
10862if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10863 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10864 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10865 echo "using lib$ipv6lib"
10866 else
10867 if test $ipv6trylibc = "yes"; then
10868 echo "using libc"
10869 else
10870 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10871 echo "You need to fetch lib$ipv6lib.a from appropriate"
10872 echo 'ipv6 kit and compile beforehand.'
10873 exit 1
10874 fi
10875 fi
10876fi
10877
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10879$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10881/* end confdefs.h. */
10882 /* CAN_RAW_FD_FRAMES available check */
10883#include <linux/can/raw.h>
10884int
10885main ()
10886{
10887int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10888 ;
10889 return 0;
10890}
10891_ACEOF
10892if ac_fn_c_try_compile "$LINENO"; then :
10893
10894
10895$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10896
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10898$as_echo "yes" >&6; }
10899
10900else
10901
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10903$as_echo "no" >&6; }
10904
10905fi
10906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10907
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010908# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10910$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010913if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914 withval=$with_doc_strings;
10915fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010916
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010917
10918if test -z "$with_doc_strings"
10919then with_doc_strings="yes"
10920fi
10921if test "$with_doc_strings" != "no"
10922then
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010925
10926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10928$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010929
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010930# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10932$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010935if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936 withval=$with_pymalloc;
10937fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010938
Neil Schemenauera35c6882001-02-27 04:45:05 +000010939
Neil Schemenauer16c22972002-03-22 15:34:49 +000010940if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010941then
10942 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010943fi
10944if test "$with_pymalloc" != "no"
10945then
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010948
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010949 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10952$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010953
Nick Coghlan6ea41862017-06-11 13:16:15 +100010954# Check for --with-c-locale-coercion
10955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
10956$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
10957
10958# Check whether --with-c-locale-coercion was given.
10959if test "${with_c_locale_coercion+set}" = set; then :
10960 withval=$with_c_locale_coercion;
10961fi
10962
10963
10964if test -z "$with_c_locale_coercion"
10965then
10966 with_c_locale_coercion="yes"
10967fi
10968if test "$with_c_locale_coercion" != "no"
10969then
10970
10971$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
10972
10973fi
10974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
10975$as_echo "$with_c_locale_coercion" >&6; }
10976
10977# Check for --with-c-locale-warning
10978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
10979$as_echo_n "checking for --with-c-locale-warning... " >&6; }
10980
10981# Check whether --with-c-locale-warning was given.
10982if test "${with_c_locale_warning+set}" = set; then :
10983 withval=$with_c_locale_warning;
10984fi
10985
10986
10987if test -z "$with_c_locale_warning"
10988then
10989 with_c_locale_warning="yes"
10990fi
10991if test "$with_c_locale_warning" != "no"
10992then
10993
10994$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
10995
10996fi
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
10998$as_echo "$with_c_locale_warning" >&6; }
10999
Benjamin Peterson05159c42009-12-03 03:01:27 +000011000# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11002$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011003
11004# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011005if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011006 withval=$with_valgrind;
11007else
11008 with_valgrind=no
11009fi
11010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11012$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011013if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 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 +020011015if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011018
11019else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011020 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011021
11022fi
11023
11024
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011025 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011026fi
11027
Łukasz Langaa785c872016-09-09 17:37:37 -070011028# Check for DTrace support
11029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11030$as_echo_n "checking for --with-dtrace... " >&6; }
11031
11032# Check whether --with-dtrace was given.
11033if test "${with_dtrace+set}" = set; then :
11034 withval=$with_dtrace;
11035else
11036 with_dtrace=no
11037fi
11038
11039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11040$as_echo "$with_dtrace" >&6; }
11041
11042
11043
11044
11045
11046DTRACE=
11047DFLAGS=
11048DTRACE_HEADERS=
11049DTRACE_OBJS=
11050
11051if test "$with_dtrace" = "yes"
11052then
11053 # Extract the first word of "dtrace", so it can be a program name with args.
11054set dummy dtrace; ac_word=$2
11055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11056$as_echo_n "checking for $ac_word... " >&6; }
11057if ${ac_cv_path_DTRACE+:} false; then :
11058 $as_echo_n "(cached) " >&6
11059else
11060 case $DTRACE in
11061 [\\/]* | ?:[\\/]*)
11062 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11063 ;;
11064 *)
11065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11066for as_dir in $PATH
11067do
11068 IFS=$as_save_IFS
11069 test -z "$as_dir" && as_dir=.
11070 for ac_exec_ext in '' $ac_executable_extensions; do
11071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11072 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11074 break 2
11075 fi
11076done
11077 done
11078IFS=$as_save_IFS
11079
11080 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11081 ;;
11082esac
11083fi
11084DTRACE=$ac_cv_path_DTRACE
11085if test -n "$DTRACE"; then
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11087$as_echo "$DTRACE" >&6; }
11088else
11089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11090$as_echo "no" >&6; }
11091fi
11092
11093
11094 if test "$DTRACE" = "not found"; then
11095 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11096 fi
11097
11098$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11099
11100 DTRACE_HEADERS="Include/pydtrace_probes.h"
11101
11102 # On OS X, DTrace providers do not need to be explicitly compiled and
11103 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11104 # generation flag '-G'. We check for presence of this flag, rather than
11105 # hardcoding support by OS, in the interest of robustness.
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11107$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11108if ${ac_cv_dtrace_link+:} false; then :
11109 $as_echo_n "(cached) " >&6
11110else
11111 ac_cv_dtrace_link=no
11112 echo 'BEGIN' > conftest.d
11113 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11114 ac_cv_dtrace_link=yes
11115
11116fi
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11118$as_echo "$ac_cv_dtrace_link" >&6; }
11119 if test "$ac_cv_dtrace_link" = "yes"; then
11120 DTRACE_OBJS="Python/pydtrace.o"
11121 fi
11122fi
11123
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011124# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011125
Guido van Rossum98935bf2001-09-05 19:13:16 +000011126DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011127
Guido van Rossume97ee181999-12-20 21:27:22 +000011128# the dlopen() function means we might want to use dynload_shlib.o. some
11129# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011130for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011131do :
11132 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011133if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011135#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011136_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011137
Guido van Rossume97ee181999-12-20 21:27:22 +000011138fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011139done
Guido van Rossume97ee181999-12-20 21:27:22 +000011140
Michael W. Hudson54241132001-12-07 15:38:26 +000011141
Guido van Rossume97ee181999-12-20 21:27:22 +000011142# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11143# loading of modules.
11144
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11146$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011147if test -z "$DYNLOADFILE"
11148then
11149 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011150 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11151 if test "$ac_cv_func_dlopen" = yes
11152 then DYNLOADFILE="dynload_shlib.o"
11153 else DYNLOADFILE="dynload_aix.o"
11154 fi
11155 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011156 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011157 *)
11158 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11159 # out any dynamic loading
11160 if test "$ac_cv_func_dlopen" = yes
11161 then DYNLOADFILE="dynload_shlib.o"
11162 else DYNLOADFILE="dynload_stub.o"
11163 fi
11164 ;;
11165 esac
11166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11168$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011169if test "$DYNLOADFILE" != "dynload_stub.o"
11170then
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011173
11174fi
11175
Neil Schemenauer4e425612001-06-19 15:44:15 +000011176# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11177
Michael W. Hudson54241132001-12-07 15:38:26 +000011178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11180$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011181if test -z "$MACHDEP_OBJS"
11182then
Jack Jansene578a632001-08-15 01:27:14 +000011183 MACHDEP_OBJS=$extra_machdep_objs
11184else
11185 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011186fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011187if test -z "$MACHDEP_OBJS"; then
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11189$as_echo "none" >&6; }
11190else
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11192$as_echo "$MACHDEP_OBJS" >&6; }
11193fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011194
Guido van Rossum627b2d71993-12-24 10:39:16 +000011195# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011196for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011197 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011198 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011199 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011200 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011201 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011202 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011203 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011204 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011205 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011206 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011207 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011208 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011209 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011210 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011211 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11212 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011213 sigaction sigaltstack siginterrupt sigpending sigrelse \
11214 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011215 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011216 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011217 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011218do :
11219 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11220ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011221if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011223#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011224_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011225
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011226fi
11227done
11228
Michael W. Hudson54241132001-12-07 15:38:26 +000011229
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011230ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11231 #include <dirent.h>
11232"
11233if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11234
11235$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11236
11237fi
11238
11239
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011240# For some functions, having a definition is not sufficient, since
11241# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11243$as_echo_n "checking for chroot... " >&6; }
11244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011246#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011247int
11248main ()
11249{
11250void *x=chroot
11251 ;
11252 return 0;
11253}
11254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011258
Matthias Kloseb159a552010-04-25 21:00:44 +000011259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011261else
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011264
11265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11268$as_echo_n "checking for link... " >&6; }
11269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011270/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011271#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011272int
11273main ()
11274{
11275void *x=link
11276 ;
11277 return 0;
11278}
11279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011283
Matthias Kloseb159a552010-04-25 21:00:44 +000011284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011286else
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011289
11290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11293$as_echo_n "checking for symlink... " >&6; }
11294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011296#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011297int
11298main ()
11299{
11300void *x=symlink
11301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011308
Matthias Kloseb159a552010-04-25 21:00:44 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011311else
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011314
11315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11318$as_echo_n "checking for fchdir... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011321#include <unistd.h>
11322int
11323main ()
11324{
11325void *x=fchdir
11326 ;
11327 return 0;
11328}
11329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011331
Matthias Kloseb9621712010-04-24 17:59:49 +000011332$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011333
Matthias Kloseb159a552010-04-25 21:00:44 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011336else
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011339
11340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11343$as_echo_n "checking for fsync... " >&6; }
11344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011345/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011346#include <unistd.h>
11347int
11348main ()
11349{
11350void *x=fsync
11351 ;
11352 return 0;
11353}
11354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011358
Matthias Kloseb159a552010-04-25 21:00:44 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011360$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011361else
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011364
11365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11368$as_echo_n "checking for fdatasync... " >&6; }
11369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011371#include <unistd.h>
11372int
11373main ()
11374{
11375void *x=fdatasync
11376 ;
11377 return 0;
11378}
11379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011381
Matthias Kloseb9621712010-04-24 17:59:49 +000011382$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011383
Matthias Kloseb159a552010-04-25 21:00:44 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011385$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011386else
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011389
11390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11393$as_echo_n "checking for epoll... " >&6; }
11394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011395/* end confdefs.h. */
11396#include <sys/epoll.h>
11397int
11398main ()
11399{
11400void *x=epoll_create
11401 ;
11402 return 0;
11403}
11404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011405if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011408
Matthias Kloseb159a552010-04-25 21:00:44 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011411else
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011414
11415fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11418$as_echo_n "checking for epoll_create1... " >&6; }
11419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11420/* end confdefs.h. */
11421#include <sys/epoll.h>
11422int
11423main ()
11424{
11425void *x=epoll_create1
11426 ;
11427 return 0;
11428}
11429_ACEOF
11430if ac_fn_c_try_compile "$LINENO"; then :
11431
11432$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11433
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11435$as_echo "yes" >&6; }
11436else
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11438$as_echo "no" >&6; }
11439
11440fi
11441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11443$as_echo_n "checking for kqueue... " >&6; }
11444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011445/* end confdefs.h. */
11446
11447#include <sys/types.h>
11448#include <sys/event.h>
11449
11450int
11451main ()
11452{
11453int x=kqueue()
11454 ;
11455 return 0;
11456}
11457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011461
Matthias Kloseb159a552010-04-25 21:00:44 +000011462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011463$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011464else
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11466$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011467
11468fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11471$as_echo_n "checking for prlimit... " >&6; }
11472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473/* end confdefs.h. */
11474
11475#include <sys/time.h>
11476#include <sys/resource.h>
11477
11478int
11479main ()
11480{
11481void *x=prlimit
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486if ac_fn_c_try_compile "$LINENO"; then :
11487
11488$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11489
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11491$as_echo "yes" >&6; }
11492else
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11494$as_echo "no" >&6; }
11495
11496fi
11497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11498
Martin v. Löwisd5843682002-11-21 20:41:28 +000011499# On some systems (eg. FreeBSD 5), we would find a definition of the
11500# functions ctermid_r, setgroups in the library, but no prototype
11501# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11502# address to avoid compiler warnings and potential miscompilations
11503# because of the missing prototypes.
11504
Matthias Kloseb9621712010-04-24 17:59:49 +000011505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11506$as_echo_n "checking for ctermid_r... " >&6; }
11507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011508/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011509
Martin v. Löwisd5843682002-11-21 20:41:28 +000011510#include <stdio.h>
11511
Martin v. Löwisd5843682002-11-21 20:41:28 +000011512int
11513main ()
11514{
11515void* p = ctermid_r
11516 ;
11517 return 0;
11518}
11519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011523
Matthias Kloseb159a552010-04-25 21:00:44 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011526else
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011529
11530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11532
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11534$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011535if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011536 $as_echo_n "(cached) " >&6
11537else
11538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011539/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011540#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011541int
11542main ()
11543{
11544void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011545
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011546 ;
11547 return 0;
11548}
11549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011550if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011551 ac_cv_flock_decl=yes
11552else
11553 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554
11555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011557
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011558fi
11559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11560$as_echo "$ac_cv_flock_decl" >&6; }
11561if test "x${ac_cv_flock_decl}" = xyes; then
11562 for ac_func in flock
11563do :
11564 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011565if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011566 cat >>confdefs.h <<_ACEOF
11567#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011568_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011569
Antoine Pitroua3000072010-09-07 14:52:42 +000011570else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011572$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011573if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011574 $as_echo_n "(cached) " >&6
11575else
11576 ac_check_lib_save_LIBS=$LIBS
11577LIBS="-lbsd $LIBS"
11578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11579/* end confdefs.h. */
11580
11581/* Override any GCC internal prototype to avoid an error.
11582 Use char because int might match the return type of a GCC
11583 builtin and then its argument prototype would still apply. */
11584#ifdef __cplusplus
11585extern "C"
11586#endif
11587char flock ();
11588int
11589main ()
11590{
11591return flock ();
11592 ;
11593 return 0;
11594}
11595_ACEOF
11596if ac_fn_c_try_link "$LINENO"; then :
11597 ac_cv_lib_bsd_flock=yes
11598else
11599 ac_cv_lib_bsd_flock=no
11600fi
11601rm -f core conftest.err conftest.$ac_objext \
11602 conftest$ac_exeext conftest.$ac_ext
11603LIBS=$ac_check_lib_save_LIBS
11604fi
11605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11606$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011608 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011609
11610
11611$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11612
11613
11614fi
11615
11616
11617fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011618done
11619
Antoine Pitroua3000072010-09-07 14:52:42 +000011620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11623$as_echo_n "checking for getpagesize... " >&6; }
11624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011625/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011626
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011627#include <unistd.h>
11628
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011629int
11630main ()
11631{
11632void* p = getpagesize
11633 ;
11634 return 0;
11635}
11636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011637if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011638
Matthias Kloseb9621712010-04-24 17:59:49 +000011639$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011640
Matthias Kloseb159a552010-04-25 21:00:44 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011643else
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11645$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011646
11647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011649
Victor Stinner984890f2011-11-24 13:53:38 +010011650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11651$as_echo_n "checking for broken unsetenv... " >&6; }
11652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11653/* end confdefs.h. */
11654
11655#include <stdlib.h>
11656
11657int
11658main ()
11659{
11660int res = unsetenv("DUMMY")
11661 ;
11662 return 0;
11663}
11664_ACEOF
11665if ac_fn_c_try_compile "$LINENO"; then :
11666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
11668else
11669
11670$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11671
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11673$as_echo "yes" >&6; }
11674
11675fi
11676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11677
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011678for ac_prog in true
11679do
11680 # Extract the first word of "$ac_prog", so it can be a program name with args.
11681set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11683$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011684if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011686else
11687 if test -n "$TRUE"; then
11688 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11689else
11690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11691for as_dir in $PATH
11692do
11693 IFS=$as_save_IFS
11694 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011697 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 $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 +000011699 break 2
11700 fi
11701done
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011703IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011704
11705fi
11706fi
11707TRUE=$ac_cv_prog_TRUE
11708if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11710$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011711else
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011714fi
11715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011717 test -n "$TRUE" && break
11718done
11719test -n "$TRUE" || TRUE="/bin/true"
11720
11721
Matthias Kloseb9621712010-04-24 17:59:49 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11723$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011724if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011726else
11727 ac_check_lib_save_LIBS=$LIBS
11728LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011730/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011732/* Override any GCC internal prototype to avoid an error.
11733 Use char because int might match the return type of a GCC
11734 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011735#ifdef __cplusplus
11736extern "C"
11737#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011738char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011739int
11740main ()
11741{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011743 ;
11744 return 0;
11745}
11746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011747if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011748 ac_cv_lib_c_inet_aton=yes
11749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011752rm -f core conftest.err conftest.$ac_objext \
11753 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011754LIBS=$ac_check_lib_save_LIBS
11755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11757$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011758if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011759 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11762$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011763if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011765else
11766 ac_check_lib_save_LIBS=$LIBS
11767LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011769/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771/* Override any GCC internal prototype to avoid an error.
11772 Use char because int might match the return type of a GCC
11773 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011774#ifdef __cplusplus
11775extern "C"
11776#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011777char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011778int
11779main ()
11780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011787 ac_cv_lib_resolv_inet_aton=yes
11788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011791rm -f core conftest.err conftest.$ac_objext \
11792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011793LIBS=$ac_check_lib_save_LIBS
11794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11796$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011797if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011798 cat >>confdefs.h <<_ACEOF
11799#define HAVE_LIBRESOLV 1
11800_ACEOF
11801
11802 LIBS="-lresolv $LIBS"
11803
11804fi
11805
11806
11807fi
11808
11809
Christian Heimesd0764e22007-12-04 15:00:33 +000011810# On Tru64, chflags seems to be present, but calling it will
11811# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11813$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011814if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011818 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011821/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011822
Christian Heimesd0764e22007-12-04 15:00:33 +000011823#include <sys/stat.h>
11824#include <unistd.h>
11825int main(int argc, char*argv[])
11826{
11827 if(chflags(argv[0], 0) != 0)
11828 return 1;
11829 return 0;
11830}
Ned Deily3eb67d52011-06-28 00:00:28 -070011831
Christian Heimesd0764e22007-12-04 15:00:33 +000011832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011833if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011834 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011840fi
11841
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011842
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11845$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011846if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011848if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011849 ac_cv_have_chflags="yes"
11850else
11851 ac_cv_have_chflags="no"
11852fi
11853
11854fi
11855if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011858
11859fi
11860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11862$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011867 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011868else
Matthias Kloseb9621712010-04-24 17:59:49 +000011869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011870/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011871
Christian Heimesd0764e22007-12-04 15:00:33 +000011872#include <sys/stat.h>
11873#include <unistd.h>
11874int main(int argc, char*argv[])
11875{
11876 if(lchflags(argv[0], 0) != 0)
11877 return 1;
11878 return 0;
11879}
Ned Deily3eb67d52011-06-28 00:00:28 -070011880
Christian Heimesd0764e22007-12-04 15:00:33 +000011881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011883 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011884else
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011889fi
11890
11891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11894$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011895if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011897if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011898 ac_cv_have_lchflags="yes"
11899else
11900 ac_cv_have_lchflags="no"
11901fi
11902
11903fi
11904if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011907
11908fi
11909
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011910case $ac_sys_system/$ac_sys_release in
11911Darwin/*)
11912 _CUR_CFLAGS="${CFLAGS}"
11913 _CUR_LDFLAGS="${LDFLAGS}"
11914 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11915 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11916 ;;
11917esac
11918
Matthias Kloseb9621712010-04-24 17:59:49 +000011919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11920$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011921if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011923else
11924 ac_check_lib_save_LIBS=$LIBS
11925LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011927/* end confdefs.h. */
11928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011929/* Override any GCC internal prototype to avoid an error.
11930 Use char because int might match the return type of a GCC
11931 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011932#ifdef __cplusplus
11933extern "C"
11934#endif
11935char inflateCopy ();
11936int
11937main ()
11938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011939return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011940 ;
11941 return 0;
11942}
11943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011945 ac_cv_lib_z_inflateCopy=yes
11946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011949rm -f core conftest.err conftest.$ac_objext \
11950 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011951LIBS=$ac_check_lib_save_LIBS
11952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11954$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011955if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011958
11959fi
11960
11961
11962case $ac_sys_system/$ac_sys_release in
11963Darwin/*)
11964 CFLAGS="${_CUR_CFLAGS}"
11965 LDFLAGS="${_CUR_LDFLAGS}"
11966 ;;
11967esac
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11970$as_echo_n "checking for hstrerror... " >&6; }
11971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011973
Martin v. Löwise9416172003-05-03 10:12:45 +000011974#include <netdb.h>
11975
Martin v. Löwise9416172003-05-03 10:12:45 +000011976int
11977main ()
11978{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011979void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011980 ;
11981 return 0;
11982}
11983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011987
Matthias Kloseb159a552010-04-25 21:00:44 +000011988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011989$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011993
11994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011995rm -f core conftest.err conftest.$ac_objext \
11996 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11999$as_echo_n "checking for inet_aton... " >&6; }
12000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012001/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012002
Martin v. Löwis86d66262006-02-17 08:40:11 +000012003#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012004#include <sys/socket.h>
12005#include <netinet/in.h>
12006#include <arpa/inet.h>
12007
Martin v. Löwise9416172003-05-03 10:12:45 +000012008int
12009main ()
12010{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012011void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012012 ;
12013 return 0;
12014}
12015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012019
Matthias Kloseb159a552010-04-25 21:00:44 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012021$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12024$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012025
12026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012027rm -f core conftest.err conftest.$ac_objext \
12028 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12031$as_echo_n "checking for inet_pton... " >&6; }
12032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012033/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012034
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012035#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012036#include <sys/socket.h>
12037#include <netinet/in.h>
12038#include <arpa/inet.h>
12039
Martin v. Löwise9416172003-05-03 10:12:45 +000012040int
12041main ()
12042{
12043void* p = inet_pton
12044 ;
12045 return 0;
12046}
12047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012051
Matthias Kloseb159a552010-04-25 21:00:44 +000012052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012054else
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12056$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012057
12058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012060
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012061# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12063$as_echo_n "checking for setgroups... " >&6; }
12064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012065/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012066
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012067#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012068#ifdef HAVE_GRP_H
12069#include <grp.h>
12070#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012071
Martin v. Löwisd5843682002-11-21 20:41:28 +000012072int
12073main ()
12074{
12075void* p = setgroups
12076 ;
12077 return 0;
12078}
12079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012080if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012083
Matthias Kloseb159a552010-04-25 21:00:44 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012085$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012086else
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12088$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012089
12090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012093# check for openpty and forkpty
12094
12095for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012096do :
12097 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012098if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012101_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012102
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12105$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012106if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012108else
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012110LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114/* Override any GCC internal prototype to avoid an error.
12115 Use char because int might match the return type of a GCC
12116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012117#ifdef __cplusplus
12118extern "C"
12119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012120char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012121int
12122main ()
12123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 ;
12126 return 0;
12127}
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012134rm -f core conftest.err conftest.$ac_objext \
12135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012136LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12139$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12145$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012146if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012148else
12149 ac_check_lib_save_LIBS=$LIBS
12150LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012152/* end confdefs.h. */
12153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154/* Override any GCC internal prototype to avoid an error.
12155 Use char because int might match the return type of a GCC
12156 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012157#ifdef __cplusplus
12158extern "C"
12159#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012160char openpty ();
12161int
12162main ()
12163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012165 ;
12166 return 0;
12167}
12168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170 ac_cv_lib_bsd_openpty=yes
12171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174rm -f core conftest.err conftest.$ac_objext \
12175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012176LIBS=$ac_check_lib_save_LIBS
12177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12179$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012182 LIBS="$LIBS -lbsd"
12183fi
12184
12185
12186fi
12187
Fred Drake8cef4cf2000-06-28 16:40:38 +000012188
12189fi
12190done
12191
12192for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012193do :
12194 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012195if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012197#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012199
Fred Drake8cef4cf2000-06-28 16:40:38 +000012200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12202$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205else
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012207LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211/* Override any GCC internal prototype to avoid an error.
12212 Use char because int might match the return type of a GCC
12213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012214#ifdef __cplusplus
12215extern "C"
12216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012217char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012218int
12219main ()
12220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 ;
12223 return 0;
12224}
12225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012226if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012231rm -f core conftest.err conftest.$ac_objext \
12232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012233LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12236$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012240else
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12242$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012245else
12246 ac_check_lib_save_LIBS=$LIBS
12247LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012249/* end confdefs.h. */
12250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251/* Override any GCC internal prototype to avoid an error.
12252 Use char because int might match the return type of a GCC
12253 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012254#ifdef __cplusplus
12255extern "C"
12256#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012257char forkpty ();
12258int
12259main ()
12260{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012262 ;
12263 return 0;
12264}
12265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012267 ac_cv_lib_bsd_forkpty=yes
12268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271rm -f core conftest.err conftest.$ac_objext \
12272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012273LIBS=$ac_check_lib_save_LIBS
12274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12276$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012277if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012279 LIBS="$LIBS -lbsd"
12280fi
12281
12282
12283fi
12284
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285
12286fi
12287done
12288
Jack Jansendd19cf82001-12-06 22:36:17 +000012289
Michael W. Hudson54241132001-12-07 15:38:26 +000012290# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012291for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012292do :
12293 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12294ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012295if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012297#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012298_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012299
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012301done
12302
Michael W. Hudson54241132001-12-07 15:38:26 +000012303
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012304ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012305if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012306 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012307
Martin v. Löwis1142de32002-03-29 16:28:31 +000012308else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012310 *" dup2.$ac_objext "* ) ;;
12311 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012313esac
12314
Martin v. Löwis1142de32002-03-29 16:28:31 +000012315fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012316
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012317ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012318if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012319 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12320
12321else
12322 case " $LIBOBJS " in
12323 *" strdup.$ac_objext "* ) ;;
12324 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12325 ;;
12326esac
12327
12328fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012329
12330
12331for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012332do :
12333 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012334if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012339/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012340#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012341int
12342main ()
12343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ;
12346 return 0;
12347}
12348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
Matthias Kloseb9621712010-04-24 17:59:49 +000012351$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012352
Guido van Rossum627b2d71993-12-24 10:39:16 +000012353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012355
Guido van Rossum627b2d71993-12-24 10:39:16 +000012356fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012357done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358
Jack Jansen150753c2003-03-29 22:07:47 +000012359for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012360do :
12361 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012362if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012367/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012368#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012369int
12370main ()
12371{
12372setpgrp(0,0);
12373 ;
12374 return 0;
12375}
12376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012380
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012383
12384fi
12385done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012386
Thomas Wouters3a584202000-08-05 23:28:51 +000012387for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012388do :
12389 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012390if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012395/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012396#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012397int
12398main ()
12399{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012400gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 ;
12402 return 0;
12403}
12404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012405if ac_fn_c_try_compile "$LINENO"; then :
12406
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407else
Skip Montanaro6dead952003-09-25 14:50:04 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410
Martin v. Löwis11437992002-04-12 09:54:03 +000012411
Guido van Rossum627b2d71993-12-24 10:39:16 +000012412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012414
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012416done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417
Michael W. Hudson54241132001-12-07 15:38:26 +000012418
Victor Stinnere0be4232011-10-25 13:06:09 +020012419for ac_func in clock_gettime
12420do :
12421 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12422if test "x$ac_cv_func_clock_gettime" = xyes; then :
12423 cat >>confdefs.h <<_ACEOF
12424#define HAVE_CLOCK_GETTIME 1
12425_ACEOF
12426
12427else
12428
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12430$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12431if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12432 $as_echo_n "(cached) " >&6
12433else
12434 ac_check_lib_save_LIBS=$LIBS
12435LIBS="-lrt $LIBS"
12436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437/* end confdefs.h. */
12438
12439/* Override any GCC internal prototype to avoid an error.
12440 Use char because int might match the return type of a GCC
12441 builtin and then its argument prototype would still apply. */
12442#ifdef __cplusplus
12443extern "C"
12444#endif
12445char clock_gettime ();
12446int
12447main ()
12448{
12449return clock_gettime ();
12450 ;
12451 return 0;
12452}
12453_ACEOF
12454if ac_fn_c_try_link "$LINENO"; then :
12455 ac_cv_lib_rt_clock_gettime=yes
12456else
12457 ac_cv_lib_rt_clock_gettime=no
12458fi
12459rm -f core conftest.err conftest.$ac_objext \
12460 conftest$ac_exeext conftest.$ac_ext
12461LIBS=$ac_check_lib_save_LIBS
12462fi
12463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12464$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12465if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12466
Victor Stinner7efb8332014-08-29 15:41:08 +020012467 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012468 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12469
12470
12471$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12472
12473
12474fi
12475
12476
12477fi
12478done
12479
12480
12481for ac_func in clock_getres
12482do :
12483 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12484if test "x$ac_cv_func_clock_getres" = xyes; then :
12485 cat >>confdefs.h <<_ACEOF
12486#define HAVE_CLOCK_GETRES 1
12487_ACEOF
12488
12489else
12490
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12492$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12493if ${ac_cv_lib_rt_clock_getres+:} false; then :
12494 $as_echo_n "(cached) " >&6
12495else
12496 ac_check_lib_save_LIBS=$LIBS
12497LIBS="-lrt $LIBS"
12498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12499/* end confdefs.h. */
12500
12501/* Override any GCC internal prototype to avoid an error.
12502 Use char because int might match the return type of a GCC
12503 builtin and then its argument prototype would still apply. */
12504#ifdef __cplusplus
12505extern "C"
12506#endif
12507char clock_getres ();
12508int
12509main ()
12510{
12511return clock_getres ();
12512 ;
12513 return 0;
12514}
12515_ACEOF
12516if ac_fn_c_try_link "$LINENO"; then :
12517 ac_cv_lib_rt_clock_getres=yes
12518else
12519 ac_cv_lib_rt_clock_getres=no
12520fi
12521rm -f core conftest.err conftest.$ac_objext \
12522 conftest$ac_exeext conftest.$ac_ext
12523LIBS=$ac_check_lib_save_LIBS
12524fi
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12526$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12527if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12528
12529 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12530
12531
12532fi
12533
12534
12535fi
12536done
12537
12538
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012539for ac_func in clock_settime
12540do :
12541 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12542if test "x$ac_cv_func_clock_settime" = xyes; then :
12543 cat >>confdefs.h <<_ACEOF
12544#define HAVE_CLOCK_SETTIME 1
12545_ACEOF
12546
12547else
12548
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12550$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12551if ${ac_cv_lib_rt_clock_settime+:} false; then :
12552 $as_echo_n "(cached) " >&6
12553else
12554 ac_check_lib_save_LIBS=$LIBS
12555LIBS="-lrt $LIBS"
12556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557/* end confdefs.h. */
12558
12559/* Override any GCC internal prototype to avoid an error.
12560 Use char because int might match the return type of a GCC
12561 builtin and then its argument prototype would still apply. */
12562#ifdef __cplusplus
12563extern "C"
12564#endif
12565char clock_settime ();
12566int
12567main ()
12568{
12569return clock_settime ();
12570 ;
12571 return 0;
12572}
12573_ACEOF
12574if ac_fn_c_try_link "$LINENO"; then :
12575 ac_cv_lib_rt_clock_settime=yes
12576else
12577 ac_cv_lib_rt_clock_settime=no
12578fi
12579rm -f core conftest.err conftest.$ac_objext \
12580 conftest$ac_exeext conftest.$ac_ext
12581LIBS=$ac_check_lib_save_LIBS
12582fi
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12584$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12585if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12586
12587 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12588
12589
12590fi
12591
12592
12593fi
12594done
12595
12596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12598$as_echo_n "checking for major... " >&6; }
12599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012600/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012601
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012602#if defined(MAJOR_IN_MKDEV)
12603#include <sys/mkdev.h>
12604#elif defined(MAJOR_IN_SYSMACROS)
12605#include <sys/sysmacros.h>
12606#else
12607#include <sys/types.h>
12608#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012609
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012610int
12611main ()
12612{
12613
12614 makedev(major(0),minor(0));
12615
12616 ;
12617 return 0;
12618}
12619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012620if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012621
12622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12626$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012627
12628else
Skip Montanaro6dead952003-09-25 14:50:04 +000012629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012632
12633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012634rm -f core conftest.err conftest.$ac_objext \
12635 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012636
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012637# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012638# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12640$as_echo_n "checking for getaddrinfo... " >&6; }
12641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012642/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012643
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012644#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012645#include <sys/socket.h>
12646#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012647#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012648
Martin v. Löwis11437992002-04-12 09:54:03 +000012649int
12650main ()
12651{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012652getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 ;
12654 return 0;
12655}
12656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012657if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012658 have_getaddrinfo=yes
12659else
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662rm -f core conftest.err conftest.$ac_objext \
12663 conftest$ac_exeext conftest.$ac_ext
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12665$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012666if test $have_getaddrinfo = yes
12667then
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12669$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012670 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012672else
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012674
12675if test "${enable_ipv6+set}" = set; then
12676 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12677else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012678 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012679fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012683
Stefan Krah19c21392012-11-22 23:47:32 +010012684#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012685#include <sys/types.h>
12686#include <netdb.h>
12687#include <string.h>
12688#include <sys/socket.h>
12689#include <netinet/in.h>
12690
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012691int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012692{
12693 int passive, gaierr, inet4 = 0, inet6 = 0;
12694 struct addrinfo hints, *ai, *aitop;
12695 char straddr[INET6_ADDRSTRLEN], strport[16];
12696
12697 for (passive = 0; passive <= 1; passive++) {
12698 memset(&hints, 0, sizeof(hints));
12699 hints.ai_family = AF_UNSPEC;
12700 hints.ai_flags = passive ? AI_PASSIVE : 0;
12701 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012702 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012703 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12704 (void)gai_strerror(gaierr);
12705 goto bad;
12706 }
12707 for (ai = aitop; ai; ai = ai->ai_next) {
12708 if (ai->ai_addr == NULL ||
12709 ai->ai_addrlen == 0 ||
12710 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12711 straddr, sizeof(straddr), strport, sizeof(strport),
12712 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12713 goto bad;
12714 }
12715 switch (ai->ai_family) {
12716 case AF_INET:
12717 if (strcmp(strport, "54321") != 0) {
12718 goto bad;
12719 }
12720 if (passive) {
12721 if (strcmp(straddr, "0.0.0.0") != 0) {
12722 goto bad;
12723 }
12724 } else {
12725 if (strcmp(straddr, "127.0.0.1") != 0) {
12726 goto bad;
12727 }
12728 }
12729 inet4++;
12730 break;
12731 case AF_INET6:
12732 if (strcmp(strport, "54321") != 0) {
12733 goto bad;
12734 }
12735 if (passive) {
12736 if (strcmp(straddr, "::") != 0) {
12737 goto bad;
12738 }
12739 } else {
12740 if (strcmp(straddr, "::1") != 0) {
12741 goto bad;
12742 }
12743 }
12744 inet6++;
12745 break;
12746 case AF_UNSPEC:
12747 goto bad;
12748 break;
12749 default:
12750 /* another family support? */
12751 break;
12752 }
12753 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012754 freeaddrinfo(aitop);
12755 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012756 }
12757
12758 if (!(inet4 == 0 || inet4 == 2))
12759 goto bad;
12760 if (!(inet6 == 0 || inet6 == 2))
12761 goto bad;
12762
12763 if (aitop)
12764 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012765 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012766
12767 bad:
12768 if (aitop)
12769 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012770 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012771}
12772
Martin v. Löwis11437992002-04-12 09:54:03 +000012773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012775 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776else
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012783fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012784
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12788$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12789
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012790if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012791then
12792 if test $ipv6 = yes
12793 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012794 echo 'Fatal: You must get working getaddrinfo() function.'
12795 echo ' or you can specify "--disable-ipv6"'.
12796 exit 1
12797 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012798else
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012801
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012803
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012804for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012805do :
12806 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012807if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012808 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012809#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012810_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012812fi
12813done
12814
Michael W. Hudson54241132001-12-07 15:38:26 +000012815
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012816# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12818$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012819if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012820 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012821else
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012823/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012824#include <sys/types.h>
12825#include <sys/time.h>
12826#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Martin v. Löwis11437992002-04-12 09:54:03 +000012828int
12829main ()
12830{
12831if ((struct tm *) 0)
12832return 0;
12833 ;
12834 return 0;
12835}
12836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012838 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012839else
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12845$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012846if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012849
12850fi
12851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12853$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012854if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859#include <sys/types.h>
12860#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012861
Martin v. Löwis11437992002-04-12 09:54:03 +000012862int
12863main ()
12864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865struct tm tm;
12866 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ;
12869 return 0;
12870}
12871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012873 ac_cv_struct_tm=time.h
12874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12880$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012881if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884
12885fi
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887ac_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 +000012888#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890"
Victor Stinnere0be4232011-10-25 13:06:09 +020012891if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
12893cat >>confdefs.h <<_ACEOF
12894#define HAVE_STRUCT_TM_TM_ZONE 1
12895_ACEOF
12896
12897
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012899
Martin v. Löwis11437992002-04-12 09:54:03 +000012900if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903
12904else
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12906"
Victor Stinnere0be4232011-10-25 13:06:09 +020012907if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012908 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911fi
12912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012914#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915_ACEOF
12916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12918$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012919if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921else
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012923/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012924#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925#if !HAVE_DECL_TZNAME
12926extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Martin v. Löwis11437992002-04-12 09:54:03 +000012929int
12930main ()
12931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 ;
12934 return 0;
12935}
12936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012937if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012938 ac_cv_var_tzname=yes
12939else
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012942rm -f core conftest.err conftest.$ac_objext \
12943 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12946$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012947 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012950
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012951 fi
12952fi
12953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954ac_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 +020012955if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
12957cat >>confdefs.h <<_ACEOF
12958#define HAVE_STRUCT_STAT_ST_RDEV 1
12959_ACEOF
12960
12961
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012962fi
12963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964ac_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 +020012965if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012966
Martin v. Löwis11437992002-04-12 09:54:03 +000012967cat >>confdefs.h <<_ACEOF
12968#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12969_ACEOF
12970
12971
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012972fi
12973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974ac_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 +020012975if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012976
12977cat >>confdefs.h <<_ACEOF
12978#define HAVE_STRUCT_STAT_ST_FLAGS 1
12979_ACEOF
12980
12981
12982fi
12983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984ac_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 +020012985if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012986
12987cat >>confdefs.h <<_ACEOF
12988#define HAVE_STRUCT_STAT_ST_GEN 1
12989_ACEOF
12990
12991
12992fi
12993
Matthias Kloseb9621712010-04-24 17:59:49 +000012994ac_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 +020012995if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012996
12997cat >>confdefs.h <<_ACEOF
12998#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12999_ACEOF
13000
13001
13002fi
13003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004ac_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 +020013005if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013006
Martin v. Löwis11437992002-04-12 09:54:03 +000013007cat >>confdefs.h <<_ACEOF
13008#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13009_ACEOF
13010
13011
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013012fi
13013
Stefan Krah267b6392016-04-26 01:09:18 +020013014ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13015 #include <sys/types.h>
13016 #include <pwd.h>
13017
13018"
13019if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13020
13021cat >>confdefs.h <<_ACEOF
13022#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13023_ACEOF
13024
13025
13026fi
13027ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13028 #include <sys/types.h>
13029 #include <pwd.h>
13030
13031"
13032if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13033
13034cat >>confdefs.h <<_ACEOF
13035#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13036_ACEOF
13037
13038
13039fi
13040
Zachary Ware6a6967e2016-10-01 00:47:27 -050013041# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13042ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13043"
13044if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13045
13046cat >>confdefs.h <<_ACEOF
13047#define HAVE_SIGINFO_T_SI_BAND 1
13048_ACEOF
13049
13050
13051fi
13052
Michael W. Hudson54241132001-12-07 15:38:26 +000013053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13055$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013056if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013058else
Matthias Kloseb159a552010-04-25 21:00:44 +000013059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013062#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013063int
13064main ()
13065{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013067 ;
13068 return 0;
13069}
13070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013071if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072 ac_cv_header_time_altzone=yes
13073else
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078fi
13079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13081$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013082if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013083
Matthias Kloseb9621712010-04-24 17:59:49 +000013084$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085
13086fi
13087
Guido van Rossumda88dad1995-01-26 00:46:29 +000013088was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13090$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013092/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013093
13094#include <sys/types.h>
13095#include <sys/select.h>
13096#include <sys/time.h>
13097
Martin v. Löwis11437992002-04-12 09:54:03 +000013098int
13099main ()
13100{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101;
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ;
13103 return 0;
13104}
13105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013107
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013110
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013111 was_it_defined=yes
13112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13116$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13119$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013120if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013125#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013126int
13127main ()
13128{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013129struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 ;
13131 return 0;
13132}
13133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135 ac_cv_struct_addrinfo=yes
13136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13140fi
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13143$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013144if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147
13148fi
13149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13151$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013152if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013154else
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013156/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013157
13158# include <sys/types.h>
13159# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013160int
13161main ()
13162{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013163struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 ;
13165 return 0;
13166}
13167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013169 ac_cv_struct_sockaddr_storage=yes
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13174fi
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13177$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013178if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181
13182fi
13183
Christian Heimesdffa3942016-09-05 23:54:41 +020013184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13185$as_echo_n "checking for sockaddr_alg... " >&6; }
13186if ${ac_cv_struct_sockaddr_alg+:} false; then :
13187 $as_echo_n "(cached) " >&6
13188else
13189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13190/* end confdefs.h. */
13191
13192# include <sys/types.h>
13193# include <sys/socket.h>
13194# include <linux/if_alg.h>
13195int
13196main ()
13197{
13198struct sockaddr_alg s
13199 ;
13200 return 0;
13201}
13202_ACEOF
13203if ac_fn_c_try_compile "$LINENO"; then :
13204 ac_cv_struct_sockaddr_alg=yes
13205else
13206 ac_cv_struct_sockaddr_alg=no
13207fi
13208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13209fi
13210
13211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13212$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13213if test $ac_cv_struct_sockaddr_alg = yes; then
13214
13215$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13216
13217fi
13218
Guido van Rossum627b2d71993-12-24 10:39:16 +000013219# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13222$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013223if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013228$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013229int
13230main ()
13231{
13232static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013233test_array [0] = 0;
13234return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013235
13236 ;
13237 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013238}
Martin v. Löwis11437992002-04-12 09:54:03 +000013239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013241 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013242else
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13248$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013249if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013251
13252fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13255$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013256if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013260/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013261
Martin v. Löwis11437992002-04-12 09:54:03 +000013262int
13263main ()
13264{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013267 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013269 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271 char const *const *pcpcc;
13272 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 /* NEC SVR4.0.2 mips cc rejects this. */
13274 struct point {int x, y;};
13275 static struct point const zero = {0,0};
13276 /* AIX XL C 1.02.0.0 rejects this.
13277 It does not let you subtract one const X* pointer from another in
13278 an arm of an if-expression whose if-part is not a constant
13279 expression */
13280 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013281 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283 ++pcpcc;
13284 ppc = (char**) pcpcc;
13285 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013286 { /* SCO 3.2v4 cc rejects this sort of thing. */
13287 char tx;
13288 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013293 }
13294 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13295 int x[] = {25, 17};
13296 const int *foo = &x[0];
13297 ++foo;
13298 }
13299 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13300 typedef const int *iptr;
13301 iptr p = 0;
13302 ++p;
13303 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013304 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013305 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013306 struct s { int j; const int *ap[3]; } bx;
13307 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 }
13309 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13310 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013311 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013312 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013313 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013314#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 ;
13317 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013318}
Martin v. Löwis11437992002-04-12 09:54:03 +000013319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013320if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321 ac_cv_c_const=yes
13322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13328$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013330
Matthias Kloseb9621712010-04-24 17:59:49 +000013331$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332
13333fi
13334
Michael W. Hudson54241132001-12-07 15:38:26 +000013335
Guido van Rossumda88dad1995-01-26 00:46:29 +000013336works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13338$as_echo_n "checking for working signed char... " >&6; }
13339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013340/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013341
Martin v. Löwis11437992002-04-12 09:54:03 +000013342int
13343main ()
13344{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ;
13347 return 0;
13348}
13349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013351 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013352else
Skip Montanaro6dead952003-09-25 14:50:04 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013355
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013356
Guido van Rossum7f43da71994-08-01 12:15:30 +000013357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13360$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013361
Guido van Rossumda88dad1995-01-26 00:46:29 +000013362have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13364$as_echo_n "checking for prototypes... " >&6; }
13365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013367int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013368int
13369main ()
13370{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013371return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 ;
13373 return 0;
13374}
13375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb159a552010-04-25 21:00:44 +000013380 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13384$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013385
Guido van Rossumda88dad1995-01-26 00:46:29 +000013386works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13388$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013390/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013391
13392#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013393int foo(int x, ...) {
13394 va_list va;
13395 va_start(va, x);
13396 va_arg(va, int);
13397 va_arg(va, char *);
13398 va_arg(va, double);
13399 return 0;
13400}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013401
Martin v. Löwis11437992002-04-12 09:54:03 +000013402int
13403main ()
13404{
Guido van Rossum90eea071996-08-30 20:58:57 +000013405return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 ;
13407 return 0;
13408}
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013415 works=yes
13416
Guido van Rossum627b2d71993-12-24 10:39:16 +000013417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13420$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421
Martin v. Löwisd6320502004-08-12 13:45:08 +000013422# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13424$as_echo_n "checking for socketpair... " >&6; }
13425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013426/* end confdefs.h. */
13427
13428#include <sys/types.h>
13429#include <sys/socket.h>
13430
13431int
13432main ()
13433{
13434void *x=socketpair
13435 ;
13436 return 0;
13437}
13438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013442
Matthias Kloseb159a552010-04-25 21:00:44 +000013443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13447$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013448
13449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013451
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013452# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13454$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013456/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013457#include <sys/types.h>
13458#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013459int
13460main ()
13461{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013462struct sockaddr x;
13463x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 ;
13465 return 0;
13466}
13467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if ac_fn_c_try_compile "$LINENO"; then :
13469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13470$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013473
13474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13476$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013477
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013480
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013481# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013482
13483
Matthias Kloseb9621712010-04-24 17:59:49 +000013484ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013485if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13490$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013491 OLD_CFLAGS=$CFLAGS
13492 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013494/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013495
13496# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013497
Martin v. Löwis11437992002-04-12 09:54:03 +000013498int
13499main ()
13500{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013501
13502 char *name;
13503 struct hostent *he, *res;
13504 char buffer[2048];
13505 int buflen = 2048;
13506 int h_errnop;
13507
13508 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
13510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013517
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
Matthias Kloseb9621712010-04-24 17:59:49 +000013519$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13522$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013524else
Skip Montanaro6dead952003-09-25 14:50:04 +000013525
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13527$as_echo "no" >&6; }
13528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13529$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013531/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013532
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013533# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535int
13536main ()
13537{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013538
13539 char *name;
13540 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013541 char buffer[2048];
13542 int buflen = 2048;
13543 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013544
Matthias Kloseb159a552010-04-25 21:00:44 +000013545 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
13547 ;
13548 return 0;
13549}
13550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013554
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Kloseb159a552010-04-25 21:00:44 +000013556$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13559$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013560
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013561else
Skip Montanaro6dead952003-09-25 14:50:04 +000013562
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13564$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13566$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568/* end confdefs.h. */
13569
13570# include <netdb.h>
13571
13572int
13573main ()
13574{
13575
13576 char *name;
13577 struct hostent *he;
13578 struct hostent_data data;
13579
13580 (void) gethostbyname_r(name, he, &data);
13581
13582 ;
13583 return 0;
13584}
13585_ACEOF
13586if ac_fn_c_try_compile "$LINENO"; then :
13587
13588 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13589
13590
13591$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13592
13593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13594$as_echo "yes" >&6; }
13595
13596else
13597
13598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13599$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013609 CFLAGS=$OLD_CFLAGS
13610
13611else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 for ac_func in gethostbyname
13614do :
13615 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013616if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013618#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013619_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013621fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013622done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013623
Michael W. Hudson54241132001-12-07 15:38:26 +000013624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013625fi
13626
Michael W. Hudson54241132001-12-07 15:38:26 +000013627
13628
13629
13630
13631
13632
Guido van Rossum627b2d71993-12-24 10:39:16 +000013633# checks for system services
13634# (none yet)
13635
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013636# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013637ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013638if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013639
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013640else
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13642$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013643if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013645else
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013647LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651/* Override any GCC internal prototype to avoid an error.
13652 Use char because int might match the return type of a GCC
13653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013654#ifdef __cplusplus
13655extern "C"
13656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013657char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013658int
13659main ()
13660{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013661return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013662 ;
13663 return 0;
13664}
13665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013671rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013673LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13676$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013677if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 cat >>confdefs.h <<_ACEOF
13679#define HAVE_LIBIEEE 1
13680_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013682 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013683
Guido van Rossum627b2d71993-12-24 10:39:16 +000013684fi
13685
Michael W. Hudson54241132001-12-07 15:38:26 +000013686
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013687fi
13688
Michael W. Hudson54241132001-12-07 15:38:26 +000013689
Guido van Rossum7f43da71994-08-01 12:15:30 +000013690# check for --with-libm=...
13691
Guido van Rossum563e7081996-09-10 18:20:48 +000013692case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013693Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013694*) LIBM=-lm
13695esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13697$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013700if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013702if test "$withval" = no
13703then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13705$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013706elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013707then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13709$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013710else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013711fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013712else
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13714$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715fi
13716
Guido van Rossum7f43da71994-08-01 12:15:30 +000013717
13718# check for --with-libc=...
13719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13721$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013724if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013726if test "$withval" = no
13727then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13729$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013730elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013731then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13733$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013734else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013735fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13738$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739fi
13740
Guido van Rossum7f43da71994-08-01 12:15:30 +000013741
Stefan Krah1919b7e2012-03-21 18:25:23 +010013742# **************************************
13743# * Check for gcc x64 inline assembler *
13744# **************************************
13745
13746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13747$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13749/* end confdefs.h. */
13750
13751int
13752main ()
13753{
13754
13755 __asm__ __volatile__ ("movq %rcx, %rax");
13756
13757 ;
13758 return 0;
13759}
13760_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013761if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013762 have_gcc_asm_for_x64=yes
13763else
13764 have_gcc_asm_for_x64=no
13765fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013766rm -f core conftest.err conftest.$ac_objext \
13767 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13769$as_echo "$have_gcc_asm_for_x64" >&6; }
13770if test "$have_gcc_asm_for_x64" = yes
13771then
13772
13773$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13774
13775fi
13776
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777# **************************************************
13778# * Check for various properties of floating point *
13779# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13782$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013783if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013785else
13786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013788 ac_cv_little_endian_double=no
13789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791/* end confdefs.h. */
13792
13793#include <string.h>
13794int main() {
13795 double x = 9006104071832581.0;
13796 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13797 return 0;
13798 else
13799 return 1;
13800}
13801
13802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013803if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013804 ac_cv_little_endian_double=yes
13805else
Matthias Kloseb9621712010-04-24 17:59:49 +000013806 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810fi
13811
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013812fi
13813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13815$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816if test "$ac_cv_little_endian_double" = yes
13817then
13818
Matthias Kloseb9621712010-04-24 17:59:49 +000013819$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013820
13821fi
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13824$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013825if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013827else
13828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013830 ac_cv_big_endian_double=no
13831else
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013833/* end confdefs.h. */
13834
13835#include <string.h>
13836int main() {
13837 double x = 9006104071832581.0;
13838 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13839 return 0;
13840 else
13841 return 1;
13842}
13843
13844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013846 ac_cv_big_endian_double=yes
13847else
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852fi
13853
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854fi
13855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13857$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013858if test "$ac_cv_big_endian_double" = yes
13859then
13860
Matthias Kloseb9621712010-04-24 17:59:49 +000013861$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013862
13863fi
13864
13865# Some ARM platforms use a mixed-endian representation for doubles.
13866# While Python doesn't currently have full support for these platforms
13867# (see e.g., issue 1762561), we can at least make sure that float <-> string
13868# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13870$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013871if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013873else
13874
Matthias Kloseb9621712010-04-24 17:59:49 +000013875if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013876 ac_cv_mixed_endian_double=no
13877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879/* end confdefs.h. */
13880
13881#include <string.h>
13882int main() {
13883 double x = 9006104071832581.0;
13884 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13885 return 0;
13886 else
13887 return 1;
13888}
13889
13890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013891if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892 ac_cv_mixed_endian_double=yes
13893else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013898fi
13899
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013900fi
13901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13903$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013904if test "$ac_cv_mixed_endian_double" = yes
13905then
13906
Matthias Kloseb9621712010-04-24 17:59:49 +000013907$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013908
13909fi
13910
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013911# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013912# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013913# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013914# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013915# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013916# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013917
13918# This inline assembler syntax may also work for suncc and icc,
13919# so we try it on all platforms.
13920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13922$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924/* end confdefs.h. */
13925
13926int
13927main ()
13928{
13929
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013930 unsigned short cw;
13931 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13932 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013933
13934 ;
13935 return 0;
13936}
13937_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013938if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013939 have_gcc_asm_for_x87=yes
13940else
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013943rm -f core conftest.err conftest.$ac_objext \
13944 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13946$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013947if test "$have_gcc_asm_for_x87" = yes
13948then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013952fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13955$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13957/* end confdefs.h. */
13958
13959int
13960main ()
13961{
13962
13963 unsigned int fpcr;
13964 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13965 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13966
13967 ;
13968 return 0;
13969}
13970_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013971if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013972 have_gcc_asm_for_mc68881=yes
13973else
13974 have_gcc_asm_for_mc68881=no
13975fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013976rm -f core conftest.err conftest.$ac_objext \
13977 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13979$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13980if test "$have_gcc_asm_for_mc68881" = yes
13981then
13982
13983$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13984
13985fi
13986
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013987# Detect whether system arithmetic is subject to x87-style double
13988# rounding issues. The result of this test has little meaning on non
13989# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13990# mode is round-to-nearest and double rounding issues are present, and
13991# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13993$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013994# $BASECFLAGS may affect the result
13995ac_save_cc="$CC"
13996CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013997if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013998 ac_cv_x87_double_rounding=no
13999else
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014001/* end confdefs.h. */
14002
14003#include <stdlib.h>
14004#include <math.h>
14005int main() {
14006 volatile double x, y, z;
14007 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14008 x = 0.99999999999999989; /* 1-2**-53 */
14009 y = 1./x;
14010 if (y != 1.)
14011 exit(0);
14012 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14013 x = 1e16;
14014 y = 2.99999;
14015 z = x + y;
14016 if (z != 1e16+4.)
14017 exit(0);
14018 /* both tests show evidence of double rounding */
14019 exit(1);
14020}
14021
14022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014023if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014024 ac_cv_x87_double_rounding=no
14025else
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014030fi
14031
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014032CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14034$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014035if test "$ac_cv_x87_double_rounding" = yes
14036then
14037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014039
14040fi
14041
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014042# ************************************
14043# * Check for mathematical functions *
14044# ************************************
14045
14046LIBS_SAVE=$LIBS
14047LIBS="$LIBS $LIBM"
14048
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014049for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14050do :
14051 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14052ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014053if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014054 cat >>confdefs.h <<_ACEOF
14055#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14056_ACEOF
14057
14058fi
14059done
14060
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014061for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014062do :
14063 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14064ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014065if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014066 cat >>confdefs.h <<_ACEOF
14067#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14068_ACEOF
14069
14070fi
14071done
14072
14073ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14074"
Victor Stinnere0be4232011-10-25 13:06:09 +020014075if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014076 ac_have_decl=1
14077else
14078 ac_have_decl=0
14079fi
14080
14081cat >>confdefs.h <<_ACEOF
14082#define HAVE_DECL_ISINF $ac_have_decl
14083_ACEOF
14084ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14085"
Victor Stinnere0be4232011-10-25 13:06:09 +020014086if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014087 ac_have_decl=1
14088else
14089 ac_have_decl=0
14090fi
14091
14092cat >>confdefs.h <<_ACEOF
14093#define HAVE_DECL_ISNAN $ac_have_decl
14094_ACEOF
14095ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14096"
Victor Stinnere0be4232011-10-25 13:06:09 +020014097if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014098 ac_have_decl=1
14099else
14100 ac_have_decl=0
14101fi
14102
14103cat >>confdefs.h <<_ACEOF
14104#define HAVE_DECL_ISFINITE $ac_have_decl
14105_ACEOF
14106
14107
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014108# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14109# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14111$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014112if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014114else
14115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014117 ac_cv_tanh_preserves_zero_sign=no
14118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014120/* end confdefs.h. */
14121
14122#include <math.h>
14123#include <stdlib.h>
14124int main() {
14125 /* return 0 if either negative zeros don't exist
14126 on this platform or if negative zeros exist
14127 and tanh(-0.) == -0. */
14128 if (atan2(0., -1.) == atan2(-0., -1.) ||
14129 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14130 else exit(1);
14131}
14132
14133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014134if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014135 ac_cv_tanh_preserves_zero_sign=yes
14136else
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014141fi
14142
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014143fi
14144
Matthias Kloseb9621712010-04-24 17:59:49 +000014145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14146$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014147if test "$ac_cv_tanh_preserves_zero_sign" = yes
14148then
14149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014151
14152fi
14153
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014154if test "$ac_cv_func_log1p" = yes
14155then
14156 # On some versions of AIX, log1p(-0.) returns 0. instead of
14157 # -0. See issue #9920.
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14159$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014160 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014161 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014162else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014163
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014164 if test "$cross_compiling" = yes; then :
14165 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014166else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14168/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014169
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014170 #include <math.h>
14171 #include <stdlib.h>
14172 int main() {
14173 /* Fail if the signs of log1p(-0.) and -0. can be
14174 distinguished. */
14175 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14176 return 0;
14177 else
14178 return 1;
14179 }
14180
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014181_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014182if ac_fn_c_try_run "$LINENO"; then :
14183 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014184else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014185 ac_cv_log1p_drops_zero_sign=yes
14186fi
14187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014190
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014191fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014192
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14194$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14195fi
14196if test "$ac_cv_log1p_drops_zero_sign" = yes
14197then
14198
14199$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14200
14201fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014202
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014203LIBS=$LIBS_SAVE
14204
Mark Dickinsona614f042009-11-28 12:48:43 +000014205# For multiprocessing module, check that sem_open
14206# actually works. For FreeBSD versions <= 7.2,
14207# the kernel module that provides POSIX semaphores
14208# isn't loaded by default, so an attempt to call
14209# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14211$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014212if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014214else
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014216 ac_cv_posix_semaphores_enabled=yes
14217else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014219/* end confdefs.h. */
14220
14221#include <unistd.h>
14222#include <fcntl.h>
14223#include <stdio.h>
14224#include <semaphore.h>
14225#include <sys/stat.h>
14226
14227int main(void) {
14228 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14229 if (a == SEM_FAILED) {
14230 perror("sem_open");
14231 return 1;
14232 }
14233 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014234 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014235 return 0;
14236}
14237
14238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014239if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014240 ac_cv_posix_semaphores_enabled=yes
14241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14245 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014246fi
14247
14248
Mark Dickinsona614f042009-11-28 12:48:43 +000014249fi
14250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14252$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014253if test $ac_cv_posix_semaphores_enabled = no
14254then
14255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014257
14258fi
14259
Mark Dickinson10683072009-04-18 21:18:19 +000014260# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14262$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014263if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014265else
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014268else
Matthias Kloseb9621712010-04-24 17:59:49 +000014269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014270/* end confdefs.h. */
14271
14272#include <unistd.h>
14273#include <fcntl.h>
14274#include <stdio.h>
14275#include <semaphore.h>
14276#include <sys/stat.h>
14277
14278int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014279 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014280 int count;
14281 int res;
14282 if(a==SEM_FAILED){
14283 perror("sem_open");
14284 return 1;
14285
14286 }
14287 res = sem_getvalue(a, &count);
14288 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014289 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014290 return res==-1 ? 1 : 0;
14291}
14292
Mark Dickinson10683072009-04-18 21:18:19 +000014293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014294if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014295 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014296else
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14300 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014301fi
14302
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014303
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014304fi
14305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14307$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308if test $ac_cv_broken_sem_getvalue = yes
14309then
14310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014312
14313fi
14314
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014315ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14316"
14317if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14318 ac_have_decl=1
14319else
14320 ac_have_decl=0
14321fi
14322
14323cat >>confdefs.h <<_ACEOF
14324#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14325_ACEOF
14326ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14327"
14328if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14329 ac_have_decl=1
14330else
14331 ac_have_decl=0
14332fi
14333
14334cat >>confdefs.h <<_ACEOF
14335#define HAVE_DECL_RTLD_NOW $ac_have_decl
14336_ACEOF
14337ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14338"
14339if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14340 ac_have_decl=1
14341else
14342 ac_have_decl=0
14343fi
14344
14345cat >>confdefs.h <<_ACEOF
14346#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14347_ACEOF
14348ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14349"
14350if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14351 ac_have_decl=1
14352else
14353 ac_have_decl=0
14354fi
14355
14356cat >>confdefs.h <<_ACEOF
14357#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14358_ACEOF
14359ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14360"
14361if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14362 ac_have_decl=1
14363else
14364 ac_have_decl=0
14365fi
14366
14367cat >>confdefs.h <<_ACEOF
14368#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14369_ACEOF
14370ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14371"
14372if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14373 ac_have_decl=1
14374else
14375 ac_have_decl=0
14376fi
14377
14378cat >>confdefs.h <<_ACEOF
14379#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14380_ACEOF
14381ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14382"
14383if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14384 ac_have_decl=1
14385else
14386 ac_have_decl=0
14387fi
14388
14389cat >>confdefs.h <<_ACEOF
14390#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14391_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014392ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14393"
14394if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14395 ac_have_decl=1
14396else
14397 ac_have_decl=0
14398fi
14399
14400cat >>confdefs.h <<_ACEOF
14401#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14402_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014403
14404
Mark Dickinsonbd792642009-03-18 20:06:12 +000014405# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14407$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014408# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014409if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014410 enableval=$enable_big_digits; case $enable_big_digits in
14411yes)
14412 enable_big_digits=30 ;;
14413no)
14414 enable_big_digits=15 ;;
1441515|30)
14416 ;;
14417*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014418 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 +000014419esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14421$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014422
14423cat >>confdefs.h <<_ACEOF
14424#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14425_ACEOF
14426
14427
14428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14430$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014431fi
14432
14433
Guido van Rossumef2255b2000-03-10 22:30:29 +000014434# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014435ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014436if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014441 wchar_h="yes"
14442
Guido van Rossumef2255b2000-03-10 22:30:29 +000014443else
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014445
14446fi
14447
Michael W. Hudson54241132001-12-07 15:38:26 +000014448
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014450# determine wchar_t size
14451if test "$wchar_h" = yes
14452then
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14456# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14458$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014459if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14463"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
Martin v. Löwis11437992002-04-12 09:54:03 +000014465else
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 if test "$ac_cv_type_wchar_t" = yes; then
14467 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014469as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014470See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 else
14472 ac_cv_sizeof_wchar_t=0
14473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014475
Martin v. Löwis11437992002-04-12 09:54:03 +000014476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14478$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479
14480
14481
Martin v. Löwis11437992002-04-12 09:54:03 +000014482cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014483#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014484_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014485
Michael W. Hudson54241132001-12-07 15:38:26 +000014486
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014487fi
14488
Matthias Kloseb9621712010-04-24 17:59:49 +000014489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14490$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014491have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014493/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014494
14495#include <tcl.h>
14496#if TCL_UTF_MAX != 6
14497# error "NOT UCS4_TCL"
14498#endif
14499int
14500main ()
14501{
14502
14503 ;
14504 return 0;
14505}
14506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014508
14509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014511
14512 have_ucs4_tcl=yes
14513
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14517$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014518
Skip Montanaro6dead952003-09-25 14:50:04 +000014519# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014520if test "$wchar_h" = yes
14521then
14522 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14524$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014525 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014527else
14528
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014530 ac_cv_wchar_t_signed=yes
14531else
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014533/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014534
14535 #include <wchar.h>
14536 int main()
14537 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014538 /* Success: exit code 0 */
14539 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014540 }
14541
14542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014543if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014544 ac_cv_wchar_t_signed=yes
14545else
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14549 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014550fi
14551
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014552fi
14553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14555$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556fi
14557
Georg Brandl52d168a2008-01-07 18:10:24 +000014558# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014559if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014560 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014561then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014562 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014563
Matthias Kloseb9621712010-04-24 17:59:49 +000014564$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
Georg Brandl52d168a2008-01-07 18:10:24 +000014566else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014567 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014568fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14570$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014571
14572# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14574$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014575if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 ac_cv_c_bigendian=unknown
14579 # See if we're dealing with a universal compiler.
14580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14581/* end confdefs.h. */
14582#ifndef __APPLE_CC__
14583 not a universal capable compiler
14584 #endif
14585 typedef int dummy;
14586
Skip Montanaro6dead952003-09-25 14:50:04 +000014587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014588if ac_fn_c_try_compile "$LINENO"; then :
14589
14590 # Check for potential -arch flags. It is not universal unless
14591 # there are at least two -arch flags with different values.
14592 ac_arch=
14593 ac_prev=
14594 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14595 if test -n "$ac_prev"; then
14596 case $ac_word in
14597 i?86 | x86_64 | ppc | ppc64)
14598 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14599 ac_arch=$ac_word
14600 else
14601 ac_cv_c_bigendian=universal
14602 break
14603 fi
14604 ;;
14605 esac
14606 ac_prev=
14607 elif test "x$ac_word" = "x-arch"; then
14608 ac_prev=arch
14609 fi
14610 done
14611fi
14612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14613 if test $ac_cv_c_bigendian = unknown; then
14614 # See if sys/param.h defines the BYTE_ORDER macro.
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014616/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014617#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620int
14621main ()
14622{
Matthias Kloseb9621712010-04-24 17:59:49 +000014623#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14624 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14625 && LITTLE_ENDIAN)
14626 bogus endian macros
14627 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014628
14629 ;
14630 return 0;
14631}
14632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014633if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014634 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014636/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014637#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014638 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014639
Martin v. Löwis11437992002-04-12 09:54:03 +000014640int
14641main ()
14642{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014643#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 not big endian
14645 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014646
14647 ;
14648 return 0;
14649}
14650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014651if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014652 ac_cv_c_bigendian=yes
14653else
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014657fi
14658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14659 fi
14660 if test $ac_cv_c_bigendian = unknown; then
14661 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014663/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014664#include <limits.h>
14665
Martin v. Löwis11437992002-04-12 09:54:03 +000014666int
14667main ()
14668{
Matthias Kloseb9621712010-04-24 17:59:49 +000014669#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14670 bogus endian macros
14671 #endif
14672
Martin v. Löwis11437992002-04-12 09:54:03 +000014673 ;
14674 return 0;
14675}
14676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014677if ac_fn_c_try_compile "$LINENO"; then :
14678 # It does; now see whether it defined to _BIG_ENDIAN or not.
14679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14680/* end confdefs.h. */
14681#include <limits.h>
14682
14683int
14684main ()
14685{
14686#ifndef _BIG_ENDIAN
14687 not big endian
14688 #endif
14689
14690 ;
14691 return 0;
14692}
14693_ACEOF
14694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014695 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014696else
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14700fi
14701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14702 fi
14703 if test $ac_cv_c_bigendian = unknown; then
14704 # Compile a test program.
14705 if test "$cross_compiling" = yes; then :
14706 # Try to guess by grepping values from an object file.
14707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14708/* end confdefs.h. */
14709short int ascii_mm[] =
14710 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14711 short int ascii_ii[] =
14712 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14713 int use_ascii (int i) {
14714 return ascii_mm[i] + ascii_ii[i];
14715 }
14716 short int ebcdic_ii[] =
14717 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14718 short int ebcdic_mm[] =
14719 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14720 int use_ebcdic (int i) {
14721 return ebcdic_mm[i] + ebcdic_ii[i];
14722 }
14723 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724
Matthias Kloseb9621712010-04-24 17:59:49 +000014725int
14726main ()
14727{
14728return use_ascii (foo) == use_ebcdic (foo);
14729 ;
14730 return 0;
14731}
14732_ACEOF
14733if ac_fn_c_try_compile "$LINENO"; then :
14734 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14735 ac_cv_c_bigendian=yes
14736 fi
14737 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14738 if test "$ac_cv_c_bigendian" = unknown; then
14739 ac_cv_c_bigendian=no
14740 else
14741 # finding both strings is unlikely to happen, but who knows?
14742 ac_cv_c_bigendian=unknown
14743 fi
14744 fi
14745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014747else
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014749/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014751int
14752main ()
14753{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 /* Are we little or big endian? From Harbison&Steele. */
14756 union
14757 {
14758 long int l;
14759 char c[sizeof (long int)];
14760 } u;
14761 u.l = 1;
14762 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763
14764 ;
14765 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014766}
Martin v. Löwis11437992002-04-12 09:54:03 +000014767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014768if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014769 ac_cv_c_bigendian=no
14770else
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14780$as_echo "$ac_cv_c_bigendian" >&6; }
14781 case $ac_cv_c_bigendian in #(
14782 yes)
14783 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14784;; #(
14785 no)
14786 ;; #(
14787 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 ;; #(
14792 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014793 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014794 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014796
Michael W. Hudson54241132001-12-07 15:38:26 +000014797
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014798# ABI version string for Python extension modules. This appears between the
14799# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14800# from the following attributes which affect the ABI of this Python build (in
14801# this order):
14802#
14803# * The Python implementation (always 'cpython-' for us)
14804# * The major and minor version numbers
14805# * --with-pydebug (adds a 'd')
14806# * --with-pymalloc (adds a 'm')
14807# * --with-wide-unicode (adds a 'u')
14808#
14809# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014810# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14811# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014812
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14814$as_echo_n "checking ABIFLAGS... " >&6; }
14815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14816$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14818$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014819SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14821$as_echo "$SOABI" >&6; }
14822
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014823
14824case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014825 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014826 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14827 *)
14828 EXT_SUFFIX=${SHLIB_SUFFIX};;
14829esac
14830
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14832$as_echo_n "checking LDVERSION... " >&6; }
14833LDVERSION='$(VERSION)$(ABIFLAGS)'
14834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14835$as_echo "$LDVERSION" >&6; }
14836
doko@python.org87421192013-01-26 11:39:31 +010014837
doko@ubuntu.com55532312016-06-14 08:55:19 +020014838if test x$PLATFORM_TRIPLET = x; then
14839 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14840else
14841 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14842fi
doko@python.org87421192013-01-26 11:39:31 +010014843
14844
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014845# Check whether right shifting a negative integer extends the sign bit
14846# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14848$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014849if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014851else
Martin v. Löwis11437992002-04-12 09:54:03 +000014852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014854 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014855else
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014857/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014858
14859int main()
14860{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014861 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014862}
14863
Martin v. Löwis11437992002-04-12 09:54:03 +000014864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014865if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014866 ac_cv_rshift_extends_sign=yes
14867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014872fi
14873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874fi
14875
Matthias Kloseb9621712010-04-24 17:59:49 +000014876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14877$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014878if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014879then
Martin v. Löwis11437992002-04-12 09:54:03 +000014880
Matthias Kloseb9621712010-04-24 17:59:49 +000014881$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014882
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014883fi
14884
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014885# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14887$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014888if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014890else
Martin v. Löwis11437992002-04-12 09:54:03 +000014891
Matthias Kloseb9621712010-04-24 17:59:49 +000014892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014893/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014894#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014895int
14896main ()
14897{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014898
14899 FILE *f = fopen("/dev/null", "r");
14900 flockfile(f);
14901 getc_unlocked(f);
14902 funlockfile(f);
14903
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 ;
14905 return 0;
14906}
14907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014908if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014909 ac_cv_have_getc_unlocked=yes
14910else
Matthias Kloseb9621712010-04-24 17:59:49 +000014911 ac_cv_have_getc_unlocked=no
14912fi
14913rm -f core conftest.err conftest.$ac_objext \
14914 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14918$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014919if test "$ac_cv_have_getc_unlocked" = yes
14920then
Martin v. Löwis11437992002-04-12 09:54:03 +000014921
Matthias Kloseb9621712010-04-24 17:59:49 +000014922$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014923
14924fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014925
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014926# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014927# save the value of LIBS so we don't actually link Python with readline
14928LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014929
Gregory P. Smith18820942008-09-07 06:24:49 +000014930# On some systems we need to link readline to a termcap compatible
14931# library. NOTE: Keep the precedence of listed libraries synchronised
14932# with setup.py.
14933py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14935$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014936for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014937 if test -z "$py_libtermcap"; then
14938 READLINE_LIBS="-lreadline"
14939 else
14940 READLINE_LIBS="-lreadline -l$py_libtermcap"
14941 fi
14942 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014944/* end confdefs.h. */
14945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946/* Override any GCC internal prototype to avoid an error.
14947 Use char because int might match the return type of a GCC
14948 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014949#ifdef __cplusplus
14950extern "C"
14951#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014952char readline ();
14953int
14954main ()
14955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014957 ;
14958 return 0;
14959}
14960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014961if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014962 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014964rm -f core conftest.err conftest.$ac_objext \
14965 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014966 if test $py_cv_lib_readline = yes; then
14967 break
14968 fi
14969done
14970# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14971#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014972if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14974$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014975else
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14977$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014978
Matthias Kloseb9621712010-04-24 17:59:49 +000014979$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014980
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014981fi
14982
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014983# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014985/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014986#include <readline/readline.h>
14987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014988if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014989 have_readline=yes
14990else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014991 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014992
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014993fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014994rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014995if test $have_readline = yes
14996then
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014998/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014999#include <readline/readline.h>
15000
15001_ACEOF
15002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015004
Matthias Kloseb9621712010-04-24 17:59:49 +000015005$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015006
15007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015008rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015009
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015011/* end confdefs.h. */
15012#include <readline/readline.h>
15013
15014_ACEOF
15015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015017
Matthias Kloseb9621712010-04-24 17:59:49 +000015018$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015019
15020fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015021rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015022
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015023fi
15024
Martin v. Löwis0daad592001-09-30 21:09:59 +000015025# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15027$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015028if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015030else
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015032LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036/* Override any GCC internal prototype to avoid an error.
15037 Use char because int might match the return type of a GCC
15038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015039#ifdef __cplusplus
15040extern "C"
15041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015042char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015043int
15044main ()
15045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 ;
15048 return 0;
15049}
15050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015053else
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015056rm -f core conftest.err conftest.$ac_objext \
15057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015058LIBS=$ac_check_lib_save_LIBS
15059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15061$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015062if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015063
Matthias Kloseb9621712010-04-24 17:59:49 +000015064$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015065
Martin v. Löwis0daad592001-09-30 21:09:59 +000015066fi
15067
Michael W. Hudson54241132001-12-07 15:38:26 +000015068
Thomas Wouters89d996e2007-09-08 17:39:28 +000015069# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15071$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015072if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015074else
15075 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015076LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015078/* end confdefs.h. */
15079
15080/* Override any GCC internal prototype to avoid an error.
15081 Use char because int might match the return type of a GCC
15082 builtin and then its argument prototype would still apply. */
15083#ifdef __cplusplus
15084extern "C"
15085#endif
15086char rl_completion_display_matches_hook ();
15087int
15088main ()
15089{
15090return rl_completion_display_matches_hook ();
15091 ;
15092 return 0;
15093}
15094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015095if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015096 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15097else
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015100rm -f core conftest.err conftest.$ac_objext \
15101 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015102LIBS=$ac_check_lib_save_LIBS
15103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15105$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015106if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015107
Matthias Kloseb9621712010-04-24 17:59:49 +000015108$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015109
15110fi
15111
15112
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015113# also in 4.0, but not in editline
15114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15115$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15116if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15117 $as_echo_n "(cached) " >&6
15118else
15119 ac_check_lib_save_LIBS=$LIBS
15120LIBS="-lreadline $READLINE_LIBS $LIBS"
15121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15122/* end confdefs.h. */
15123
15124/* Override any GCC internal prototype to avoid an error.
15125 Use char because int might match the return type of a GCC
15126 builtin and then its argument prototype would still apply. */
15127#ifdef __cplusplus
15128extern "C"
15129#endif
15130char rl_resize_terminal ();
15131int
15132main ()
15133{
15134return rl_resize_terminal ();
15135 ;
15136 return 0;
15137}
15138_ACEOF
15139if ac_fn_c_try_link "$LINENO"; then :
15140 ac_cv_lib_readline_rl_resize_terminal=yes
15141else
15142 ac_cv_lib_readline_rl_resize_terminal=no
15143fi
15144rm -f core conftest.err conftest.$ac_objext \
15145 conftest$ac_exeext conftest.$ac_ext
15146LIBS=$ac_check_lib_save_LIBS
15147fi
15148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15149$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15150if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15151
15152$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15153
15154fi
15155
15156
Martin v. Löwis0daad592001-09-30 21:09:59 +000015157# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15159$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015160if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015162else
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015164LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168/* Override any GCC internal prototype to avoid an error.
15169 Use char because int might match the return type of a GCC
15170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015171#ifdef __cplusplus
15172extern "C"
15173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015174char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015175int
15176main ()
15177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 ;
15180 return 0;
15181}
15182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015185else
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015188rm -f core conftest.err conftest.$ac_objext \
15189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015190LIBS=$ac_check_lib_save_LIBS
15191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15193$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015194if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015195
Matthias Kloseb9621712010-04-24 17:59:49 +000015196$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015197
Guido van Rossum353ae582001-07-10 16:45:32 +000015198fi
15199
Jack Jansendd19cf82001-12-06 22:36:17 +000015200
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015201# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015203/* end confdefs.h. */
15204#include <readline/readline.h>
15205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015206if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015207 have_readline=yes
15208else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015209 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015210
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015211fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015212rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015213if test $have_readline = yes
15214then
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015216/* end confdefs.h. */
15217#include <readline/readline.h>
15218
15219_ACEOF
15220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015224
15225fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015226rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015227
15228fi
15229
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15231$as_echo_n "checking for append_history in -lreadline... " >&6; }
15232if ${ac_cv_lib_readline_append_history+:} false; then :
15233 $as_echo_n "(cached) " >&6
15234else
15235 ac_check_lib_save_LIBS=$LIBS
15236LIBS="-lreadline $READLINE_LIBS $LIBS"
15237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15238/* end confdefs.h. */
15239
15240/* Override any GCC internal prototype to avoid an error.
15241 Use char because int might match the return type of a GCC
15242 builtin and then its argument prototype would still apply. */
15243#ifdef __cplusplus
15244extern "C"
15245#endif
15246char append_history ();
15247int
15248main ()
15249{
15250return append_history ();
15251 ;
15252 return 0;
15253}
15254_ACEOF
15255if ac_fn_c_try_link "$LINENO"; then :
15256 ac_cv_lib_readline_append_history=yes
15257else
15258 ac_cv_lib_readline_append_history=no
15259fi
15260rm -f core conftest.err conftest.$ac_objext \
15261 conftest$ac_exeext conftest.$ac_ext
15262LIBS=$ac_check_lib_save_LIBS
15263fi
15264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15265$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15266if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15267
15268$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15269
15270fi
15271
15272
Martin v. Löwis82bca632006-02-10 20:49:30 +000015273# End of readline checks: restore LIBS
15274LIBS=$LIBS_no_readline
15275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15277$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015278if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015280else
Martin v. Löwis11437992002-04-12 09:54:03 +000015281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015283 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015284else
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015286/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015287
15288int main()
15289{
15290 int val1 = nice(1);
15291 if (val1 != -1 && val1 == nice(2))
15292 exit(0);
15293 exit(1);
15294}
15295
Martin v. Löwis11437992002-04-12 09:54:03 +000015296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015297if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015298 ac_cv_broken_nice=yes
15299else
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15303 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015304fi
15305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306fi
15307
Matthias Kloseb9621712010-04-24 17:59:49 +000015308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15309$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015310if test "$ac_cv_broken_nice" = yes
15311then
Martin v. Löwis11437992002-04-12 09:54:03 +000015312
Matthias Kloseb9621712010-04-24 17:59:49 +000015313$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015314
15315fi
15316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15318$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015319if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015320 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015323 ac_cv_broken_poll=no
15324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015326/* end confdefs.h. */
15327
15328#include <poll.h>
15329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015330int main()
15331{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015332 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015333 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015334
15335 close (42);
15336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015337 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015338 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015339 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015340 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015341 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015342 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015343 return 1;
15344}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015345
15346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015347if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015348 ac_cv_broken_poll=yes
15349else
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15353 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015356fi
15357
Matthias Kloseb9621712010-04-24 17:59:49 +000015358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15359$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015360if test "$ac_cv_broken_poll" = yes
15361then
15362
Matthias Kloseb9621712010-04-24 17:59:49 +000015363$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015364
15365fi
15366
Brett Cannon43802422005-02-10 20:48:03 +000015367# 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 +000015368# (which is not required by ISO C or UNIX spec) and/or if we support
15369# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015370ac_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 +000015371#include <$ac_cv_struct_tm>
15372
Matthias Kloseb9621712010-04-24 17:59:49 +000015373"
Victor Stinnere0be4232011-10-25 13:06:09 +020015374if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015375
15376cat >>confdefs.h <<_ACEOF
15377#define HAVE_STRUCT_TM_TM_ZONE 1
15378_ACEOF
15379
15380
15381fi
15382
15383if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15384
Matthias Kloseb9621712010-04-24 17:59:49 +000015385$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015386
15387else
Matthias Kloseb9621712010-04-24 17:59:49 +000015388 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15389"
Victor Stinnere0be4232011-10-25 13:06:09 +020015390if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015391 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392else
Matthias Kloseb9621712010-04-24 17:59:49 +000015393 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394fi
15395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015397#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398_ACEOF
15399
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15401$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015402if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404else
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015406/* end confdefs.h. */
15407#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015408#if !HAVE_DECL_TZNAME
15409extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015410#endif
15411
15412int
15413main ()
15414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015416 ;
15417 return 0;
15418}
15419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015420if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015421 ac_cv_var_tzname=yes
15422else
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015425rm -f core conftest.err conftest.$ac_objext \
15426 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15429$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015430 if test $ac_cv_var_tzname = yes; then
15431
Matthias Kloseb9621712010-04-24 17:59:49 +000015432$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015433
15434 fi
15435fi
15436
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015437
Martin v. Löwis1d459062005-03-14 21:23:33 +000015438# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15440$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015441if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015443else
15444
Matthias Kloseb9621712010-04-24 17:59:49 +000015445if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015446 ac_cv_working_tzset=no
15447else
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015449/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015450
15451#include <stdlib.h>
15452#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015453#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015454
15455#if HAVE_TZNAME
15456extern char *tzname[];
15457#endif
15458
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015459int main()
15460{
Brett Cannon18367812003-09-19 00:59:16 +000015461 /* Note that we need to ensure that not only does tzset(3)
15462 do 'something' with localtime, but it works as documented
15463 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015464 This includes making sure that tzname is set properly if
15465 tm->tm_zone does not exist since it is the alternative way
15466 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015467
15468 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015469 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015470 */
15471
Martin v. Löwis1d459062005-03-14 21:23:33 +000015472 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015473 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15474
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015475 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015476 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015477 if (localtime(&groundhogday)->tm_hour != 0)
15478 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015479#if HAVE_TZNAME
15480 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15481 if (strcmp(tzname[0], "UTC") ||
15482 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15483 exit(1);
15484#endif
Brett Cannon18367812003-09-19 00:59:16 +000015485
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015486 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015487 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015488 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015489 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015490#if HAVE_TZNAME
15491 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15492 exit(1);
15493#endif
Brett Cannon18367812003-09-19 00:59:16 +000015494
15495 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15496 tzset();
15497 if (localtime(&groundhogday)->tm_hour != 11)
15498 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015499#if HAVE_TZNAME
15500 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15501 exit(1);
15502#endif
15503
15504#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015505 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15506 exit(1);
15507 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15508 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015509#endif
Brett Cannon18367812003-09-19 00:59:16 +000015510
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015511 exit(0);
15512}
15513
15514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015515if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015516 ac_cv_working_tzset=yes
15517else
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015522fi
15523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524fi
15525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15527$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015528if test "$ac_cv_working_tzset" = yes
15529then
15530
Matthias Kloseb9621712010-04-24 17:59:49 +000015531$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015532
15533fi
15534
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015535# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15537$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015538if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015540else
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015543#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015544int
15545main ()
15546{
15547
15548struct stat st;
15549st.st_mtim.tv_nsec = 1;
15550
15551 ;
15552 return 0;
15553}
15554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015556 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015557else
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15561fi
15562
Matthias Kloseb9621712010-04-24 17:59:49 +000015563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15564$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015565if test "$ac_cv_stat_tv_nsec" = yes
15566then
15567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015569
15570fi
15571
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015572# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15574$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015575if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015577else
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015579/* end confdefs.h. */
15580#include <sys/stat.h>
15581int
15582main ()
15583{
15584
15585struct stat st;
15586st.st_mtimespec.tv_nsec = 1;
15587
15588 ;
15589 return 0;
15590}
15591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015593 ac_cv_stat_tv_nsec2=yes
15594else
Matthias Kloseb9621712010-04-24 17:59:49 +000015595 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15598fi
15599
Matthias Kloseb9621712010-04-24 17:59:49 +000015600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15601$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015602if test "$ac_cv_stat_tv_nsec2" = yes
15603then
15604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015606
15607fi
15608
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015609# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015610ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015611if test "$cross_compiling" = no; then
15612 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15613fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015614
15615for ac_header in curses.h ncurses.h
15616do :
15617 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15618ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15619if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15620 cat >>confdefs.h <<_ACEOF
15621#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15622_ACEOF
15623
15624fi
15625
15626done
15627
15628
15629# On Solaris, term.h requires curses.h
15630for ac_header in term.h
15631do :
15632 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15633#ifdef HAVE_CURSES_H
15634#include <curses.h>
15635#endif
15636
15637"
15638if test "x$ac_cv_header_term_h" = xyes; then :
15639 cat >>confdefs.h <<_ACEOF
15640#define HAVE_TERM_H 1
15641_ACEOF
15642
15643fi
15644
15645done
15646
15647
Jack Jansen666b1e72001-10-31 12:11:48 +000015648# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15650$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015655/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015656#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015657int
15658main ()
15659{
Jack Jansen666b1e72001-10-31 12:11:48 +000015660
15661 int rtn;
15662 rtn = mvwdelch(0,0,0);
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 ;
15665 return 0;
15666}
15667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015668if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015669 ac_cv_mvwdelch_is_expression=yes
15670else
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15674fi
15675
Matthias Kloseb9621712010-04-24 17:59:49 +000015676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15677$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015678
15679if test "$ac_cv_mvwdelch_is_expression" = yes
15680then
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015683
15684fi
15685
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015686# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15687# structs since version 5.7. If the macro is defined as zero before including
15688# [n]curses.h, ncurses will expose fields of the structs regardless of the
15689# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15691$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015692if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015694else
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015696/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015697
15698 #define NCURSES_OPAQUE 0
15699 #include <curses.h>
15700
Martin v. Löwis11437992002-04-12 09:54:03 +000015701int
15702main ()
15703{
Jack Jansen666b1e72001-10-31 12:11:48 +000015704
15705 WINDOW *w;
15706 w->_flags = 0;
15707
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 ;
15709 return 0;
15710}
15711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015713 ac_cv_window_has_flags=yes
15714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15718fi
15719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15721$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015722
Jack Jansen666b1e72001-10-31 12:11:48 +000015723
15724if test "$ac_cv_window_has_flags" = yes
15725then
Martin v. Löwis11437992002-04-12 09:54:03 +000015726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015728
15729fi
15730
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15732$as_echo_n "checking for is_pad... " >&6; }
15733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15734/* end confdefs.h. */
15735#include <curses.h>
15736int
15737main ()
15738{
15739
15740#ifndef is_pad
15741void *x=is_pad
15742#endif
15743
15744 ;
15745 return 0;
15746}
15747_ACEOF
15748if ac_fn_c_try_compile "$LINENO"; then :
15749
15750$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15751
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15753$as_echo "yes" >&6; }
15754else
15755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15756$as_echo "no" >&6; }
15757
15758fi
15759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15762$as_echo_n "checking for is_term_resized... " >&6; }
15763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015764/* end confdefs.h. */
15765#include <curses.h>
15766int
15767main ()
15768{
15769void *x=is_term_resized
15770 ;
15771 return 0;
15772}
15773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015774if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015777
Matthias Kloseb159a552010-04-25 21:00:44 +000015778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015779$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015780else
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15782$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015783
15784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15786
Matthias Kloseb9621712010-04-24 17:59:49 +000015787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15788$as_echo_n "checking for resize_term... " >&6; }
15789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015790/* end confdefs.h. */
15791#include <curses.h>
15792int
15793main ()
15794{
15795void *x=resize_term
15796 ;
15797 return 0;
15798}
15799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015800if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015803
Matthias Kloseb159a552010-04-25 21:00:44 +000015804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015805$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015806else
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15808$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015809
15810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15814$as_echo_n "checking for resizeterm... " >&6; }
15815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015816/* end confdefs.h. */
15817#include <curses.h>
15818int
15819main ()
15820{
15821void *x=resizeterm
15822 ;
15823 return 0;
15824}
15825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015826if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015829
Matthias Kloseb159a552010-04-25 21:00:44 +000015830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015831$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015832else
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15834$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015835
15836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015838
15839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15840$as_echo_n "checking for immedok... " >&6; }
15841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15842/* end confdefs.h. */
15843#include <curses.h>
15844int
15845main ()
15846{
15847
15848#ifndef immedok
15849void *x=immedok
15850#endif
15851
15852 ;
15853 return 0;
15854}
15855_ACEOF
15856if ac_fn_c_try_compile "$LINENO"; then :
15857
15858$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15859
15860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15861$as_echo "yes" >&6; }
15862else
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15864$as_echo "no" >&6; }
15865
15866fi
15867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15868
15869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15870$as_echo_n "checking for syncok... " >&6; }
15871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15872/* end confdefs.h. */
15873#include <curses.h>
15874int
15875main ()
15876{
15877
15878#ifndef syncok
15879void *x=syncok
15880#endif
15881
15882 ;
15883 return 0;
15884}
15885_ACEOF
15886if ac_fn_c_try_compile "$LINENO"; then :
15887
15888$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15889
15890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15891$as_echo "yes" >&6; }
15892else
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15894$as_echo "no" >&6; }
15895
15896fi
15897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15898
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15900$as_echo_n "checking for wchgat... " >&6; }
15901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15902/* end confdefs.h. */
15903#include <curses.h>
15904int
15905main ()
15906{
15907
15908#ifndef wchgat
15909void *x=wchgat
15910#endif
15911
15912 ;
15913 return 0;
15914}
15915_ACEOF
15916if ac_fn_c_try_compile "$LINENO"; then :
15917
15918$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15919
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15921$as_echo "yes" >&6; }
15922else
15923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15924$as_echo "no" >&6; }
15925
15926fi
15927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15928
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15930$as_echo_n "checking for filter... " >&6; }
15931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15932/* end confdefs.h. */
15933#include <curses.h>
15934int
15935main ()
15936{
15937
15938#ifndef filter
15939void *x=filter
15940#endif
15941
15942 ;
15943 return 0;
15944}
15945_ACEOF
15946if ac_fn_c_try_compile "$LINENO"; then :
15947
15948$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15949
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15951$as_echo "yes" >&6; }
15952else
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15954$as_echo "no" >&6; }
15955
15956fi
15957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15958
15959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15960$as_echo_n "checking for has_key... " >&6; }
15961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15962/* end confdefs.h. */
15963#include <curses.h>
15964int
15965main ()
15966{
15967
15968#ifndef has_key
15969void *x=has_key
15970#endif
15971
15972 ;
15973 return 0;
15974}
15975_ACEOF
15976if ac_fn_c_try_compile "$LINENO"; then :
15977
15978$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15979
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15981$as_echo "yes" >&6; }
15982else
15983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15984$as_echo "no" >&6; }
15985
15986fi
15987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15988
15989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15990$as_echo_n "checking for typeahead... " >&6; }
15991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15992/* end confdefs.h. */
15993#include <curses.h>
15994int
15995main ()
15996{
15997
15998#ifndef typeahead
15999void *x=typeahead
16000#endif
16001
16002 ;
16003 return 0;
16004}
16005_ACEOF
16006if ac_fn_c_try_compile "$LINENO"; then :
16007
16008$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16009
16010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16011$as_echo "yes" >&6; }
16012else
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16014$as_echo "no" >&6; }
16015
16016fi
16017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16018
16019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16020$as_echo_n "checking for use_env... " >&6; }
16021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16022/* end confdefs.h. */
16023#include <curses.h>
16024int
16025main ()
16026{
16027
16028#ifndef use_env
16029void *x=use_env
16030#endif
16031
16032 ;
16033 return 0;
16034}
16035_ACEOF
16036if ac_fn_c_try_compile "$LINENO"; then :
16037
16038$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16039
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16041$as_echo "yes" >&6; }
16042else
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16044$as_echo "no" >&6; }
16045
16046fi
16047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016048# last curses configure check
16049CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016050
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16052$as_echo "$as_me: checking for device files" >&6;}
16053
16054if test "x$cross_compiling" = xyes; then
16055 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16057$as_echo_n "checking for /dev/ptmx... " >&6; }
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16059$as_echo "not set" >&6; }
16060 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16061 fi
16062 if test "${ac_cv_file__dev_ptc+set}" != set; then
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16064$as_echo_n "checking for /dev/ptc... " >&6; }
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16066$as_echo "not set" >&6; }
16067 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16068 fi
16069fi
16070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16072$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016073if ${ac_cv_file__dev_ptmx+:} false; then :
16074 $as_echo_n "(cached) " >&6
16075else
16076 test "$cross_compiling" = yes &&
16077 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16078if test -r "/dev/ptmx"; then
16079 ac_cv_file__dev_ptmx=yes
16080else
16081 ac_cv_file__dev_ptmx=no
16082fi
16083fi
16084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16085$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16086if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016087
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016088fi
16089
16090if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016091
Matthias Kloseb9621712010-04-24 17:59:49 +000016092$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016093
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16096$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016097if ${ac_cv_file__dev_ptc+:} false; then :
16098 $as_echo_n "(cached) " >&6
16099else
16100 test "$cross_compiling" = yes &&
16101 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16102if test -r "/dev/ptc"; then
16103 ac_cv_file__dev_ptc=yes
16104else
16105 ac_cv_file__dev_ptc=no
16106fi
16107fi
16108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16109$as_echo "$ac_cv_file__dev_ptc" >&6; }
16110if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016111
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016112fi
16113
16114if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016115
Matthias Kloseb9621712010-04-24 17:59:49 +000016116$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016117
Neal Norwitz865400f2003-03-21 01:42:58 +000016118fi
16119
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016120if test $ac_sys_system = Darwin
16121then
16122 LIBS="$LIBS -framework CoreFoundation"
16123fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016124
Matthias Kloseb9621712010-04-24 17:59:49 +000016125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16126$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016127if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016128 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016129else
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016131 ac_cv_have_size_t_format="cross -- assuming yes"
16132
Thomas Wouters477c8d52006-05-27 19:21:47 +000016133else
Matthias Kloseb9621712010-04-24 17:59:49 +000016134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016135/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016136
Thomas Wouters477c8d52006-05-27 19:21:47 +000016137#include <stdio.h>
16138#include <stddef.h>
16139#include <string.h>
16140
Christian Heimes2c181612007-12-17 20:04:13 +000016141#ifdef HAVE_SYS_TYPES_H
16142#include <sys/types.h>
16143#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016144
16145#ifdef HAVE_SSIZE_T
16146typedef ssize_t Py_ssize_t;
16147#elif SIZEOF_VOID_P == SIZEOF_LONG
16148typedef long Py_ssize_t;
16149#else
16150typedef int Py_ssize_t;
16151#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016152
Christian Heimes2c181612007-12-17 20:04:13 +000016153int main()
16154{
16155 char buffer[256];
16156
Thomas Wouters477c8d52006-05-27 19:21:47 +000016157 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16158 return 1;
16159
Thomas Wouters89f507f2006-12-13 04:49:30 +000016160 if (strcmp(buffer, "123"))
16161 return 1;
16162
16163 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16164 return 1;
16165
16166 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016167 return 1;
16168
16169 return 0;
16170}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016171
Thomas Wouters477c8d52006-05-27 19:21:47 +000016172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016173if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016174 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016175else
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16179 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016180fi
16181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016182fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16184$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016185if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016186
Matthias Kloseb9621712010-04-24 17:59:49 +000016187$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016188
16189fi
16190
Matthias Kloseb9621712010-04-24 17:59:49 +000016191ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016192#ifdef HAVE_SYS_TYPES_H
16193#include <sys/types.h>
16194#endif
16195#ifdef HAVE_SYS_SOCKET_H
16196#include <sys/socket.h>
16197#endif
16198
Matthias Kloseb9621712010-04-24 17:59:49 +000016199"
Victor Stinnere0be4232011-10-25 13:06:09 +020016200if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016201
Martin v. Löwis11437992002-04-12 09:54:03 +000016202else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016203
Matthias Kloseb9621712010-04-24 17:59:49 +000016204$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016205
16206fi
16207
Michael W. Hudson54241132001-12-07 15:38:26 +000016208
Matthias Kloseb9621712010-04-24 17:59:49 +000016209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16210$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016211if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016212 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016213else
Matthias Kloseb9621712010-04-24 17:59:49 +000016214 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016215 ac_cv_broken_mbstowcs=no
16216else
Matthias Kloseb9621712010-04-24 17:59:49 +000016217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016218/* end confdefs.h. */
16219
Stefan Krah19c21392012-11-22 23:47:32 +010016220#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016221#include<stdlib.h>
16222int main() {
16223 size_t len = -1;
16224 const char *str = "text";
16225 len = mbstowcs(NULL, str, 0);
16226 return (len != 4);
16227}
16228
16229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016230if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016231 ac_cv_broken_mbstowcs=no
16232else
Matthias Kloseb9621712010-04-24 17:59:49 +000016233 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16236 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016237fi
16238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016239fi
16240
Matthias Kloseb9621712010-04-24 17:59:49 +000016241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16242$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016243if test "$ac_cv_broken_mbstowcs" = yes
16244then
16245
Matthias Kloseb9621712010-04-24 17:59:49 +000016246$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016247
16248fi
16249
Antoine Pitroub52ec782009-01-25 16:34:23 +000016250# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16252$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016253
16254# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016255if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016256 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016257if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016258then
16259
Matthias Kloseb9621712010-04-24 17:59:49 +000016260$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016261
Matthias Kloseb9621712010-04-24 17:59:49 +000016262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16263$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016264fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016265if test "$withval" = no
16266then
16267
16268$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16269
Matthias Kloseb9621712010-04-24 17:59:49 +000016270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016272fi
16273
Antoine Pitrou042b1282010-08-13 21:15:58 +000016274else
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16276$as_echo "no value specified" >&6; }
16277fi
16278
Antoine Pitroub52ec782009-01-25 16:34:23 +000016279
Matthias Kloseb17289e2012-03-15 19:51:34 +010016280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16281$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16282if ${ac_cv_computed_gotos+:} false; then :
16283 $as_echo_n "(cached) " >&6
16284else
16285 if test "$cross_compiling" = yes; then :
16286 if test "${with_computed_gotos+set}" = set; then
16287 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16288 else
16289 ac_cv_computed_gotos=no
16290 fi
16291else
16292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16293/* end confdefs.h. */
16294
16295int main(int argc, char **argv)
16296{
16297 static void *targets[1] = { &&LABEL1 };
16298 goto LABEL2;
16299LABEL1:
16300 return 0;
16301LABEL2:
16302 goto *targets[0];
16303 return 1;
16304}
16305
16306_ACEOF
16307if ac_fn_c_try_run "$LINENO"; then :
16308 ac_cv_computed_gotos=yes
16309else
16310 ac_cv_computed_gotos=no
16311fi
16312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16313 conftest.$ac_objext conftest.beam conftest.$ac_ext
16314fi
16315
16316fi
16317
16318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16319$as_echo "$ac_cv_computed_gotos" >&6; }
16320case "$ac_cv_computed_gotos" in yes*)
16321
16322$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16323
16324esac
16325
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016326case $ac_sys_system in
16327AIX*)
16328
16329$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16330 ;;
16331esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016332
Michael W. Hudson54241132001-12-07 15:38:26 +000016333
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016334
16335
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016336for h in `(cd $srcdir;echo Python/thread_*.h)`
16337do
16338 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16339done
16340
Michael W. Hudson54241132001-12-07 15:38:26 +000016341
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016342SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16344$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016345for dir in $SRCDIRS; do
16346 if test ! -d $dir; then
16347 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016348 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016349done
Matthias Kloseb9621712010-04-24 17:59:49 +000016350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16351$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016352
Stefan Krah1919b7e2012-03-21 18:25:23 +010016353# Availability of -O2:
16354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16355$as_echo_n "checking for -O2... " >&6; }
16356saved_cflags="$CFLAGS"
16357CFLAGS="-O2"
16358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16359/* end confdefs.h. */
16360
16361int
16362main ()
16363{
16364
16365
16366 ;
16367 return 0;
16368}
16369_ACEOF
16370if ac_fn_c_try_compile "$LINENO"; then :
16371 have_O2=yes
16372else
16373 have_O2=no
16374fi
16375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16377$as_echo "$have_O2" >&6; }
16378CFLAGS="$saved_cflags"
16379
16380# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16381# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16383$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16384saved_cflags="$CFLAGS"
16385CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16386if test "$have_O2" = no; then
16387 CFLAGS=""
16388fi
16389if test "$cross_compiling" = yes; then :
16390 have_glibc_memmove_bug=undefined
16391else
16392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16393/* end confdefs.h. */
16394
16395#include <stdio.h>
16396#include <stdlib.h>
16397#include <string.h>
16398void foo(void *p, void *q) { memmove(p, q, 19); }
16399int main() {
16400 char a[32] = "123456789000000000";
16401 foo(&a[9], a);
16402 if (strcmp(a, "123456789123456789000000000") != 0)
16403 return 1;
16404 foo(a, &a[9]);
16405 if (strcmp(a, "123456789000000000") != 0)
16406 return 1;
16407 return 0;
16408}
16409
16410_ACEOF
16411if ac_fn_c_try_run "$LINENO"; then :
16412 have_glibc_memmove_bug=no
16413else
16414 have_glibc_memmove_bug=yes
16415fi
16416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16417 conftest.$ac_objext conftest.beam conftest.$ac_ext
16418fi
16419
16420CFLAGS="$saved_cflags"
16421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16422$as_echo "$have_glibc_memmove_bug" >&6; }
16423if test "$have_glibc_memmove_bug" = yes; then
16424
16425$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16426
16427fi
16428
16429if test "$have_gcc_asm_for_x87" = yes; then
16430 # Some versions of gcc miscompile inline asm:
16431 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16432 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16433 case $CC in
16434 *gcc*)
16435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16436$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16437 saved_cflags="$CFLAGS"
16438 CFLAGS="-O2"
16439 if test "$cross_compiling" = yes; then :
16440 have_ipa_pure_const_bug=undefined
16441else
16442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16443/* end confdefs.h. */
16444
16445 __attribute__((noinline)) int
16446 foo(int *p) {
16447 int r;
16448 asm ( "movl \$6, (%1)\n\t"
16449 "xorl %0, %0\n\t"
16450 : "=r" (r) : "r" (p) : "memory"
16451 );
16452 return r;
16453 }
16454 int main() {
16455 int p = 8;
16456 if ((foo(&p) ? : p) != 6)
16457 return 1;
16458 return 0;
16459 }
16460
16461_ACEOF
16462if ac_fn_c_try_run "$LINENO"; then :
16463 have_ipa_pure_const_bug=no
16464else
16465 have_ipa_pure_const_bug=yes
16466fi
16467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16468 conftest.$ac_objext conftest.beam conftest.$ac_ext
16469fi
16470
16471 CFLAGS="$saved_cflags"
16472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16473$as_echo "$have_ipa_pure_const_bug" >&6; }
16474 if test "$have_ipa_pure_const_bug" = yes; then
16475
16476$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16477
16478 fi
16479 ;;
16480 esac
16481fi
16482
Victor Stinner4f5366e2015-01-09 02:13:19 +010016483# Check for stdatomic.h
16484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16485$as_echo_n "checking for stdatomic.h... " >&6; }
16486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16487/* end confdefs.h. */
16488
16489
16490 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016491 atomic_int value = ATOMIC_VAR_INIT(1);
16492 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016493 int main() {
16494 int loaded_value = atomic_load(&value);
16495 return 0;
16496 }
16497
16498
16499_ACEOF
16500if ac_fn_c_try_link "$LINENO"; then :
16501 have_stdatomic_h=yes
16502else
16503 have_stdatomic_h=no
16504fi
16505rm -f core conftest.err conftest.$ac_objext \
16506 conftest$ac_exeext conftest.$ac_ext
16507
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16509$as_echo "$have_stdatomic_h" >&6; }
16510
16511if test "$have_stdatomic_h" = yes; then
16512
16513$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16514
16515fi
16516
16517# Check for GCC >= 4.7 __atomic builtins
16518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16519$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16521/* end confdefs.h. */
16522
16523
16524 volatile int val = 1;
16525 int main() {
16526 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16527 return 0;
16528 }
16529
16530
16531_ACEOF
16532if ac_fn_c_try_link "$LINENO"; then :
16533 have_builtin_atomic=yes
16534else
16535 have_builtin_atomic=no
16536fi
16537rm -f core conftest.err conftest.$ac_objext \
16538 conftest$ac_exeext conftest.$ac_ext
16539
16540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16541$as_echo "$have_builtin_atomic" >&6; }
16542
16543if test "$have_builtin_atomic" = yes; then
16544
16545$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16546
16547fi
16548
Ned Deily322f5ba2013-11-21 23:01:59 -080016549# ensurepip option
16550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16551$as_echo_n "checking for ensurepip... " >&6; }
16552
16553# Check whether --with-ensurepip was given.
16554if test "${with_ensurepip+set}" = set; then :
16555 withval=$with_ensurepip;
16556else
16557 with_ensurepip=upgrade
16558fi
16559
16560case $with_ensurepip in #(
16561 yes|upgrade) :
16562 ENSUREPIP=upgrade ;; #(
16563 install) :
16564 ENSUREPIP=install ;; #(
16565 no) :
16566 ENSUREPIP=no ;; #(
16567 *) :
16568 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16569esac
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16571$as_echo "$ENSUREPIP" >&6; }
16572
16573
Victor Stinner35a97c02015-03-08 02:59:09 +010016574# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16576$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16578/* end confdefs.h. */
16579
16580
16581 #include <dirent.h>
16582
16583 int main() {
16584 struct dirent entry;
16585 return entry.d_type == DT_UNKNOWN;
16586 }
16587
16588
16589_ACEOF
16590if ac_fn_c_try_link "$LINENO"; then :
16591 have_dirent_d_type=yes
16592else
16593 have_dirent_d_type=no
16594fi
16595rm -f core conftest.err conftest.$ac_objext \
16596 conftest$ac_exeext conftest.$ac_ext
16597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16598$as_echo "$have_dirent_d_type" >&6; }
16599
16600if test "$have_dirent_d_type" = yes; then
16601
16602$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16603
16604fi
16605
Victor Stinner9eb57c52015-03-19 22:21:49 +010016606# check if the Linux getrandom() syscall is available
16607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16608$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16610/* end confdefs.h. */
16611
16612
Victor Stinner1b80b242016-04-12 22:34:58 +020016613 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016614 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016615 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016616
16617 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016618 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016619 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016620 const int flags = GRND_NONBLOCK;
16621 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016622 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016623 return 0;
16624 }
16625
16626
16627_ACEOF
16628if ac_fn_c_try_link "$LINENO"; then :
16629 have_getrandom_syscall=yes
16630else
16631 have_getrandom_syscall=no
16632fi
16633rm -f core conftest.err conftest.$ac_objext \
16634 conftest$ac_exeext conftest.$ac_ext
16635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16636$as_echo "$have_getrandom_syscall" >&6; }
16637
16638if test "$have_getrandom_syscall" = yes; then
16639
16640$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16641
16642fi
16643
Victor Stinner3abf44e2015-09-18 15:38:37 +020016644# check if the getrandom() function is available
16645# the test was written for the Solaris function of <sys/random.h>
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16647$as_echo_n "checking for the getrandom() function... " >&6; }
16648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16649/* end confdefs.h. */
16650
16651
16652 #include <sys/random.h>
16653
16654 int main() {
16655 char buffer[1];
16656 const size_t buflen = sizeof(buffer);
16657 const int flags = 0;
16658 /* ignore the result, Python checks for ENOSYS at runtime */
16659 (void)getrandom(buffer, buflen, flags);
16660 return 0;
16661 }
16662
16663
16664_ACEOF
16665if ac_fn_c_try_link "$LINENO"; then :
16666 have_getrandom=yes
16667else
16668 have_getrandom=no
16669fi
16670rm -f core conftest.err conftest.$ac_objext \
16671 conftest$ac_exeext conftest.$ac_ext
16672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16673$as_echo "$have_getrandom" >&6; }
16674
16675if test "$have_getrandom" = yes; then
16676
16677$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16678
16679fi
16680
Christian Heimesff5be6e2018-01-20 13:19:21 +010016681# Check for usable OpenSSL
16682
16683 found=false
16684
16685# Check whether --with-openssl was given.
16686if test "${with_openssl+set}" = set; then :
16687 withval=$with_openssl;
16688 case "$withval" in
16689 "" | y | ye | yes | n | no)
16690 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16691 ;;
16692 *) ssldirs="$withval"
16693 ;;
16694 esac
16695
16696else
16697
16698 # if pkg-config is installed and openssl has installed a .pc file,
16699 # then use that information and don't search ssldirs
16700 if test -n "$ac_tool_prefix"; then
16701 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16702set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16704$as_echo_n "checking for $ac_word... " >&6; }
16705if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16706 $as_echo_n "(cached) " >&6
16707else
16708 if test -n "$PKG_CONFIG"; then
16709 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16710else
16711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16712for as_dir in $PATH
16713do
16714 IFS=$as_save_IFS
16715 test -z "$as_dir" && as_dir=.
16716 for ac_exec_ext in '' $ac_executable_extensions; do
16717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16718 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16720 break 2
16721 fi
16722done
16723 done
16724IFS=$as_save_IFS
16725
16726fi
16727fi
16728PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16729if test -n "$PKG_CONFIG"; then
16730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16731$as_echo "$PKG_CONFIG" >&6; }
16732else
16733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16734$as_echo "no" >&6; }
16735fi
16736
16737
16738fi
16739if test -z "$ac_cv_prog_PKG_CONFIG"; then
16740 ac_ct_PKG_CONFIG=$PKG_CONFIG
16741 # Extract the first word of "pkg-config", so it can be a program name with args.
16742set dummy pkg-config; ac_word=$2
16743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16744$as_echo_n "checking for $ac_word... " >&6; }
16745if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16746 $as_echo_n "(cached) " >&6
16747else
16748 if test -n "$ac_ct_PKG_CONFIG"; then
16749 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16750else
16751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16752for as_dir in $PATH
16753do
16754 IFS=$as_save_IFS
16755 test -z "$as_dir" && as_dir=.
16756 for ac_exec_ext in '' $ac_executable_extensions; do
16757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16758 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16760 break 2
16761 fi
16762done
16763 done
16764IFS=$as_save_IFS
16765
16766fi
16767fi
16768ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16769if test -n "$ac_ct_PKG_CONFIG"; then
16770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16771$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16772else
16773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16774$as_echo "no" >&6; }
16775fi
16776
16777 if test "x$ac_ct_PKG_CONFIG" = x; then
16778 PKG_CONFIG=""
16779 else
16780 case $cross_compiling:$ac_tool_warned in
16781yes:)
16782{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16783$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16784ac_tool_warned=yes ;;
16785esac
16786 PKG_CONFIG=$ac_ct_PKG_CONFIG
16787 fi
16788else
16789 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16790fi
16791
16792 if test x"$PKG_CONFIG" != x""; then
16793 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16794 if test $? = 0; then
16795 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16796 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16797 found=true
16798 fi
16799 fi
16800
16801 # no such luck; use some default ssldirs
16802 if ! $found; then
16803 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16804 fi
16805
16806
16807fi
16808
16809
16810
16811 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16812 # an 'openssl' subdirectory
16813
16814 if ! $found; then
16815 OPENSSL_INCLUDES=
16816 for ssldir in $ssldirs; do
16817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16818$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16819 if test -f "$ssldir/include/openssl/ssl.h"; then
16820 OPENSSL_INCLUDES="-I$ssldir/include"
16821 OPENSSL_LDFLAGS="-L$ssldir/lib"
16822 OPENSSL_LIBS="-lssl -lcrypto"
16823 found=true
16824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16825$as_echo "yes" >&6; }
16826 break
16827 else
16828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16829$as_echo "no" >&6; }
16830 fi
16831 done
16832
16833 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16834 # it will just work!
16835 fi
16836
16837 # try the preprocessor and linker with our new flags,
16838 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16839
16840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16841$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16842 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16843 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16844
16845 save_LIBS="$LIBS"
16846 save_LDFLAGS="$LDFLAGS"
16847 save_CPPFLAGS="$CPPFLAGS"
16848 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16849 LIBS="$OPENSSL_LIBS $LIBS"
16850 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16852/* end confdefs.h. */
16853#include <openssl/ssl.h>
16854int
16855main ()
16856{
16857SSL_new(NULL)
16858 ;
16859 return 0;
16860}
16861_ACEOF
16862if ac_fn_c_try_link "$LINENO"; then :
16863
16864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16865$as_echo "yes" >&6; }
16866 have_openssl=yes
16867
16868else
16869
16870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16871$as_echo "no" >&6; }
16872 have_openssl=no
16873
16874fi
16875rm -f core conftest.err conftest.$ac_objext \
16876 conftest$ac_exeext conftest.$ac_ext
16877 CPPFLAGS="$save_CPPFLAGS"
16878 LDFLAGS="$save_LDFLAGS"
16879 LIBS="$save_LIBS"
16880
16881
16882
16883
16884
16885
16886if test "$have_openssl" = yes; then
16887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16888$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16889
16890 save_LIBS="$LIBS"
16891 save_LDFLAGS="$LDFLAGS"
16892 save_CPPFLAGS="$CPPFLAGS"
16893 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16894 LIBS="$OPENSSL_LIBS $LIBS"
16895 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16896
16897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16898/* end confdefs.h. */
16899
16900 #include <openssl/x509_vfy.h>
16901
16902int
16903main ()
16904{
16905
16906 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16907 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16908 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16909 X509_VERIFY_PARAM_set_hostflags(p, 0);
16910
16911 ;
16912 return 0;
16913}
16914
16915_ACEOF
16916if ac_fn_c_try_link "$LINENO"; then :
16917
16918 ac_cv_has_x509_verify_param_set1_host=yes
16919
16920else
16921
16922 ac_cv_has_x509_verify_param_set1_host=no
16923
16924fi
16925rm -f core conftest.err conftest.$ac_objext \
16926 conftest$ac_exeext conftest.$ac_ext
16927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16928$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16929 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16930
16931$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16932
16933 fi
16934
16935 CPPFLAGS="$save_CPPFLAGS"
16936 LDFLAGS="$save_LDFLAGS"
16937 LIBS="$save_LIBS"
16938fi
16939
Christian Heimes892d66e2018-01-29 14:10:18 +010016940# ssl module default cipher suite string
16941
16942
16943
16944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16945$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16946
16947# Check whether --with-ssl-default-suites was given.
16948if test "${with_ssl_default_suites+set}" = set; then :
16949 withval=$with_ssl_default_suites;
16950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16951$as_echo "$withval" >&6; }
16952case "$withval" in
16953 python)
16954 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16955
16956 ;;
16957 openssl)
16958 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16959
16960 ;;
16961 *)
16962 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16963
16964 cat >>confdefs.h <<_ACEOF
16965#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16966_ACEOF
16967
16968 ;;
16969esac
16970
16971else
16972
16973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16974$as_echo "python" >&6; }
16975$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16976
16977
16978fi
16979
16980
16981
Guido van Rossum627b2d71993-12-24 10:39:16 +000016982# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016983ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016984
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016985ac_config_files="$ac_config_files Modules/ld_so_aix"
16986
Martin v. Löwis11437992002-04-12 09:54:03 +000016987cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016988# This file is a shell script that caches the results of configure
16989# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016990# scripts and configure runs, see configure's option --config-cache.
16991# It is not useful on other systems. If it contains results you don't
16992# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016993#
Martin v. Löwis11437992002-04-12 09:54:03 +000016994# config.status only pays attention to the cache file if you give it
16995# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016996#
Skip Montanaro6dead952003-09-25 14:50:04 +000016997# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016998# loading this file, other *unset* `ac_cv_foo' will be assigned the
16999# following values.
17000
17001_ACEOF
17002
Guido van Rossumf78abae1997-01-21 22:02:36 +000017003# The following way of writing the cache mishandles newlines in values,
17004# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017006# Ultrix sh set writes to stderr and can't be redirected directly,
17007# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008(
17009 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17010 eval ac_val=\$$ac_var
17011 case $ac_val in #(
17012 *${as_nl}*)
17013 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017014 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17015$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016 esac
17017 case $ac_var in #(
17018 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017019 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17020 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017021 esac ;;
17022 esac
17023 done
17024
Martin v. Löwis11437992002-04-12 09:54:03 +000017025 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17027 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017028 # `set' does not quote correctly, so add quotes: double-quote
17029 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017031 "s/'/'\\\\''/g;
17032 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017034 *)
17035 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017037 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038 esac |
17039 sort
17040) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17046 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17048 :end' >>confcache
17049if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17050 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017051 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017052 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17053$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017054 if test ! -f "$cache_file" || test -h "$cache_file"; then
17055 cat confcache >"$cache_file"
17056 else
17057 case $cache_file in #(
17058 */* | ?:*)
17059 mv -f confcache "$cache_file"$$ &&
17060 mv -f "$cache_file"$$ "$cache_file" ;; #(
17061 *)
17062 mv -f confcache "$cache_file" ;;
17063 esac
17064 fi
17065 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017066 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017067 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17068$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017069 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017070fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017071rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017072
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017073test "x$prefix" = xNONE && prefix=$ac_default_prefix
17074# Let make expand exec_prefix.
17075test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017076
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017077DEFS=-DHAVE_CONFIG_H
17078
Skip Montanaro6dead952003-09-25 14:50:04 +000017079ac_libobjs=
17080ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017081U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017082for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17083 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017085 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17087 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017088 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17089 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017090done
17091LIBOBJS=$ac_libobjs
17092
17093LTLIBOBJS=$ac_ltlibobjs
17094
17095
Martin v. Löwis11437992002-04-12 09:54:03 +000017096
Matthias Kloseb9621712010-04-24 17:59:49 +000017097
Victor Stinnere0be4232011-10-25 13:06:09 +020017098: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017099ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017100ac_clean_files_save=$ac_clean_files
17101ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017102{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17103$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17104as_write_fail=0
17105cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017106#! $SHELL
17107# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017108# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017109# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017110# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017111
Martin v. Löwis11437992002-04-12 09:54:03 +000017112debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017113ac_cs_recheck=false
17114ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017115
Matthias Kloseb9621712010-04-24 17:59:49 +000017116SHELL=\${CONFIG_SHELL-$SHELL}
17117export SHELL
17118_ASEOF
17119cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17120## -------------------- ##
17121## M4sh Initialization. ##
17122## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017124# Be more Bourne compatible
17125DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017126if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017127 emulate sh
17128 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017129 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017130 # is contrary to our usage. Disable this feature.
17131 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017133else
Matthias Kloseb9621712010-04-24 17:59:49 +000017134 case `(set -o) 2>/dev/null` in #(
17135 *posix*) :
17136 set -o posix ;; #(
17137 *) :
17138 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017139esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017140fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017141
17142
Matthias Kloseb9621712010-04-24 17:59:49 +000017143as_nl='
17144'
17145export as_nl
17146# Printing a long string crashes Solaris 7 /usr/bin/printf.
17147as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17148as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17149as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17150# Prefer a ksh shell builtin over an external printf program on Solaris,
17151# but without wasting forks for bash or zsh.
17152if test -z "$BASH_VERSION$ZSH_VERSION" \
17153 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17154 as_echo='print -r --'
17155 as_echo_n='print -rn --'
17156elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17157 as_echo='printf %s\n'
17158 as_echo_n='printf %s'
17159else
17160 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17161 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17162 as_echo_n='/usr/ucb/echo -n'
17163 else
17164 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17165 as_echo_n_body='eval
17166 arg=$1;
17167 case $arg in #(
17168 *"$as_nl"*)
17169 expr "X$arg" : "X\\(.*\\)$as_nl";
17170 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17171 esac;
17172 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17173 '
17174 export as_echo_n_body
17175 as_echo_n='sh -c $as_echo_n_body as_echo'
17176 fi
17177 export as_echo_body
17178 as_echo='sh -c $as_echo_body as_echo'
17179fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017180
17181# The user is always right.
17182if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017183 PATH_SEPARATOR=:
17184 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17185 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17186 PATH_SEPARATOR=';'
17187 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190
17191# IFS
17192# We need space, tab and new line, in precisely that order. Quoting is
17193# there to prevent editors from complaining about space-tab.
17194# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17195# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196IFS=" "" $as_nl"
17197
17198# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017199as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017200case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201 *[\\/]* ) as_myself=$0 ;;
17202 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017203for as_dir in $PATH
17204do
17205 IFS=$as_save_IFS
17206 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017207 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17208 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017211 ;;
17212esac
17213# We did not find ourselves, most probably we were run as `sh COMMAND'
17214# in which case we are not to be found in the path.
17215if test "x$as_myself" = x; then
17216 as_myself=$0
17217fi
17218if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017219 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17220 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221fi
17222
Matthias Kloseb9621712010-04-24 17:59:49 +000017223# Unset variables that we do not need and which cause bugs (e.g. in
17224# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17225# suppresses any "Segmentation fault" message there. '((' could
17226# trigger a bug in pdksh 5.2.14.
17227for as_var in BASH_ENV ENV MAIL MAILPATH
17228do eval test x\${$as_var+set} = xset \
17229 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017230done
17231PS1='$ '
17232PS2='> '
17233PS4='+ '
17234
17235# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017236LC_ALL=C
17237export LC_ALL
17238LANGUAGE=C
17239export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240
Matthias Kloseb9621712010-04-24 17:59:49 +000017241# CDPATH.
17242(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17243
17244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017245# as_fn_error STATUS ERROR [LINENO LOG_FD]
17246# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017247# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17248# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017249# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017250as_fn_error ()
17251{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017252 as_status=$1; test $as_status -eq 0 && as_status=1
17253 if test "$4"; then
17254 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17255 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017256 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017257 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017258 as_fn_exit $as_status
17259} # as_fn_error
17260
17261
17262# as_fn_set_status STATUS
17263# -----------------------
17264# Set $? to STATUS, without forking.
17265as_fn_set_status ()
17266{
17267 return $1
17268} # as_fn_set_status
17269
17270# as_fn_exit STATUS
17271# -----------------
17272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17273as_fn_exit ()
17274{
17275 set +e
17276 as_fn_set_status $1
17277 exit $1
17278} # as_fn_exit
17279
17280# as_fn_unset VAR
17281# ---------------
17282# Portably unset VAR.
17283as_fn_unset ()
17284{
17285 { eval $1=; unset $1;}
17286}
17287as_unset=as_fn_unset
17288# as_fn_append VAR VALUE
17289# ----------------------
17290# Append the text in VALUE to the end of the definition contained in VAR. Take
17291# advantage of any shell optimizations that allow amortized linear growth over
17292# repeated appends, instead of the typical quadratic growth present in naive
17293# implementations.
17294if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17295 eval 'as_fn_append ()
17296 {
17297 eval $1+=\$2
17298 }'
17299else
17300 as_fn_append ()
17301 {
17302 eval $1=\$$1\$2
17303 }
17304fi # as_fn_append
17305
17306# as_fn_arith ARG...
17307# ------------------
17308# Perform arithmetic evaluation on the ARGs, and store the result in the
17309# global $as_val. Take advantage of shells that can avoid forks. The arguments
17310# must be portable across $(()) and expr.
17311if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17312 eval 'as_fn_arith ()
17313 {
17314 as_val=$(( $* ))
17315 }'
17316else
17317 as_fn_arith ()
17318 {
17319 as_val=`expr "$@" || test $? -eq 1`
17320 }
17321fi # as_fn_arith
17322
17323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324if expr a : '\(a\)' >/dev/null 2>&1 &&
17325 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17326 as_expr=expr
17327else
17328 as_expr=false
17329fi
17330
17331if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17332 as_basename=basename
17333else
17334 as_basename=false
17335fi
17336
Matthias Kloseb9621712010-04-24 17:59:49 +000017337if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17338 as_dirname=dirname
17339else
17340 as_dirname=false
17341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343as_me=`$as_basename -- "$0" ||
17344$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17345 X"$0" : 'X\(//\)$' \| \
17346 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017347$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 sed '/^.*\/\([^/][^/]*\)\/*$/{
17349 s//\1/
17350 q
17351 }
17352 /^X\/\(\/\/\)$/{
17353 s//\1/
17354 q
17355 }
17356 /^X\/\(\/\).*/{
17357 s//\1/
17358 q
17359 }
17360 s/.*/./; q'`
17361
Matthias Kloseb9621712010-04-24 17:59:49 +000017362# Avoid depending upon Character Ranges.
17363as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17364as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17365as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17366as_cr_digits='0123456789'
17367as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368
17369ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017370case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017372 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017374 xy) ECHO_C='\c';;
17375 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17376 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 esac;;
17378*)
17379 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017380esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017381
Martin v. Löwis11437992002-04-12 09:54:03 +000017382rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383if test -d conf$$.dir; then
17384 rm -f conf$$.dir/conf$$.file
17385else
17386 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017387 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017389if (echo >conf$$.file) 2>/dev/null; then
17390 if ln -s conf$$.file conf$$ 2>/dev/null; then
17391 as_ln_s='ln -s'
17392 # ... but there are two gotchas:
17393 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17394 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017395 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017396 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017397 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017398 elif ln conf$$.file conf$$ 2>/dev/null; then
17399 as_ln_s=ln
17400 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017401 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017403else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017404 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17407rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017408
Matthias Kloseb9621712010-04-24 17:59:49 +000017409
17410# as_fn_mkdir_p
17411# -------------
17412# Create "$as_dir" as a directory, including parents if necessary.
17413as_fn_mkdir_p ()
17414{
17415
17416 case $as_dir in #(
17417 -*) as_dir=./$as_dir;;
17418 esac
17419 test -d "$as_dir" || eval $as_mkdir_p || {
17420 as_dirs=
17421 while :; do
17422 case $as_dir in #(
17423 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17424 *) as_qdir=$as_dir;;
17425 esac
17426 as_dirs="'$as_qdir' $as_dirs"
17427 as_dir=`$as_dirname -- "$as_dir" ||
17428$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17429 X"$as_dir" : 'X\(//\)[^/]' \| \
17430 X"$as_dir" : 'X\(//\)$' \| \
17431 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17432$as_echo X"$as_dir" |
17433 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17434 s//\1/
17435 q
17436 }
17437 /^X\(\/\/\)[^/].*/{
17438 s//\1/
17439 q
17440 }
17441 /^X\(\/\/\)$/{
17442 s//\1/
17443 q
17444 }
17445 /^X\(\/\).*/{
17446 s//\1/
17447 q
17448 }
17449 s/.*/./; q'`
17450 test -d "$as_dir" && break
17451 done
17452 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017454
17455
17456} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017457if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017458 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017459else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017460 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017461 as_mkdir_p=false
17462fi
17463
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017464
17465# as_fn_executable_p FILE
17466# -----------------------
17467# Test if FILE is an executable regular file.
17468as_fn_executable_p ()
17469{
17470 test -f "$1" && test -x "$1"
17471} # as_fn_executable_p
17472as_test_x='test -x'
17473as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017474
17475# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017476as_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 +000017477
17478# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017479as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017480
17481
Martin v. Löwis11437992002-04-12 09:54:03 +000017482exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017483## ----------------------------------- ##
17484## Main body of $CONFIG_STATUS script. ##
17485## ----------------------------------- ##
17486_ASEOF
17487test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017488
Matthias Kloseb9621712010-04-24 17:59:49 +000017489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17490# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017491# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492# values after options handling.
17493ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017494This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017495generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017496
17497 CONFIG_FILES = $CONFIG_FILES
17498 CONFIG_HEADERS = $CONFIG_HEADERS
17499 CONFIG_LINKS = $CONFIG_LINKS
17500 CONFIG_COMMANDS = $CONFIG_COMMANDS
17501 $ $0 $@
17502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503on `(hostname || uname -n) 2>/dev/null | sed 1q`
17504"
17505
Martin v. Löwis11437992002-04-12 09:54:03 +000017506_ACEOF
17507
Matthias Kloseb9621712010-04-24 17:59:49 +000017508case $ac_config_files in *"
17509"*) set x $ac_config_files; shift; ac_config_files=$*;;
17510esac
17511
17512case $ac_config_headers in *"
17513"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17514esac
17515
17516
17517cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017518# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017519config_files="$ac_config_files"
17520config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017523
Matthias Kloseb9621712010-04-24 17:59:49 +000017524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017525ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017526\`$as_me' instantiates files and other configuration actions
17527from templates according to the current configuration. Unless the files
17528and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017529
Matthias Kloseb9621712010-04-24 17:59:49 +000017530Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017531
17532 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 --config print configuration, then exit
17535 -q, --quiet, --silent
17536 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 -d, --debug don't remove temporary files
17538 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017539 --file=FILE[:TEMPLATE]
17540 instantiate the configuration file FILE
17541 --header=FILE[:TEMPLATE]
17542 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017543
17544Configuration files:
17545$config_files
17546
17547Configuration headers:
17548$config_headers
17549
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017550Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017553cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17554ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017555ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017556python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017557configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017559
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017560Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017561This config.status script is free software; the Free Software Foundation
17562gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563
17564ac_pwd='$ac_pwd'
17565srcdir='$srcdir'
17566INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017567MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017568test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017569_ACEOF
17570
Matthias Kloseb9621712010-04-24 17:59:49 +000017571cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17572# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017573ac_need_defaults=:
17574while test $# != 0
17575do
17576 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017577 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17579 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017580 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017582 --*=)
17583 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17584 ac_optarg=
17585 ac_shift=:
17586 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017588 ac_option=$1
17589 ac_optarg=$2
17590 ac_shift=shift
17591 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 esac
17593
Skip Montanaro6dead952003-09-25 14:50:04 +000017594 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017595 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017596 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17597 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017599 $as_echo "$ac_cs_version"; exit ;;
17600 --config | --confi | --conf | --con | --co | --c )
17601 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017602 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017603 debug=: ;;
17604 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017605 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017606 case $ac_optarg in
17607 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017608 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017609 esac
17610 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017611 ac_need_defaults=false;;
17612 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017613 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017614 case $ac_optarg in
17615 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17616 esac
17617 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017619 --he | --h)
17620 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017621 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017622Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017623 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017624 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017625 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17626 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17627 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017628
17629 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017630 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017631Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017632
Matthias Kloseb9621712010-04-24 17:59:49 +000017633 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017635
17636 esac
17637 shift
17638done
17639
Skip Montanaro6dead952003-09-25 14:50:04 +000017640ac_configure_extra_args=
17641
17642if $ac_cs_silent; then
17643 exec 6>/dev/null
17644 ac_configure_extra_args="$ac_configure_extra_args --silent"
17645fi
17646
17647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017649if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017650 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017651 shift
17652 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17653 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017655 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017656fi
17657
Martin v. Löwis11437992002-04-12 09:54:03 +000017658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017659cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660exec 5>>config.log
17661{
17662 echo
17663 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17664## Running $as_me. ##
17665_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017670cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017672
Matthias Kloseb9621712010-04-24 17:59:49 +000017673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674
17675# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017676for ac_config_target in $ac_config_targets
17677do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678 case $ac_config_target in
17679 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17680 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17681 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017682 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17683 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017684 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017685 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017686 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017687 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688
Victor Stinnere0be4232011-10-25 13:06:09 +020017689 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 esac
17691done
17692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693
Martin v. Löwis11437992002-04-12 09:54:03 +000017694# If the user did not use the arguments to specify the items to instantiate,
17695# then the envvar interface is used. Set only those that are not.
17696# We use the long form for the default assignment because of an extremely
17697# bizarre bug on SunOS 4.1.3.
17698if $ac_need_defaults; then
17699 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17700 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17701fi
17702
Skip Montanaro6dead952003-09-25 14:50:04 +000017703# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017704# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017705# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706# Hook for its removal unless debugging.
17707# Note that there is a small window in which the directory will not be cleaned:
17708# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017709$debug ||
17710{
Victor Stinnere0be4232011-10-25 13:06:09 +020017711 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017713 : "${ac_tmp:=$tmp}"
17714 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017716 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017717}
Martin v. Löwis11437992002-04-12 09:54:03 +000017718# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017719
Martin v. Löwis11437992002-04-12 09:54:03 +000017720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017722 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017723} ||
17724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 tmp=./conf$$-$RANDOM
17726 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017727} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017728ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017729
Matthias Kloseb9621712010-04-24 17:59:49 +000017730# Set up the scripts for CONFIG_FILES section.
17731# No need to generate them if there are no CONFIG_FILES.
17732# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017734
Matthias Kloseb9621712010-04-24 17:59:49 +000017735
17736ac_cr=`echo X | tr X '\015'`
17737# On cygwin, bash can eat \r inside `` if the user requested igncr.
17738# But we know of no other shell where ac_cr would be empty at this
17739# point, so we can use a bashism as a fallback.
17740if test "x$ac_cr" = x; then
17741 eval ac_cr=\$\'\\r\'
17742fi
17743ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17744if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017745 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017746else
17747 ac_cs_awk_cr=$ac_cr
17748fi
17749
Victor Stinnere0be4232011-10-25 13:06:09 +020017750echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017751_ACEOF
17752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017753
Matthias Kloseb9621712010-04-24 17:59:49 +000017754{
17755 echo "cat >conf$$subs.awk <<_ACEOF" &&
17756 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17757 echo "_ACEOF"
17758} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017759 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17760ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761ac_delim='%!_!# '
17762for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017764 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765
Matthias Kloseb9621712010-04-24 17:59:49 +000017766 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17767 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768 break
17769 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017770 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 else
17772 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017773 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774done
Matthias Kloseb9621712010-04-24 17:59:49 +000017775rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017776
Matthias Kloseb9621712010-04-24 17:59:49 +000017777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017778cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017780sed -n '
17781h
17782s/^/S["/; s/!.*/"]=/
17783p
17784g
17785s/^[^!]*!//
17786:repl
17787t repl
17788s/'"$ac_delim"'$//
17789t delim
17790:nl
17791h
17792s/\(.\{148\}\)..*/\1/
17793t more1
17794s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17795p
17796n
17797b repl
17798:more1
17799s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17800p
17801g
17802s/.\{148\}//
17803t nl
17804:delim
17805h
17806s/\(.\{148\}\)..*/\1/
17807t more2
17808s/["\\]/\\&/g; s/^/"/; s/$/"/
17809p
17810b
17811:more2
17812s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17813p
17814g
17815s/.\{148\}//
17816t delim
17817' <conf$$subs.awk | sed '
17818/^[^""]/{
17819 N
17820 s/\n//
17821}
17822' >>$CONFIG_STATUS || ac_write_fail=1
17823rm -f conf$$subs.awk
17824cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17825_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017826cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017827 for (key in S) S_is_set[key] = 1
17828 FS = ""
17829
17830}
17831{
17832 line = $ 0
17833 nfields = split(line, field, "@")
17834 substed = 0
17835 len = length(field[1])
17836 for (i = 2; i < nfields; i++) {
17837 key = field[i]
17838 keylen = length(key)
17839 if (S_is_set[key]) {
17840 value = S[key]
17841 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17842 len += length(value) + length(field[++i])
17843 substed = 1
17844 } else
17845 len += 1 + keylen
17846 }
17847
17848 print line
17849}
17850
17851_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17854if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17855 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17856else
17857 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017858fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017859 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017860_ACEOF
17861
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017862# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17863# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017864# trailing colons and then remove the whole line if VPATH becomes empty
17865# (actually we leave an empty line to preserve line numbers).
17866if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017867 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17868h
17869s///
17870s/^/:/
17871s/[ ]*$/:/
17872s/:\$(srcdir):/:/g
17873s/:\${srcdir}:/:/g
17874s/:@srcdir@:/:/g
17875s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017877x
17878s/\(=[ ]*\).*/\1/
17879G
17880s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881s/^[^=]*=[ ]*$//
17882}'
17883fi
17884
Matthias Kloseb9621712010-04-24 17:59:49 +000017885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017886fi # test -n "$CONFIG_FILES"
17887
Matthias Kloseb9621712010-04-24 17:59:49 +000017888# Set up the scripts for CONFIG_HEADERS section.
17889# No need to generate them if there are no CONFIG_HEADERS.
17890# This happens for instance with `./config.status Makefile'.
17891if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017892cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017893BEGIN {
17894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017895
Matthias Kloseb9621712010-04-24 17:59:49 +000017896# Transform confdefs.h into an awk script `defines.awk', embedded as
17897# here-document in config.status, that substitutes the proper values into
17898# config.h.in to produce config.h.
17899
17900# Create a delimiter string that does not exist in confdefs.h, to ease
17901# handling of long lines.
17902ac_delim='%!_!# '
17903for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017904 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17905 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017906 break
17907 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017908 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017909 else
17910 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17911 fi
17912done
17913
17914# For the awk script, D is an array of macro values keyed by name,
17915# likewise P contains macro parameters if any. Preserve backslash
17916# newline sequences.
17917
17918ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17919sed -n '
17920s/.\{148\}/&'"$ac_delim"'/g
17921t rset
17922:rset
17923s/^[ ]*#[ ]*define[ ][ ]*/ /
17924t def
17925d
17926:def
17927s/\\$//
17928t bsnl
17929s/["\\]/\\&/g
17930s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17931D["\1"]=" \3"/p
17932s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17933d
17934:bsnl
17935s/["\\]/\\&/g
17936s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17937D["\1"]=" \3\\\\\\n"\\/p
17938t cont
17939s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17940t cont
17941d
17942:cont
17943n
17944s/.\{148\}/&'"$ac_delim"'/g
17945t clear
17946:clear
17947s/\\$//
17948t bsnlc
17949s/["\\]/\\&/g; s/^/"/; s/$/"/p
17950d
17951:bsnlc
17952s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17953b cont
17954' <confdefs.h | sed '
17955s/'"$ac_delim"'/"\\\
17956"/g' >>$CONFIG_STATUS || ac_write_fail=1
17957
17958cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17959 for (key in D) D_is_set[key] = 1
17960 FS = ""
17961}
17962/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17963 line = \$ 0
17964 split(line, arg, " ")
17965 if (arg[1] == "#") {
17966 defundef = arg[2]
17967 mac1 = arg[3]
17968 } else {
17969 defundef = substr(arg[1], 2)
17970 mac1 = arg[2]
17971 }
17972 split(mac1, mac2, "(") #)
17973 macro = mac2[1]
17974 prefix = substr(line, 1, index(line, defundef) - 1)
17975 if (D_is_set[macro]) {
17976 # Preserve the white space surrounding the "#".
17977 print prefix "define", macro P[macro] D[macro]
17978 next
17979 } else {
17980 # Replace #undef with comments. This is necessary, for example,
17981 # in the case of _POSIX_SOURCE, which is predefined and required
17982 # on some systems where configure will not decide to define it.
17983 if (defundef == "undef") {
17984 print "/*", prefix defundef, macro, "*/"
17985 next
17986 }
17987 }
17988}
17989{ print }
17990_ACAWK
17991_ACEOF
17992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017993 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017994fi # test -n "$CONFIG_HEADERS"
17995
17996
17997eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17998shift
17999for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000do
18001 case $ac_tag in
18002 :[FHLC]) ac_mode=$ac_tag; continue;;
18003 esac
18004 case $ac_mode$ac_tag in
18005 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018006 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018007 :[FH]-) ac_tag=-:-;;
18008 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18009 esac
18010 ac_save_IFS=$IFS
18011 IFS=:
18012 set x $ac_tag
18013 IFS=$ac_save_IFS
18014 shift
18015 ac_file=$1
18016 shift
18017
18018 case $ac_mode in
18019 :L) ac_source=$1;;
18020 :[FH])
18021 ac_file_inputs=
18022 for ac_f
18023 do
18024 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018025 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026 *) # Look for the file first in the build tree, then in the source tree
18027 # (if the path is not absolute). The absolute path cannot be DOS-style,
18028 # because $ac_f cannot contain `:'.
18029 test -f "$ac_f" ||
18030 case $ac_f in
18031 [\\/$]*) false;;
18032 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18033 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018034 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018036 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18037 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018038 done
18039
18040 # Let's still pretend it is `configure' which instantiates (i.e., don't
18041 # use $as_me), people would be surprised to read:
18042 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018043 configure_input='Generated from '`
18044 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18045 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046 if test x"$ac_file" != x-; then
18047 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018048 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18049$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018051 # Neutralize special characters interpreted by sed in replacement strings.
18052 case $configure_input in #(
18053 *\&* | *\|* | *\\* )
18054 ac_sed_conf_input=`$as_echo "$configure_input" |
18055 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18056 *) ac_sed_conf_input=$configure_input;;
18057 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018058
18059 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018060 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18061 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062 esac
18063 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018064 esac
18065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018067$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018068 X"$ac_file" : 'X\(//\)[^/]' \| \
18069 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018071$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18073 s//\1/
18074 q
18075 }
18076 /^X\(\/\/\)[^/].*/{
18077 s//\1/
18078 q
18079 }
18080 /^X\(\/\/\)$/{
18081 s//\1/
18082 q
18083 }
18084 /^X\(\/\).*/{
18085 s//\1/
18086 q
18087 }
18088 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018089 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018090 ac_builddir=.
18091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092case "$ac_dir" in
18093.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18094*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018095 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018097 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098 case $ac_top_builddir_sub in
18099 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18100 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18101 esac ;;
18102esac
18103ac_abs_top_builddir=$ac_pwd
18104ac_abs_builddir=$ac_pwd$ac_dir_suffix
18105# for backward compatibility:
18106ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018107
18108case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018109 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018110 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111 ac_top_srcdir=$ac_top_builddir_sub
18112 ac_abs_top_srcdir=$ac_pwd ;;
18113 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 ac_top_srcdir=$srcdir
18116 ac_abs_top_srcdir=$srcdir ;;
18117 *) # Relative name.
18118 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18119 ac_top_srcdir=$ac_top_build_prefix$srcdir
18120 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018121esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018123
Martin v. Löwis11437992002-04-12 09:54:03 +000018124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125 case $ac_mode in
18126 :F)
18127 #
18128 # CONFIG_FILE
18129 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018130
18131 case $INSTALL in
18132 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018135 ac_MKDIR_P=$MKDIR_P
18136 case $MKDIR_P in
18137 [\\/$]* | ?:[\\/]* ) ;;
18138 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18139 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018140_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141
Matthias Kloseb9621712010-04-24 17:59:49 +000018142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143# If the template does not know about datarootdir, expand it.
18144# FIXME: This hack should be removed a few years after 2.60.
18145ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018146ac_sed_dataroot='
18147/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148 p
18149 q
18150}
18151/@datadir@/p
18152/@docdir@/p
18153/@infodir@/p
18154/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018155/@mandir@/p'
18156case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018157*datarootdir*) ac_datarootdir_seen=yes;;
18158*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18160$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018162cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018163 ac_datarootdir_hack='
18164 s&@datadir@&$datadir&g
18165 s&@docdir@&$docdir&g
18166 s&@infodir@&$infodir&g
18167 s&@localedir@&$localedir&g
18168 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018169 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170esac
18171_ACEOF
18172
18173# Neutralize VPATH when `$srcdir' = `.'.
18174# Shell code in configure.ac might set extrasub.
18175# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18177ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018178$extrasub
18179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018181:t
18182/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018183s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018185s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186s&@srcdir@&$ac_srcdir&;t t
18187s&@abs_srcdir@&$ac_abs_srcdir&;t t
18188s&@top_srcdir@&$ac_top_srcdir&;t t
18189s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18190s&@builddir@&$ac_builddir&;t t
18191s&@abs_builddir@&$ac_abs_builddir&;t t
18192s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18193s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018194s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018196"
Victor Stinnere0be4232011-10-25 13:06:09 +020018197eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18198 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018201 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18202 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18203 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018205which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018206$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018207which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018208
Victor Stinnere0be4232011-10-25 13:06:09 +020018209 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018210 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018211 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18212 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018213 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018214 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215 ;;
18216 :H)
18217 #
18218 # CONFIG_HEADER
18219 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018220 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018221 {
18222 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018223 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18224 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018225 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018226 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018227 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18228$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018229 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018230 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018231 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018232 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018233 fi
18234 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018235 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018236 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018237 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018238 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018239 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018241
18242 esac
18243
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018244
18245 case $ac_file$ac_mode in
18246 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18247
18248 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249done # for ac_tag
18250
Guido van Rossum627b2d71993-12-24 10:39:16 +000018251
Matthias Kloseb9621712010-04-24 17:59:49 +000018252as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018253_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018254ac_clean_files=$ac_clean_files_save
18255
Matthias Kloseb9621712010-04-24 17:59:49 +000018256test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018257 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018258
Martin v. Löwis11437992002-04-12 09:54:03 +000018259
18260# configure is writing to config.log, and then calls config.status.
18261# config.status does its own redirection, appending to config.log.
18262# Unfortunately, on DOS this fails, as config.log is still kept open
18263# by configure, so config.status won't be able to write to it; its
18264# output is simply discarded. So we exec the FD to /dev/null,
18265# effectively closing config.log, so it can be properly (re)opened and
18266# appended to by config.status. When coming back to configure, we
18267# need to make the FD available again.
18268if test "$no_create" != yes; then
18269 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018270 ac_config_status_args=
18271 test "$silent" = yes &&
18272 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018274 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018275 exec 5>>config.log
18276 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18277 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018278 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018279fi
18280if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18281 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18282$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018283fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018284
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018285
Christian Heimes75ed8902013-11-20 01:11:18 +010018286echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018287if test ! -f Modules/Setup
18288then
18289 cp $srcdir/Modules/Setup.dist Modules/Setup
18290fi
18291
Christian Heimes75ed8902013-11-20 01:11:18 +010018292echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018293if test ! -f Modules/Setup.local
18294then
18295 echo "# Edit this file for local setup changes" >Modules/Setup.local
18296fi
18297
Christian Heimes75ed8902013-11-20 01:11:18 +010018298echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018299$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018300 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018301 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018302mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018303
18304if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18305 echo "" >&6
18306 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018307 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 +000018308 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018309 echo "" >&6
18310 echo "" >&6
18311fi
18312