blob: 3e52e60f915792cc1a7adf06b5164d87ae110aab [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 \
Ned Deilyeb96c372018-05-02 03:41:45 -04001285 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 Deily8c9bb722018-01-30 07:42:14 -05001492 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1493 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001504 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001505 --with-lto Enable Link Time Optimization in any build. Disabled
1506 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001507 --with-hash-algorithm=[fnv|siphash24]
1508 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001509 --with-address-sanitizer
1510 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001512 --with-system-expat build pyexpat module using an installed expat
1513 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001514 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001515 --with-system-libmpdec build _decimal module using an installed libmpdec
1516 library
Ned Deilyd819b932013-09-06 01:07:05 -07001517 --with-tcltk-includes='-I...'
1518 override search for Tcl and Tk include files
1519 --with-tcltk-libs='-L...'
1520 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001521 --with-dbmliborder=db1:db2:...
1522 order to check db backends for dbm. Valid value is a
1523 colon separated string with the backend names
1524 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-doc-strings disable/enable documentation strings
1526 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001527 --with(out)-c-locale-coercion
1528 disable/enable C locale coercion to a UTF-8 based
1529 locale
1530 --with(out)-c-locale-warning
1531 disable/enable locale compatibility warning in the C
1532 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001533 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001534 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with-libm=STRING math library
1536 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001537 --with(out)-computed-gotos
1538 Use computed gotos in evaluation loop (enabled by
1539 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001540 --with(out)-ensurepip=[=upgrade]
1541 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001542 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001543 --with-ssl-default-suites=[python|openssl|STRING]
1544 Override default cipher suites string, python: use
1545 Python's preferred selection (default), openssl:
1546 leave OpenSSL's defaults untouched, STRING: use a
1547 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001550 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001559 PKG_CONFIG path to pkg-config utility
1560 PKG_CONFIG_PATH
1561 directories to add to pkg-config's search path
1562 PKG_CONFIG_LIBDIR
1563 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565Use these variables to override the choices made by `configure' or to help
1566it to find libraries and programs with nonstandard names/locations.
1567
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001568Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001571fi
1572
1573if test "$ac_init_help" = "recursive"; then
1574 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 test -d "$ac_dir" ||
1577 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1578 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_builddir=.
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581case "$ac_dir" in
1582.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 case $ac_top_builddir_sub in
1588 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1589 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1590 esac ;;
1591esac
1592ac_abs_top_builddir=$ac_pwd
1593ac_abs_builddir=$ac_pwd$ac_dir_suffix
1594# for backward compatibility:
1595ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001596
1597case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 ac_top_srcdir=$ac_top_builddir_sub
1601 ac_abs_top_srcdir=$ac_pwd ;;
1602 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$srcdir
1605 ac_abs_top_srcdir=$srcdir ;;
1606 *) # Relative name.
1607 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1608 ac_top_srcdir=$ac_top_build_prefix$srcdir
1609 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001610esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613 cd "$ac_dir" || { ac_status=$?; continue; }
1614 # Check for guested configure.
1615 if test -f "$ac_srcdir/configure.gnu"; then
1616 echo &&
1617 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1618 elif test -f "$ac_srcdir/configure"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001621 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 fi || ac_status=$?
1624 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 done
1626fi
1627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001629if $ac_init_version; then
1630 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001631python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001633
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001635This configure script is free software; the Free Software Foundation
1636gives unlimited permission to copy, distribute and modify it.
1637_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001638 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001640
1641## ------------------------ ##
1642## Autoconf initialization. ##
1643## ------------------------ ##
1644
1645# ac_fn_c_try_compile LINENO
1646# --------------------------
1647# Try to compile conftest.$ac_ext, and return whether this succeeded.
1648ac_fn_c_try_compile ()
1649{
1650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1651 rm -f conftest.$ac_objext
1652 if { { ac_try="$ac_compile"
1653case "(($ac_try" in
1654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1655 *) ac_try_echo=$ac_try;;
1656esac
1657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1658$as_echo "$ac_try_echo"; } >&5
1659 (eval "$ac_compile") 2>conftest.err
1660 ac_status=$?
1661 if test -s conftest.err; then
1662 grep -v '^ *+' conftest.err >conftest.er1
1663 cat conftest.er1 >&5
1664 mv -f conftest.er1 conftest.err
1665 fi
1666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1667 test $ac_status = 0; } && {
1668 test -z "$ac_c_werror_flag" ||
1669 test ! -s conftest.err
1670 } && test -s conftest.$ac_objext; then :
1671 ac_retval=0
1672else
1673 $as_echo "$as_me: failed program was:" >&5
1674sed 's/^/| /' conftest.$ac_ext >&5
1675
1676 ac_retval=1
1677fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 as_fn_set_status $ac_retval
1680
1681} # ac_fn_c_try_compile
1682
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001683# ac_fn_c_try_cpp LINENO
1684# ----------------------
1685# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1686ac_fn_c_try_cpp ()
1687{
1688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689 if { { ac_try="$ac_cpp conftest.$ac_ext"
1690case "(($ac_try" in
1691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1692 *) ac_try_echo=$ac_try;;
1693esac
1694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1695$as_echo "$ac_try_echo"; } >&5
1696 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1697 ac_status=$?
1698 if test -s conftest.err; then
1699 grep -v '^ *+' conftest.err >conftest.er1
1700 cat conftest.er1 >&5
1701 mv -f conftest.er1 conftest.err
1702 fi
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } > conftest.i && {
1705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1706 test ! -s conftest.err
1707 }; then :
1708 ac_retval=0
1709else
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=1
1714fi
1715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1716 as_fn_set_status $ac_retval
1717
1718} # ac_fn_c_try_cpp
1719
Matthias Kloseb9621712010-04-24 17:59:49 +00001720# ac_fn_c_try_link LINENO
1721# -----------------------
1722# Try to link conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_c_try_link ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 rm -f conftest.$ac_objext conftest$ac_exeext
1727 if { { ac_try="$ac_link"
1728case "(($ac_try" in
1729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1730 *) ac_try_echo=$ac_try;;
1731esac
1732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1733$as_echo "$ac_try_echo"; } >&5
1734 (eval "$ac_link") 2>conftest.err
1735 ac_status=$?
1736 if test -s conftest.err; then
1737 grep -v '^ *+' conftest.err >conftest.er1
1738 cat conftest.er1 >&5
1739 mv -f conftest.er1 conftest.err
1740 fi
1741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1742 test $ac_status = 0; } && {
1743 test -z "$ac_c_werror_flag" ||
1744 test ! -s conftest.err
1745 } && test -s conftest$ac_exeext && {
1746 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001747 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 }; then :
1749 ac_retval=0
1750else
1751 $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754 ac_retval=1
1755fi
1756 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1757 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1758 # interfere with the next link command; also delete a directory that is
1759 # left behind by Apple's compiler. We do this before executing the actions.
1760 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 as_fn_set_status $ac_retval
1763
1764} # ac_fn_c_try_link
1765
Matthias Kloseb9621712010-04-24 17:59:49 +00001766# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1767# -------------------------------------------------------
1768# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1769# the include files in INCLUDES and setting the cache variable VAR
1770# accordingly.
1771ac_fn_c_check_header_mongrel ()
1772{
1773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001774 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1776$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001777if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 $as_echo_n "(cached) " >&6
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783else
1784 # Is the header compilable?
1785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1786$as_echo_n "checking $2 usability... " >&6; }
1787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788/* end confdefs.h. */
1789$4
1790#include <$2>
1791_ACEOF
1792if ac_fn_c_try_compile "$LINENO"; then :
1793 ac_header_compiler=yes
1794else
1795 ac_header_compiler=no
1796fi
1797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1799$as_echo "$ac_header_compiler" >&6; }
1800
1801# Is the header present?
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1803$as_echo_n "checking $2 presence... " >&6; }
1804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1805/* end confdefs.h. */
1806#include <$2>
1807_ACEOF
1808if ac_fn_c_try_cpp "$LINENO"; then :
1809 ac_header_preproc=yes
1810else
1811 ac_header_preproc=no
1812fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001813rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1815$as_echo "$ac_header_preproc" >&6; }
1816
1817# So? What about this header?
1818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1819 yes:no: )
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1821$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1823$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1824 ;;
1825 no:yes:* )
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1827$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1829$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1831$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1833$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1835$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001836( $as_echo "## --------------------------------------- ##
1837## Report this to https://bugs.python.org/ ##
1838## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 ) | sed "s/^/$as_me: WARNING: /" >&2
1840 ;;
1841esac
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1843$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001844if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001845 $as_echo_n "(cached) " >&6
1846else
1847 eval "$3=\$ac_header_compiler"
1848fi
1849eval ac_res=\$$3
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1851$as_echo "$ac_res" >&6; }
1852fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001854
1855} # ac_fn_c_check_header_mongrel
1856
1857# ac_fn_c_try_run LINENO
1858# ----------------------
1859# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1860# that executables *can* be run.
1861ac_fn_c_try_run ()
1862{
1863 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1864 if { { ac_try="$ac_link"
1865case "(($ac_try" in
1866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1867 *) ac_try_echo=$ac_try;;
1868esac
1869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1870$as_echo "$ac_try_echo"; } >&5
1871 (eval "$ac_link") 2>&5
1872 ac_status=$?
1873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1874 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1875 { { case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878esac
1879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880$as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_try") 2>&5
1882 ac_status=$?
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; }; }; then :
1885 ac_retval=0
1886else
1887 $as_echo "$as_me: program exited with status $ac_status" >&5
1888 $as_echo "$as_me: failed program was:" >&5
1889sed 's/^/| /' conftest.$ac_ext >&5
1890
1891 ac_retval=$ac_status
1892fi
1893 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 as_fn_set_status $ac_retval
1896
1897} # ac_fn_c_try_run
1898
1899# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1900# -------------------------------------------------------
1901# Tests whether HEADER exists and can be compiled using the include files in
1902# INCLUDES, setting the cache variable VAR accordingly.
1903ac_fn_c_check_header_compile ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914#include <$2>
1915_ACEOF
1916if ac_fn_c_try_compile "$LINENO"; then :
1917 eval "$3=yes"
1918else
1919 eval "$3=no"
1920fi
1921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001927
1928} # ac_fn_c_check_header_compile
1929
Matthias Kloseb9621712010-04-24 17:59:49 +00001930# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1931# -------------------------------------------
1932# Tests whether TYPE exists after having included INCLUDES, setting cache
1933# variable VAR accordingly.
1934ac_fn_c_check_type ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1938$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001939if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=no"
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$4
1946int
1947main ()
1948{
1949if (sizeof ($2))
1950 return 0;
1951 ;
1952 return 0;
1953}
1954_ACEOF
1955if ac_fn_c_try_compile "$LINENO"; then :
1956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1957/* end confdefs.h. */
1958$4
1959int
1960main ()
1961{
1962if (sizeof (($2)))
1963 return 0;
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969
1970else
1971 eval "$3=yes"
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977eval ac_res=\$$3
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1979$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001980 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982} # ac_fn_c_check_type
1983
Matthias Kloseb9621712010-04-24 17:59:49 +00001984# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1985# --------------------------------------------
1986# Tries to find the compile-time value of EXPR in a program that includes
1987# INCLUDES, setting VAR accordingly. Returns whether the value could be
1988# computed
1989ac_fn_c_compute_int ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 if test "$cross_compiling" = yes; then
1993 # Depending upon the size, compute the lo and hi bounds.
1994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$4
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 ac_lo=0 ac_mid=0
2010 while :; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002018test_array [0] = 0;
2019return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_hi=$ac_mid; break
2027else
2028 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2029 if test $ac_lo -le $ac_mid; then
2030 ac_lo= ac_hi=
2031 break
2032 fi
2033 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036 done
2037else
2038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2039/* end confdefs.h. */
2040$4
2041int
2042main ()
2043{
2044static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002097test_array [0] = 0;
2098return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_hi=$ac_mid
2106else
2107 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110done
2111case $ac_lo in #((
2112?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2113'') ac_retval=1 ;;
2114esac
2115 else
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119static long int longval () { return $2; }
2120static unsigned long int ulongval () { return $2; }
2121#include <stdio.h>
2122#include <stdlib.h>
2123int
2124main ()
2125{
2126
2127 FILE *f = fopen ("conftest.val", "w");
2128 if (! f)
2129 return 1;
2130 if (($2) < 0)
2131 {
2132 long int i = longval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%ld", i);
2136 }
2137 else
2138 {
2139 unsigned long int i = ulongval ();
2140 if (i != ($2))
2141 return 1;
2142 fprintf (f, "%lu", i);
2143 }
2144 /* Do not output a trailing newline, as this causes \r\n confusion
2145 on some platforms. */
2146 return ferror (f) || fclose (f) != 0;
2147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_run "$LINENO"; then :
2153 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2154else
2155 ac_retval=1
2156fi
2157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2158 conftest.$ac_objext conftest.beam conftest.$ac_ext
2159rm -f conftest.val
2160
2161 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002162 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002163 as_fn_set_status $ac_retval
2164
2165} # ac_fn_c_compute_int
2166
2167# ac_fn_c_check_func LINENO FUNC VAR
2168# ----------------------------------
2169# Tests whether FUNC exists, setting the cache variable VAR accordingly
2170ac_fn_c_check_func ()
2171{
2172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2174$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002175if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002176 $as_echo_n "(cached) " >&6
2177else
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2181 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2182#define $2 innocuous_$2
2183
2184/* System header to define __stub macros and hopefully few prototypes,
2185 which can conflict with char $2 (); below.
2186 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2187 <limits.h> exists even on freestanding compilers. */
2188
2189#ifdef __STDC__
2190# include <limits.h>
2191#else
2192# include <assert.h>
2193#endif
2194
2195#undef $2
2196
2197/* Override any GCC internal prototype to avoid an error.
2198 Use char because int might match the return type of a GCC
2199 builtin and then its argument prototype would still apply. */
2200#ifdef __cplusplus
2201extern "C"
2202#endif
2203char $2 ();
2204/* The GNU C library defines this for functions which it implements
2205 to always fail with ENOSYS. Some functions are actually named
2206 something starting with __ and the normal name is an alias. */
2207#if defined __stub_$2 || defined __stub___$2
2208choke me
2209#endif
2210
2211int
2212main ()
2213{
2214return $2 ();
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_link "$LINENO"; then :
2220 eval "$3=yes"
2221else
2222 eval "$3=no"
2223fi
2224rm -f core conftest.err conftest.$ac_objext \
2225 conftest$ac_exeext conftest.$ac_ext
2226fi
2227eval ac_res=\$$3
2228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2229$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002230 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002231
2232} # ac_fn_c_check_func
2233
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002234# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2235# ---------------------------------------------
2236# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2237# accordingly.
2238ac_fn_c_check_decl ()
2239{
2240 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2241 as_decl_name=`echo $2|sed 's/ *(.*//'`
2242 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2244$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2245if eval \${$3+:} false; then :
2246 $as_echo_n "(cached) " >&6
2247else
2248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2249/* end confdefs.h. */
2250$4
2251int
2252main ()
2253{
2254#ifndef $as_decl_name
2255#ifdef __cplusplus
2256 (void) $as_decl_use;
2257#else
2258 (void) $as_decl_name;
2259#endif
2260#endif
2261
2262 ;
2263 return 0;
2264}
2265_ACEOF
2266if ac_fn_c_try_compile "$LINENO"; then :
2267 eval "$3=yes"
2268else
2269 eval "$3=no"
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
2276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2277
2278} # ac_fn_c_check_decl
2279
Matthias Kloseb9621712010-04-24 17:59:49 +00002280# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2281# ----------------------------------------------------
2282# Tries to find if the field MEMBER exists in type AGGR, after including
2283# INCLUDES, setting cache variable VAR accordingly.
2284ac_fn_c_check_member ()
2285{
2286 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2288$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002289if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002290 $as_echo_n "(cached) " >&6
2291else
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h. */
2294$5
2295int
2296main ()
2297{
2298static $2 ac_aggr;
2299if (ac_aggr.$3)
2300return 0;
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_compile "$LINENO"; then :
2306 eval "$4=yes"
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$5
2311int
2312main ()
2313{
2314static $2 ac_aggr;
2315if (sizeof ac_aggr.$3)
2316return 0;
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$4=yes"
2323else
2324 eval "$4=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330eval ac_res=\$$4
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2332$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002333 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002334
2335} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002336cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002337This file contains any messages produced by compilers while
2338running configure, to aid debugging if configure makes a mistake.
2339
Ned Deily4829bc62016-09-12 17:29:04 -04002340It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002341generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002342
2343 $ $0 $@
2344
2345_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002346exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002347{
2348cat <<_ASUNAME
2349## --------- ##
2350## Platform. ##
2351## --------- ##
2352
2353hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2354uname -m = `(uname -m) 2>/dev/null || echo unknown`
2355uname -r = `(uname -r) 2>/dev/null || echo unknown`
2356uname -s = `(uname -s) 2>/dev/null || echo unknown`
2357uname -v = `(uname -v) 2>/dev/null || echo unknown`
2358
2359/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2360/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2361
2362/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2363/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2364/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002366/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2367/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2368/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2369
2370_ASUNAME
2371
2372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002377 $as_echo "PATH: $as_dir"
2378 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002380
2381} >&5
2382
2383cat >&5 <<_ACEOF
2384
2385
2386## ----------- ##
2387## Core tests. ##
2388## ----------- ##
2389
2390_ACEOF
2391
2392
2393# Keep a trace of the command line.
2394# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_configure_args0=
2400ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_must_keep_next=false
2402for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002403do
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 for ac_arg
2405 do
2406 case $ac_arg in
2407 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2408 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2409 | -silent | --silent | --silen | --sile | --sil)
2410 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002411 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 esac
2414 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 case $ac_arg in
2422 *=* | --config-cache | -C | -disable-* | --disable-* \
2423 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2424 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2425 | -with-* | --with-* | -without-* | --without-* | --x)
2426 case "$ac_configure_args0 " in
2427 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2428 esac
2429 ;;
2430 -* ) ac_must_keep_next=true ;;
2431 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002433 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 ;;
2435 esac
2436 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002437done
Matthias Kloseb9621712010-04-24 17:59:49 +00002438{ ac_configure_args0=; unset ac_configure_args0;}
2439{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441# When interrupted or exit'd, cleanup temporary files, and complete
2442# config.log. We remove comments because anyway the quotes in there
2443# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444# WARNING: Use '\'' to represent an apostrophe within the trap.
2445# 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 +00002446trap 'exit_status=$?
2447 # Save into config.log some information that might help in debugging.
2448 {
2449 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002450
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002452## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002488## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 echo
2491 for ac_var in $ac_subst_vars
2492 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 eval ac_val=\$$ac_var
2494 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 done | sort
2499 echo
2500
2501 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_files
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515 fi
2516
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002519## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575 # We do not want a PATH search for config.site.
2576 case $CONFIG_SITE in #((
2577 -*) ac_site_file1=./$CONFIG_SITE;;
2578 */*) ac_site_file1=$CONFIG_SITE;;
2579 *) ac_site_file1=./$CONFIG_SITE;;
2580 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$prefix/share/config.site
2583 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584else
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$ac_default_prefix/share/config.site
2586 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002588for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 test "x$ac_site_file" = xNONE && continue
2591 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2593$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002595 . "$ac_site_file" \
2596 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2598as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002599See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600 fi
2601done
2602
2603if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 # Some versions of bash will fail to source /dev/null (special files
2605 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2606 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2608$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2611 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 esac
2613 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614else
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2616$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 >$cache_file
2618fi
2619
2620# Check that the precious variables saved in the cache have kept the same
2621# value.
2622ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2625 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2627 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 case $ac_old_set,$ac_new_set in
2629 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2631$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 +00002632 ac_cache_corrupted=: ;;
2633 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2635$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 ac_cache_corrupted=: ;;
2637 ,);;
2638 *)
2639 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002640 # differences in whitespace do not lead to failure.
2641 ac_old_val_w=`echo x $ac_old_val`
2642 ac_new_val_w=`echo x $ac_new_val`
2643 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2645$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2646 ac_cache_corrupted=:
2647 else
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2649$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2650 eval $ac_var=\$ac_old_val
2651 fi
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2653$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2655$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 fi;;
2657 esac
2658 # Pass precious variables to config.status.
2659 if test "$ac_new_set" = set; then
2660 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 *) ac_arg=$ac_var=$ac_new_val ;;
2663 esac
2664 case " $ac_configure_args " in
2665 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 esac
2668 fi
2669done
2670if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2674$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002675 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002677## -------------------- ##
2678## Main body of script. ##
2679## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Guido van Rossum7f43da71994-08-01 12:15:30 +00002681ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2685ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686
Guido van Rossum627b2d71993-12-24 10:39:16 +00002687
Michael W. Hudson54241132001-12-07 15:38:26 +00002688
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689
Christian Heimesff5be6e2018-01-20 13:19:21 +01002690
2691
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002692if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693 # If we're building out-of-tree, we need to make sure the following
2694 # resources get picked up before their $srcdir counterparts.
2695 # Objects/ -> typeslots.inc
2696 # Include/ -> Python-ast.h, graminit.h
2697 # Python/ -> importlib.h
2698 # (A side effect of this is that these resources will automatically be
2699 # regenerated when building out-of-tree, regardless of whether or not
2700 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2701 # off.)
2702 BASECPPFLAGS="-IObjects -IInclude -IPython"
2703else
2704 BASECPPFLAGS=""
2705fi
2706
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002707
2708
2709
2710
Victor Stinner9ed34a82017-05-02 22:35:58 +02002711if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713# Extract the first word of "git", so it can be a program name with args.
2714set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2716$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002717if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718 $as_echo_n "(cached) " >&6
2719else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720 if test -n "$HAS_GIT"; then
2721 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722else
2723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2724for as_dir in $PATH
2725do
2726 IFS=$as_save_IFS
2727 test -z "$as_dir" && as_dir=.
2728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002730 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2732 break 2
2733 fi
2734done
2735 done
2736IFS=$as_save_IFS
2737
Ned Deily5c4b0d02017-03-04 00:19:55 -05002738 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739fi
2740fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741HAS_GIT=$ac_cv_prog_HAS_GIT
2742if test -n "$HAS_GIT"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2744$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745else
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2747$as_echo "no" >&6; }
2748fi
2749
2750
2751else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755then
Ned Deily554626a2017-03-20 23:41:52 -04002756 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2757 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 GITVERSION=""
2761 GITTAG=""
2762 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763fi
2764
2765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002767
2768
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002769ac_aux_dir=
2770for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2771 if test -f "$ac_dir/install-sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install-sh -c"
2774 break
2775 elif test -f "$ac_dir/install.sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install.sh -c"
2778 break
2779 elif test -f "$ac_dir/shtool"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/shtool install -c"
2782 break
2783 fi
2784done
2785if test -z "$ac_aux_dir"; then
2786 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2787fi
2788
2789# These three variables are undocumented and unsupported,
2790# and are intended to be withdrawn in a future Autoconf release.
2791# They can cause serious problems if a builder's source tree is in a directory
2792# whose full name contains unusual characters.
2793ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2794ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2795ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2796
2797
2798# Make sure we can run config.sub.
2799$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2800 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2801
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2803$as_echo_n "checking build system type... " >&6; }
2804if ${ac_cv_build+:} false; then :
2805 $as_echo_n "(cached) " >&6
2806else
2807 ac_build_alias=$build_alias
2808test "x$ac_build_alias" = x &&
2809 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2810test "x$ac_build_alias" = x &&
2811 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2812ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2813 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2814
2815fi
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2817$as_echo "$ac_cv_build" >&6; }
2818case $ac_cv_build in
2819*-*-*) ;;
2820*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2821esac
2822build=$ac_cv_build
2823ac_save_IFS=$IFS; IFS='-'
2824set x $ac_cv_build
2825shift
2826build_cpu=$1
2827build_vendor=$2
2828shift; shift
2829# Remember, the first character of IFS is used to create $*,
2830# except with old shells:
2831build_os=$*
2832IFS=$ac_save_IFS
2833case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2834
2835
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2837$as_echo_n "checking host system type... " >&6; }
2838if ${ac_cv_host+:} false; then :
2839 $as_echo_n "(cached) " >&6
2840else
2841 if test "x$host_alias" = x; then
2842 ac_cv_host=$ac_cv_build
2843else
2844 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2846fi
2847
2848fi
2849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2850$as_echo "$ac_cv_host" >&6; }
2851case $ac_cv_host in
2852*-*-*) ;;
2853*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2854esac
2855host=$ac_cv_host
2856ac_save_IFS=$IFS; IFS='-'
2857set x $ac_cv_host
2858shift
2859host_cpu=$1
2860host_vendor=$2
2861shift; shift
2862# Remember, the first character of IFS is used to create $*,
2863# except with old shells:
2864host_os=$*
2865IFS=$ac_save_IFS
2866case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2867
2868
2869
doko@python.orga10e4a92013-01-25 18:45:12 +01002870
2871
Ned Deilyfcbc2462014-08-22 13:32:49 -07002872# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2873rm -f pybuilddir.txt
2874
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002875for ac_prog in python$PACKAGE_VERSION python3 python
2876do
2877 # Extract the first word of "$ac_prog", so it can be a program name with args.
2878set dummy $ac_prog; ac_word=$2
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2880$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002881if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002882 $as_echo_n "(cached) " >&6
2883else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884 if test -n "$PYTHON_FOR_REGEN"; then
2885 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886else
2887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2888for as_dir in $PATH
2889do
2890 IFS=$as_save_IFS
2891 test -z "$as_dir" && as_dir=.
2892 for ac_exec_ext in '' $ac_executable_extensions; do
2893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002894 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2896 break 2
2897 fi
2898done
2899 done
2900IFS=$as_save_IFS
2901
2902fi
2903fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002904PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2905if test -n "$PYTHON_FOR_REGEN"; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2907$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002908else
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2910$as_echo "no" >&6; }
2911fi
2912
2913
Victor Stinnera5c62a82017-05-03 18:21:48 +02002914 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002915done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
2919
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002920if test "$cross_compiling" = yes; then
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2922$as_echo_n "checking for python interpreter for cross build... " >&6; }
2923 if test -z "$PYTHON_FOR_BUILD"; then
2924 for interp in python$PACKAGE_VERSION python3 python; do
2925 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002926 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927 break
2928 fi
2929 interp=
2930 done
2931 if test x$interp = x; then
2932 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2933 fi
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2935$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002936 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002937 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002938elif test "$cross_compiling" = maybe; then
2939 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940else
2941 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2942fi
2943
2944
Martin v. Löwis11437992002-04-12 09:54:03 +00002945
Benjamin Petersond23f8222009-04-05 19:13:16 +00002946if test "$prefix" != "/"; then
2947 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
2952
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002953# We don't use PACKAGE_ variables, and they cause conflicts
2954# with other autoconf-based packages that include Python.h
2955grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2956rm confdefs.h
2957mv confdefs.h.new confdefs.h
2958
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002959
Ned Deily4829bc62016-09-12 17:29:04 -04002960VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002961
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002962# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002963
2964SOVERSION=1.0
2965
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966# The later defininition of _XOPEN_SOURCE disables certain features
2967# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970
2971
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977
2978
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2981# them.
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984
2985
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002987# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991
2992
2993
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002994define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002995
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002996# Arguments passed to configure.
2997
2998CONFIG_ARGS="$ac_configure_args"
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3001$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003003if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003005 case $enableval in
3006 yes)
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003007 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003008 # information
3009 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003010 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003011 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3013 if test ! -d "${enableval}"
3014 then
3015 enableval=/
3016 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003017 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003018 ;;
3019 esac
3020 case $enableval in
3021 no)
3022 UNIVERSALSDK=
3023 enable_universalsdk=
3024 ;;
3025 *)
3026 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003027 if test ! -d "${UNIVERSALSDK}"
3028 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003029 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003031 ;;
3032 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035else
3036
3037 UNIVERSALSDK=
3038 enable_universalsdk=
3039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003041
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042if test -n "${UNIVERSALSDK}"
3043then
Matthias Kloseb9621712010-04-24 17:59:49 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3045$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046else
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3048$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003052
Ned Deily87adb6e2013-10-18 21:09:56 -07003053ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003054
Ned Deilycbfb9a52012-06-23 16:02:19 -07003055# For backward compatibility reasons we prefer to select '32-bit' if available,
3056# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058if test "`uname -s`" = "Darwin"
3059then
3060 if test -n "${UNIVERSALSDK}"
3061 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003062 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063 then
3064 UNIVERSAL_ARCHS="intel"
3065 fi
3066 fi
3067fi
3068
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3071$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072
3073# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003074if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076 UNIVERSAL_ARCHS="$withval"
3077
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078fi
3079
Ned Deily87adb6e2013-10-18 21:09:56 -07003080if test -n "${UNIVERSALSDK}"
3081then
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3083$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3084else
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086$as_echo "no" >&6; }
3087fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003089
3090# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092 withval=$with_framework_name;
3093 PYTHONFRAMEWORK=${withval}
3094 PYTHONFRAMEWORKDIR=${withval}.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3096
3097else
3098
3099 PYTHONFRAMEWORK=Python
3100 PYTHONFRAMEWORKDIR=Python.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3102
3103fi
3104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003106if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003108 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003110 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003111 esac
3112 case $enableval in
3113 no)
3114 PYTHONFRAMEWORK=
3115 PYTHONFRAMEWORKDIR=no-framework
3116 PYTHONFRAMEWORKPREFIX=
3117 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118 FRAMEWORKINSTALLFIRST=
3119 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003120 FRAMEWORKALTINSTALLFIRST=
3121 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003122 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 if test "x${prefix}" = "xNONE"; then
3124 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3125 else
3126 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3127 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003129 ;;
3130 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003131 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003134 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003135 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3136 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003137 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003138 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003139
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE" ; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 else
3144 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3145 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146
3147 case "${enableval}" in
3148 /System*)
3149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3150 if test "${prefix}" = "NONE" ; then
3151 # See below
3152 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3153 fi
3154 ;;
3155
3156 /Library*)
3157 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3158 ;;
3159
3160 */Library/Frameworks)
3161 MDIR="`dirname "${enableval}"`"
3162 MDIR="`dirname "${MDIR}"`"
3163 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3164
3165 if test "${prefix}" = "NONE"; then
3166 # User hasn't specified the
3167 # --prefix option, but wants to install
3168 # the framework in a non-default location,
3169 # ensure that the compatibility links get
3170 # installed relative to that prefix as well
3171 # instead of in /usr/local.
3172 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3173 fi
3174 ;;
3175
3176 *)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 ;;
3179 esac
3180
Jack Jansen127e56e2001-09-11 14:41:54 +00003181 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003183 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3190
3191 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3192
Jack Jansene578a632001-08-15 01:27:14 +00003193 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Guido van Rossum563e7081996-09-10 18:20:48 +00003195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORKPREFIX=
3200 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 FRAMEWORKINSTALLFIRST=
3202 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003203 FRAMEWORKALTINSTALLFIRST=
3204 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003205 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 if test "x${prefix}" = "xNONE" ; then
3207 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3208 else
3209 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3210 fi
Jack Jansene578a632001-08-15 01:27:14 +00003211 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003212
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214fi
3215
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
3217
Michael W. Hudson54241132001-12-07 15:38:26 +00003218
3219
3220
3221
Jack Jansene578a632001-08-15 01:27:14 +00003222
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223
3224
3225
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003226
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003227
Ned Deilyb8f944f2013-11-21 22:42:25 -08003228
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003229
3230cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003231#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232_ACEOF
3233
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003236## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003237## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003238##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239# Set name for machine-dependent library files
3240
Matthias Kloseb9621712010-04-24 17:59:49 +00003241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3242$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243if test -z "$MACHDEP"
3244then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003245 # avoid using uname for cross builds
3246 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003247 # ac_sys_system and ac_sys_release are used for setting
3248 # a lot of different things including 'define_xopen_source'
3249 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003251 *-*-linux-android*)
3252 ac_sys_system=Linux-android
3253 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 *-*-linux*)
3255 ac_sys_system=Linux
3256 ;;
3257 *-*-cygwin*)
3258 ac_sys_system=Cygwin
3259 ;;
3260 *)
3261 # for now, limit cross builds to known configurations
3262 MACHDEP="unknown"
3263 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3264 esac
3265 ac_sys_release=
3266 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003267 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003268 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003269 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 fi
3275 ac_md_system=`echo $ac_sys_system |
3276 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3277 ac_md_release=`echo $ac_sys_release |
3278 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3279 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003280
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003282 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003283 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003284 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3366 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3367 # identifies itself as Darwin/7.*
3368 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3369 # disables platform specific features beyond repair.
3370 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3371 # has no effect, don't bother defining them
3372 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003373 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003374 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003375 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003376 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3377 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3378 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003379 AIX/4)
3380 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003381 AIX/5)
3382 if test `uname -r` -eq 1; then
3383 define_xopen_source=no
3384 fi
3385 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003386 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3387 # defining NI_NUMERICHOST.
3388 QNX/6.3.2)
3389 define_xopen_source=no
3390 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003391
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003392esac
3393
3394if test $define_xopen_source = yes
3395then
Victor Stinner14d098d2011-09-07 22:29:43 +02003396 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003397
Victor Stinner14d098d2011-09-07 22:29:43 +02003398$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003400
3401 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3402 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3403 # several APIs are not declared. Since this is also needed in some
3404 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
Matthias Kloseb9621712010-04-24 17:59:49 +00003406$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003409
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003410$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003412fi
3413
Christian Heimes647cd872013-12-07 23:39:33 +01003414# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3415case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003416 hp*|HP*)
3417 define_stdc_a1=yes;;
3418 *)
3419 define_stdc_a1=no;;
3420esac
3421
3422if test $define_stdc_a1 = yes
3423then
Christian Heimes647cd872013-12-07 23:39:33 +01003424
3425$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3426
Christian Heimesb02bcae2013-12-08 15:21:08 +01003427fi
Christian Heimes647cd872013-12-07 23:39:33 +01003428
Jack Jansen6b08a402004-06-03 12:41:45 +00003429# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3430# it may influence the way we can build extensions, so distutils
3431# needs to check it
3432
Thomas Wouters477c8d52006-05-27 19:21:47 +00003433
Jack Jansen6b08a402004-06-03 12:41:45 +00003434CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003435EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003436
Guido van Rossum627b2d71993-12-24 10:39:16 +00003437# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003438
3439# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3440# for debug/optimization stuff. BASECFLAGS is for flags that are required
3441# just to get things to compile and link. Users are free to override OPT
3442# when running configure or make. The build should not break if they do.
3443# BASECFLAGS should generally not be messed with, however.
3444
3445# XXX shouldn't some/most/all of this code be merged with the stuff later
3446# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3448$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003451if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003453 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003454 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003455 without_gcc=yes;;
3456 yes) CC=gcc
3457 without_gcc=no;;
3458 *) CC=$withval
3459 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003460 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003461else
Martin v. Löwis11437992002-04-12 09:54:03 +00003462
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003463 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003464 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003465 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003466 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003467 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468fi
3469
Matthias Kloseb9621712010-04-24 17:59:49 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3471$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003472
Zachary Ware5af85642015-12-21 12:09:17 -06003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3474$as_echo_n "checking for --with-icc... " >&6; }
3475
3476# Check whether --with-icc was given.
3477if test "${with_icc+set}" = set; then :
3478 withval=$with_icc;
3479 case $withval in
3480 no) CC=${CC:-cc}
3481 with_icc=no;;
3482 yes) CC=icc
3483 CXX=icpc
3484 with_icc=yes;;
3485 *) CC=$withval
3486 with_icc=$withval;;
3487 esac
3488else
3489
3490 with_icc=no
3491fi
3492
3493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3494$as_echo "$with_icc" >&6; }
3495
Guido van Rossum8b131c51995-03-09 14:10:13 +00003496# If the user switches compilers, we can't believe the cache
3497if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3498then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003499 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003500(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003501fi
3502
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003503# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3504# when the compiler supports them, but we don't always want -O2, and
3505# we set -g later.
3506if test -z "$CFLAGS"; then
3507 CFLAGS=
3508fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003509
3510if test "$ac_sys_system" = "Darwin"
3511then
3512 # Compiler selection on MacOSX is more complicated than
Miss Islington (bot)1d3395f2018-06-03 22:41:12 -07003513 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003514 # information
3515 if test -z "${CC}"
3516 then
3517 found_gcc=
3518 found_clang=
3519 as_save_IFS=$IFS; IFS=:
3520 for as_dir in $PATH
3521 do
3522 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003523 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003524 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003525 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003526 fi
3527 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003528 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003529 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003530 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003531 fi
3532 fi
3533 done
3534 IFS=$as_save_IFS
3535
3536 if test -n "$found_gcc" -a -n "$found_clang"
3537 then
3538 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3539 then
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3541$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3542 CC="$found_clang"
3543 CXX="$found_clang++"
3544 fi
3545
3546
3547 elif test -z "$found_gcc" -a -n "$found_clang"
3548 then
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3550$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3551 CC="$found_clang"
3552 CXX="$found_clang++"
3553
3554 elif test -z "$found_gcc" -a -z "$found_clang"
3555 then
3556 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3557 if test -n "${found_clang}"
3558 then
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3560$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3561 CC="${found_clang}"
3562 CXX="`/usr/bin/xcrun -find clang++`"
3563
3564 # else: use default behaviour
3565 fi
3566 fi
3567 fi
3568fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003569ac_ext=c
3570ac_cpp='$CPP $CPPFLAGS'
3571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3573ac_compiler_gnu=$ac_cv_c_compiler_gnu
3574if test -n "$ac_tool_prefix"; then
3575 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3576set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003579if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003581else
3582 if test -n "$CC"; then
3583 ac_cv_prog_CC="$CC" # Let the user override the test.
3584else
Martin v. Löwis11437992002-04-12 09:54:03 +00003585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $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 +00003594 break 2
3595 fi
3596done
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
Jack Jansendd19cf82001-12-06 22:36:17 +00003600fi
3601fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003602CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003603if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3605$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003606else
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613if test -z "$ac_cv_prog_CC"; then
3614 ac_ct_CC=$CC
3615 # Extract the first word of "gcc", so it can be a program name with args.
3616set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3618$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003619if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 if test -n "$ac_ct_CC"; then
3623 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3624else
3625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3626for as_dir in $PATH
3627do
3628 IFS=$as_save_IFS
3629 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $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 +00003634 break 2
3635 fi
3636done
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003639
3640fi
3641fi
3642ac_ct_CC=$ac_cv_prog_ac_ct_CC
3643if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3645$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003646else
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649fi
3650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 if test "x$ac_ct_CC" = x; then
3652 CC=""
3653 else
3654 case $cross_compiling:$ac_tool_warned in
3655yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658ac_tool_warned=yes ;;
3659esac
3660 CC=$ac_ct_CC
3661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003664fi
3665
Jack Jansendd19cf82001-12-06 22:36:17 +00003666if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667 if test -n "$ac_tool_prefix"; then
3668 # 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 +00003669set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003672if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003674else
3675 if test -n "$CC"; then
3676 ac_cv_prog_CC="$CC" # Let the user override the test.
3677else
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 $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 +00003687 break 2
3688 fi
3689done
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003692
3693fi
3694fi
3695CC=$ac_cv_prog_CC
3696if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3698$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702fi
3703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707if test -z "$CC"; then
3708 # Extract the first word of "cc", so it can be a program name with args.
3709set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003712if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
3715 if test -n "$CC"; then
3716 ac_cv_prog_CC="$CC" # Let the user override the test.
3717else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3727 ac_prog_rejected=yes
3728 continue
3729 fi
3730 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $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 +00003732 break 2
3733 fi
3734done
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003737
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738if test $ac_prog_rejected = yes; then
3739 # We found a bogon in the path, so make sure we never use it.
3740 set dummy $ac_cv_prog_CC
3741 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743 # We chose a different compiler from the bogus one.
3744 # However, it has the same basename, so the bogon will be chosen
3745 # first if we set CC to just the basename; use the full file name.
3746 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003747 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 fi
3749fi
3750fi
3751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3755$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756else
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3758$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759fi
3760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
3763if test -z "$CC"; then
3764 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 do
3767 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3770$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003771if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003773else
3774 if test -n "$CC"; then
3775 ac_cv_prog_CC="$CC" # Let the user override the test.
3776else
Martin v. Löwis11437992002-04-12 09:54:03 +00003777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3778for as_dir in $PATH
3779do
3780 IFS=$as_save_IFS
3781 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 $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 +00003786 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003788done
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003791
3792fi
3793fi
3794CC=$ac_cv_prog_CC
3795if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3797$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798else
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3800$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003801fi
3802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 test -n "$CC" && break
3805 done
3806fi
3807if test -z "$CC"; then
3808 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003810do
3811 # Extract the first word of "$ac_prog", so it can be a program name with args.
3812set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003815if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003817else
3818 if test -n "$ac_ct_CC"; then
3819 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3820else
3821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 $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 +00003830 break 2
3831 fi
3832done
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836fi
3837fi
3838ac_ct_CC=$ac_cv_prog_ac_ct_CC
3839if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3841$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842else
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 test -n "$ac_ct_CC" && break
3849done
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851 if test "x$ac_ct_CC" = x; then
3852 CC=""
3853 else
3854 case $cross_compiling:$ac_tool_warned in
3855yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858ac_tool_warned=yes ;;
3859esac
3860 CC=$ac_ct_CC
3861 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863
3864fi
3865
3866
Matthias Kloseb9621712010-04-24 17:59:49 +00003867test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003869as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003870See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871
3872# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003873$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3874set X $ac_compile
3875ac_compiler=$2
3876for ac_option in --version -v -V -qversion; do
3877 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3883$as_echo "$ac_try_echo"; } >&5
3884 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 if test -s conftest.err; then
3887 sed '10a\
3888... rest of stderr output deleted ...
3889 10q' conftest.err >conftest.er1
3890 cat conftest.er1 >&5
3891 fi
3892 rm -f conftest.er1 conftest.err
3893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894 test $ac_status = 0; }
3895done
Martin v. Löwis11437992002-04-12 09:54:03 +00003896
Matthias Kloseb9621712010-04-24 17:59:49 +00003897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003898/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
3908ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003909ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003910# Try to create an executable without -o first, disregard a.out.
3911# It will help us diagnose broken compilers, and finding out an intuition
3912# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3914$as_echo_n "checking whether the C compiler works... " >&6; }
3915ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3916
3917# The possible output files:
3918ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920ac_rmfiles=
3921for ac_file in $ac_files
3922do
3923 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3926 esac
3927done
3928rm -f $ac_rmfiles
3929
Matthias Kloseb9621712010-04-24 17:59:49 +00003930if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931case "(($ac_try" in
3932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933 *) ac_try_echo=$ac_try;;
3934esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3936$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3940 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3942# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3943# in a Makefile. We should not override ac_cv_exeext if it was cached,
3944# so that the user can short-circuit this test for compilers unknown to
3945# Autoconf.
3946for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003947do
3948 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003951 ;;
3952 [ab].out )
3953 # We found the default executable, but exeext='' is most
3954 # certainly right.
3955 break;;
3956 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 then :; else
3959 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3960 fi
3961 # We set ac_cv_exeext here because the later test for it is not
3962 # safe: cross compilers may not add the suffix if given an `-o'
3963 # argument, so we may need to know it at that point already.
3964 # Even if this section looks crufty: it has the advantage of
3965 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003966 break;;
3967 * )
3968 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 esac
3970done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971test "$ac_cv_exeext" = no && ac_cv_exeext=
3972
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003973else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 ac_file=''
3975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003976if test -z "$ac_file"; then :
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978$as_echo "no" >&6; }
3979$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003980sed 's/^/| /' conftest.$ac_ext >&5
3981
Matthias Kloseb9621712010-04-24 17:59:49 +00003982{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003984as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003985See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003986else
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3988$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3991$as_echo_n "checking for C compiler default output file name... " >&6; }
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3993$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003994ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995
Matthias Kloseb9621712010-04-24 17:59:49 +00003996rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3999$as_echo_n "checking for suffix of executables... " >&6; }
4000if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001case "(($ac_try" in
4002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003 *) ac_try_echo=$ac_try;;
4004esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004008 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4012# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4013# work properly (i.e., refer to `conftest.exe'), while it won't with
4014# `rm'.
4015for ac_file in conftest.exe conftest conftest.*; do
4016 test -f "$ac_file" || continue
4017 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004019 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4020 break;;
4021 * ) break;;
4022 esac
4023done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024else
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004027as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004028See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f conftest conftest$ac_cv_exeext
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4032$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033
4034rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004035EXEEXT=$ac_cv_exeext
4036ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038/* end confdefs.h. */
4039#include <stdio.h>
4040int
4041main ()
4042{
4043FILE *f = fopen ("conftest.out", "w");
4044 return ferror (f) || fclose (f) != 0;
4045
4046 ;
4047 return 0;
4048}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004050ac_clean_files="$ac_clean_files conftest.out"
4051# Check that the compiler produces executables we can run. If not, either
4052# the compiler is broken, or we cross compile.
4053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4054$as_echo_n "checking whether we are cross compiling... " >&6; }
4055if test "$cross_compiling" != yes; then
4056 { { ac_try="$ac_link"
4057case "(($ac_try" in
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4060esac
4061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
4063 (eval "$ac_link") 2>&5
4064 ac_status=$?
4065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }
4067 if { ac_try='./conftest$ac_cv_exeext'
4068 { { case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
4072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
4074 (eval "$ac_try") 2>&5
4075 ac_status=$?
4076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }; }; then
4078 cross_compiling=no
4079 else
4080 if test "$cross_compiling" = maybe; then
4081 cross_compiling=yes
4082 else
4083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004085as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004086If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004087See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 fi
4089 fi
4090fi
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4092$as_echo "$cross_compiling" >&6; }
4093
4094rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4095ac_clean_files=$ac_clean_files_save
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4097$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004098if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $as_echo_n "(cached) " >&6
4100else
4101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004102/* end confdefs.h. */
4103
4104int
4105main ()
4106{
4107
4108 ;
4109 return 0;
4110}
4111_ACEOF
4112rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004113if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114case "(($ac_try" in
4115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4116 *) ac_try_echo=$ac_try;;
4117esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004118eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4119$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004120 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4123 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 for ac_file in conftest.o conftest.obj conftest.*; do
4125 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004128 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4129 break;;
4130 esac
4131done
4132else
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004134sed 's/^/| /' conftest.$ac_ext >&5
4135
Matthias Kloseb9621712010-04-24 17:59:49 +00004136{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004138as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004139See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004140fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004141rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4144$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004145OBJEXT=$ac_cv_objext
4146ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4148$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004149if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004151else
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158#ifndef __GNUC__
4159 choke me
4160#endif
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 ac_compiler_gnu=yes
4168else
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004172ac_cv_c_compiler_gnu=$ac_compiler_gnu
4173
4174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4176$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4177if test $ac_compiler_gnu = yes; then
4178 GCC=yes
4179else
4180 GCC=
4181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004182ac_test_CFLAGS=${CFLAGS+set}
4183ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4185$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004186if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004188else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 ac_save_c_werror_flag=$ac_c_werror_flag
4190 ac_c_werror_flag=yes
4191 ac_cv_prog_cc_g=no
4192 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004205 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206else
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 CFLAGS=""
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209/* end confdefs.h. */
4210
4211int
4212main ()
4213{
4214
4215 ;
4216 return 0;
4217}
4218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220
Matthias Kloseb9621712010-04-24 17:59:49 +00004221else
4222 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225/* end confdefs.h. */
4226
4227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004236 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243 ac_c_werror_flag=$ac_save_c_werror_flag
4244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4246$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004247if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249elif test $ac_cv_prog_cc_g = yes; then
4250 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004251 CFLAGS="-g -O2"
4252 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254 fi
4255else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 if test "$GCC" = yes; then
4257 CFLAGS="-O2"
4258 else
4259 CFLAGS=
4260 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4263$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004264if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004266else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004268ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004270/* end confdefs.h. */
4271#include <stdarg.h>
4272#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004273struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4275struct buf { int x; };
4276FILE * (*rcsopen) (struct buf *, struct stat *, int);
4277static char *e (p, i)
4278 char **p;
4279 int i;
4280{
4281 return p[i];
4282}
4283static char *f (char * (*g) (char **, int), char **p, ...)
4284{
4285 char *s;
4286 va_list v;
4287 va_start (v,p);
4288 s = g (p, va_arg (v,int));
4289 va_end (v);
4290 return s;
4291}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292
4293/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4294 function prototypes and stuff, but not '\xHH' hex character constants.
4295 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004297 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4298 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4303 inside strings and character constants. */
4304#define FOO(x) 'x'
4305int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4306
Skip Montanaro6dead952003-09-25 14:50:04 +00004307int test (int i, double x);
4308struct s1 {int (*f) (int a);};
4309struct s2 {int (*f) (double a);};
4310int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4311int argc;
4312char **argv;
4313int
4314main ()
4315{
4316return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4317 ;
4318 return 0;
4319}
4320_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4322 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004323do
4324 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328rm -f core conftest.err conftest.$ac_objext
4329 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004330done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004332CC=$ac_save_CC
4333
4334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335# AC_CACHE_VAL
4336case "x$ac_cv_prog_cc_c89" in
4337 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4339$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4342$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004343 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4346$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004348if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004349
Matthias Kloseb9621712010-04-24 17:59:49 +00004350fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352ac_ext=c
4353ac_cpp='$CPP $CPPFLAGS'
4354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4356ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004358ac_ext=c
4359ac_cpp='$CPP $CPPFLAGS'
4360ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4361ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4362ac_compiler_gnu=$ac_cv_c_compiler_gnu
4363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4364$as_echo_n "checking how to run the C preprocessor... " >&6; }
4365# On Suns, sometimes $CPP names a directory.
4366if test -n "$CPP" && test -d "$CPP"; then
4367 CPP=
4368fi
4369if test -z "$CPP"; then
4370 if ${ac_cv_prog_CPP+:} false; then :
4371 $as_echo_n "(cached) " >&6
4372else
4373 # Double quotes because CPP needs to be expanded
4374 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4375 do
4376 ac_preproc_ok=false
4377for ac_c_preproc_warn_flag in '' yes
4378do
4379 # Use a header file that comes with gcc, so configuring glibc
4380 # with a fresh cross-compiler works.
4381 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4382 # <limits.h> exists even on freestanding compilers.
4383 # On the NeXT, cc -E runs the code through the compiler's parser,
4384 # not just through cpp. "Syntax error" is here to catch this case.
4385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4386/* end confdefs.h. */
4387#ifdef __STDC__
4388# include <limits.h>
4389#else
4390# include <assert.h>
4391#endif
4392 Syntax error
4393_ACEOF
4394if ac_fn_c_try_cpp "$LINENO"; then :
4395
4396else
4397 # Broken: fails on valid input.
4398continue
4399fi
4400rm -f conftest.err conftest.i conftest.$ac_ext
4401
4402 # OK, works on sane cases. Now check whether nonexistent headers
4403 # can be detected and how.
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405/* end confdefs.h. */
4406#include <ac_nonexistent.h>
4407_ACEOF
4408if ac_fn_c_try_cpp "$LINENO"; then :
4409 # Broken: success on invalid input.
4410continue
4411else
4412 # Passes both tests.
4413ac_preproc_ok=:
4414break
4415fi
4416rm -f conftest.err conftest.i conftest.$ac_ext
4417
4418done
4419# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4420rm -f conftest.i conftest.err conftest.$ac_ext
4421if $ac_preproc_ok; then :
4422 break
4423fi
4424
4425 done
4426 ac_cv_prog_CPP=$CPP
4427
4428fi
4429 CPP=$ac_cv_prog_CPP
4430else
4431 ac_cv_prog_CPP=$CPP
4432fi
4433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4434$as_echo "$CPP" >&6; }
4435ac_preproc_ok=false
4436for ac_c_preproc_warn_flag in '' yes
4437do
4438 # Use a header file that comes with gcc, so configuring glibc
4439 # with a fresh cross-compiler works.
4440 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4441 # <limits.h> exists even on freestanding compilers.
4442 # On the NeXT, cc -E runs the code through the compiler's parser,
4443 # not just through cpp. "Syntax error" is here to catch this case.
4444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4445/* end confdefs.h. */
4446#ifdef __STDC__
4447# include <limits.h>
4448#else
4449# include <assert.h>
4450#endif
4451 Syntax error
4452_ACEOF
4453if ac_fn_c_try_cpp "$LINENO"; then :
4454
4455else
4456 # Broken: fails on valid input.
4457continue
4458fi
4459rm -f conftest.err conftest.i conftest.$ac_ext
4460
4461 # OK, works on sane cases. Now check whether nonexistent headers
4462 # can be detected and how.
4463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4464/* end confdefs.h. */
4465#include <ac_nonexistent.h>
4466_ACEOF
4467if ac_fn_c_try_cpp "$LINENO"; then :
4468 # Broken: success on invalid input.
4469continue
4470else
4471 # Passes both tests.
4472ac_preproc_ok=:
4473break
4474fi
4475rm -f conftest.err conftest.i conftest.$ac_ext
4476
4477done
4478# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4479rm -f conftest.i conftest.err conftest.$ac_ext
4480if $ac_preproc_ok; then :
4481
4482else
4483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4485as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4486See \`config.log' for more details" "$LINENO" 5; }
4487fi
4488
4489ac_ext=c
4490ac_cpp='$CPP $CPPFLAGS'
4491ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4492ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4493ac_compiler_gnu=$ac_cv_c_compiler_gnu
4494
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4496$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4497if ${ac_cv_path_GREP+:} false; then :
4498 $as_echo_n "(cached) " >&6
4499else
4500 if test -z "$GREP"; then
4501 ac_path_GREP_found=false
4502 # Loop through the user's path and test for each of PROGNAME-LIST
4503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4505do
4506 IFS=$as_save_IFS
4507 test -z "$as_dir" && as_dir=.
4508 for ac_prog in grep ggrep; do
4509 for ac_exec_ext in '' $ac_executable_extensions; do
4510 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4511 as_fn_executable_p "$ac_path_GREP" || continue
4512# Check for GNU ac_path_GREP and select it if it is found.
4513 # Check for GNU $ac_path_GREP
4514case `"$ac_path_GREP" --version 2>&1` in
4515*GNU*)
4516 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4517*)
4518 ac_count=0
4519 $as_echo_n 0123456789 >"conftest.in"
4520 while :
4521 do
4522 cat "conftest.in" "conftest.in" >"conftest.tmp"
4523 mv "conftest.tmp" "conftest.in"
4524 cp "conftest.in" "conftest.nl"
4525 $as_echo 'GREP' >> "conftest.nl"
4526 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4527 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4528 as_fn_arith $ac_count + 1 && ac_count=$as_val
4529 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4530 # Best one so far, save it but keep looking for a better one
4531 ac_cv_path_GREP="$ac_path_GREP"
4532 ac_path_GREP_max=$ac_count
4533 fi
4534 # 10*(2^10) chars as input seems more than enough
4535 test $ac_count -gt 10 && break
4536 done
4537 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4538esac
4539
4540 $ac_path_GREP_found && break 3
4541 done
4542 done
4543 done
4544IFS=$as_save_IFS
4545 if test -z "$ac_cv_path_GREP"; then
4546 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4547 fi
4548else
4549 ac_cv_path_GREP=$GREP
4550fi
4551
4552fi
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4554$as_echo "$ac_cv_path_GREP" >&6; }
4555 GREP="$ac_cv_path_GREP"
4556
4557
Łukasz Langaa785c872016-09-09 17:37:37 -07004558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4559$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4560if ${ac_cv_path_SED+:} false; then :
4561 $as_echo_n "(cached) " >&6
4562else
4563 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4564 for ac_i in 1 2 3 4 5 6 7; do
4565 ac_script="$ac_script$as_nl$ac_script"
4566 done
4567 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4568 { ac_script=; unset ac_script;}
4569 if test -z "$SED"; then
4570 ac_path_SED_found=false
4571 # Loop through the user's path and test for each of PROGNAME-LIST
4572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575 IFS=$as_save_IFS
4576 test -z "$as_dir" && as_dir=.
4577 for ac_prog in sed gsed; do
4578 for ac_exec_ext in '' $ac_executable_extensions; do
4579 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4580 as_fn_executable_p "$ac_path_SED" || continue
4581# Check for GNU ac_path_SED and select it if it is found.
4582 # Check for GNU $ac_path_SED
4583case `"$ac_path_SED" --version 2>&1` in
4584*GNU*)
4585 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4586*)
4587 ac_count=0
4588 $as_echo_n 0123456789 >"conftest.in"
4589 while :
4590 do
4591 cat "conftest.in" "conftest.in" >"conftest.tmp"
4592 mv "conftest.tmp" "conftest.in"
4593 cp "conftest.in" "conftest.nl"
4594 $as_echo '' >> "conftest.nl"
4595 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4596 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4597 as_fn_arith $ac_count + 1 && ac_count=$as_val
4598 if test $ac_count -gt ${ac_path_SED_max-0}; then
4599 # Best one so far, save it but keep looking for a better one
4600 ac_cv_path_SED="$ac_path_SED"
4601 ac_path_SED_max=$ac_count
4602 fi
4603 # 10*(2^10) chars as input seems more than enough
4604 test $ac_count -gt 10 && break
4605 done
4606 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4607esac
4608
4609 $ac_path_SED_found && break 3
4610 done
4611 done
4612 done
4613IFS=$as_save_IFS
4614 if test -z "$ac_cv_path_SED"; then
4615 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4616 fi
4617else
4618 ac_cv_path_SED=$SED
4619fi
4620
4621fi
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4623$as_echo "$ac_cv_path_SED" >&6; }
4624 SED="$ac_cv_path_SED"
4625 rm -f conftest.sed
4626
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004627
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004628
4629
Matthias Kloseb9621712010-04-24 17:59:49 +00004630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4631$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004633# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004634if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004636
4637 case $withval in
4638 no) with_cxx_main=no
4639 MAINCC='$(CC)';;
4640 yes) with_cxx_main=yes
4641 MAINCC='$(CXX)';;
4642 *) with_cxx_main=yes
4643 MAINCC=$withval
4644 if test -z "$CXX"
4645 then
4646 CXX=$withval
4647 fi;;
4648 esac
4649else
4650
4651 with_cxx_main=no
4652 MAINCC='$(CC)'
4653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004654fi
4655
Matthias Kloseb9621712010-04-24 17:59:49 +00004656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4657$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004658
4659preset_cxx="$CXX"
4660if test -z "$CXX"
4661then
4662 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004663 gcc) if test -n "$ac_tool_prefix"; then
4664 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4665set dummy ${ac_tool_prefix}g++; ac_word=$2
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
4668if ${ac_cv_path_CXX+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 case $CXX in
4672 [\\/]* | ?:[\\/]*)
4673 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4674 ;;
4675 *)
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677for as_dir in notfound
4678do
4679 IFS=$as_save_IFS
4680 test -z "$as_dir" && as_dir=.
4681 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685 break 2
4686 fi
4687done
4688 done
4689IFS=$as_save_IFS
4690
4691 ;;
4692esac
4693fi
4694CXX=$ac_cv_path_CXX
4695if test -n "$CXX"; then
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4697$as_echo "$CXX" >&6; }
4698else
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703
4704fi
4705if test -z "$ac_cv_path_CXX"; then
4706 ac_pt_CXX=$CXX
4707 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004711if ${ac_cv_path_ac_pt_CXX+:} false; then :
4712 $as_echo_n "(cached) " >&6
4713else
4714 case $ac_pt_CXX in
4715 [\\/]* | ?:[\\/]*)
4716 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4717 ;;
4718 *)
4719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720for as_dir in notfound
4721do
4722 IFS=$as_save_IFS
4723 test -z "$as_dir" && as_dir=.
4724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004726 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4728 break 2
4729 fi
4730done
4731 done
4732IFS=$as_save_IFS
4733
4734 ;;
4735esac
4736fi
4737ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4738if test -n "$ac_pt_CXX"; then
4739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4740$as_echo "$ac_pt_CXX" >&6; }
4741else
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743$as_echo "no" >&6; }
4744fi
4745
4746 if test "x$ac_pt_CXX" = x; then
4747 CXX="g++"
4748 else
4749 case $cross_compiling:$ac_tool_warned in
4750yes:)
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4752$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4753ac_tool_warned=yes ;;
4754esac
4755 CXX=$ac_pt_CXX
4756 fi
4757else
4758 CXX="$ac_cv_path_CXX"
4759fi
4760 ;;
4761 cc) if test -n "$ac_tool_prefix"; then
4762 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4763set dummy ${ac_tool_prefix}c++; ac_word=$2
4764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004766if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
4769 case $CXX in
4770 [\\/]* | ?:[\\/]*)
4771 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4772 ;;
4773 *)
4774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4775for as_dir in notfound
4776do
4777 IFS=$as_save_IFS
4778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 break 2
4784 fi
4785done
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 ;;
4790esac
4791fi
4792CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004793if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4795$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004796else
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4798$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801
4802fi
4803if test -z "$ac_cv_path_CXX"; then
4804 ac_pt_CXX=$CXX
4805 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004806set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4808$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004809if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004814 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 +00004815 ;;
4816 *)
4817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4818for as_dir in notfound
4819do
4820 IFS=$as_save_IFS
4821 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004822 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004824 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826 break 2
4827 fi
4828done
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004830IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004831
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004832 ;;
4833esac
4834fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004835ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4836if test -n "$ac_pt_CXX"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4838$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004839else
Matthias Kloseb9621712010-04-24 17:59:49 +00004840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004843
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844 if test "x$ac_pt_CXX" = x; then
4845 CXX="c++"
4846 else
4847 case $cross_compiling:$ac_tool_warned in
4848yes:)
4849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4851ac_tool_warned=yes ;;
4852esac
4853 CXX=$ac_pt_CXX
4854 fi
4855else
4856 CXX="$ac_cv_path_CXX"
4857fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 clang|*/clang) if test -n "$ac_tool_prefix"; then
4860 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4861set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_CXX+:} false; then :
4865 $as_echo_n "(cached) " >&6
4866else
4867 case $CXX in
4868 [\\/]* | ?:[\\/]*)
4869 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4870 ;;
4871 *)
4872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in notfound
4874do
4875 IFS=$as_save_IFS
4876 test -z "$as_dir" && as_dir=.
4877 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004879 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881 break 2
4882 fi
4883done
4884 done
4885IFS=$as_save_IFS
4886
Ned Deilycbfb9a52012-06-23 16:02:19 -07004887 ;;
4888esac
4889fi
4890CXX=$ac_cv_path_CXX
4891if test -n "$CXX"; then
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4893$as_echo "$CXX" >&6; }
4894else
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004899
4900fi
4901if test -z "$ac_cv_path_CXX"; then
4902 ac_pt_CXX=$CXX
4903 # Extract the first word of "clang++", so it can be a program name with args.
4904set dummy clang++; ac_word=$2
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906$as_echo_n "checking for $ac_word... " >&6; }
4907if ${ac_cv_path_ac_pt_CXX+:} false; then :
4908 $as_echo_n "(cached) " >&6
4909else
4910 case $ac_pt_CXX in
4911 [\\/]* | ?:[\\/]*)
4912 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4913 ;;
4914 *)
4915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4916for as_dir in notfound
4917do
4918 IFS=$as_save_IFS
4919 test -z "$as_dir" && as_dir=.
4920 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004922 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4924 break 2
4925 fi
4926done
4927 done
4928IFS=$as_save_IFS
4929
4930 ;;
4931esac
4932fi
4933ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4934if test -n "$ac_pt_CXX"; then
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4936$as_echo "$ac_pt_CXX" >&6; }
4937else
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939$as_echo "no" >&6; }
4940fi
4941
4942 if test "x$ac_pt_CXX" = x; then
4943 CXX="clang++"
4944 else
4945 case $cross_compiling:$ac_tool_warned in
4946yes:)
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4948$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4949ac_tool_warned=yes ;;
4950esac
4951 CXX=$ac_pt_CXX
4952 fi
4953else
4954 CXX="$ac_cv_path_CXX"
4955fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004956 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004957 icc|*/icc) if test -n "$ac_tool_prefix"; then
4958 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4959set dummy ${ac_tool_prefix}icpc; ac_word=$2
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961$as_echo_n "checking for $ac_word... " >&6; }
4962if ${ac_cv_path_CXX+:} false; then :
4963 $as_echo_n "(cached) " >&6
4964else
4965 case $CXX in
4966 [\\/]* | ?:[\\/]*)
4967 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4968 ;;
4969 *)
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in notfound
4972do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981done
4982 done
4983IFS=$as_save_IFS
4984
4985 ;;
4986esac
4987fi
4988CXX=$ac_cv_path_CXX
4989if test -n "$CXX"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4991$as_echo "$CXX" >&6; }
4992else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997
4998fi
4999if test -z "$ac_cv_path_CXX"; then
5000 ac_pt_CXX=$CXX
5001 # Extract the first word of "icpc", so it can be a program name with args.
5002set dummy icpc; ac_word=$2
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004$as_echo_n "checking for $ac_word... " >&6; }
5005if ${ac_cv_path_ac_pt_CXX+:} false; then :
5006 $as_echo_n "(cached) " >&6
5007else
5008 case $ac_pt_CXX in
5009 [\\/]* | ?:[\\/]*)
5010 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5011 ;;
5012 *)
5013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5014for as_dir in notfound
5015do
5016 IFS=$as_save_IFS
5017 test -z "$as_dir" && as_dir=.
5018 for ac_exec_ext in '' $ac_executable_extensions; do
5019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5020 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5022 break 2
5023 fi
5024done
5025 done
5026IFS=$as_save_IFS
5027
5028 ;;
5029esac
5030fi
5031ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5032if test -n "$ac_pt_CXX"; then
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5034$as_echo "$ac_pt_CXX" >&6; }
5035else
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037$as_echo "no" >&6; }
5038fi
5039
5040 if test "x$ac_pt_CXX" = x; then
5041 CXX="icpc"
5042 else
5043 case $cross_compiling:$ac_tool_warned in
5044yes:)
5045{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5046$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5047ac_tool_warned=yes ;;
5048esac
5049 CXX=$ac_pt_CXX
5050 fi
5051else
5052 CXX="$ac_cv_path_CXX"
5053fi
5054 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005055 esac
5056 if test "$CXX" = "notfound"
5057 then
5058 CXX=""
5059 fi
5060fi
5061if test -z "$CXX"
5062then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005063 if test -n "$ac_tool_prefix"; then
5064 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5065 do
5066 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5067set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005070if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005072else
5073 if test -n "$CXX"; then
5074 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5075else
5076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079 IFS=$as_save_IFS
5080 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005083 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005085 break 2
5086 fi
5087done
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090
5091fi
5092fi
5093CXX=$ac_cv_prog_CXX
5094if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5096$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005097else
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005100fi
5101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005103 test -n "$CXX" && break
5104 done
5105fi
5106if test -z "$CXX"; then
5107 ac_ct_CXX=$CXX
5108 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5109do
5110 # Extract the first word of "$ac_prog", so it can be a program name with args.
5111set dummy $ac_prog; ac_word=$2
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5113$as_echo_n "checking for $ac_word... " >&6; }
5114if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5115 $as_echo_n "(cached) " >&6
5116else
5117 if test -n "$ac_ct_CXX"; then
5118 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5119else
5120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5121for as_dir in $PATH
5122do
5123 IFS=$as_save_IFS
5124 test -z "$as_dir" && as_dir=.
5125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005127 ac_cv_prog_ac_ct_CXX="$ac_prog"
5128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5129 break 2
5130 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005132 done
5133IFS=$as_save_IFS
5134
5135fi
5136fi
5137ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5138if test -n "$ac_ct_CXX"; then
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5140$as_echo "$ac_ct_CXX" >&6; }
5141else
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5143$as_echo "no" >&6; }
5144fi
5145
5146
5147 test -n "$ac_ct_CXX" && break
5148done
5149
5150 if test "x$ac_ct_CXX" = x; then
5151 CXX="notfound"
5152 else
5153 case $cross_compiling:$ac_tool_warned in
5154yes:)
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5156$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5157ac_tool_warned=yes ;;
5158esac
5159 CXX=$ac_ct_CXX
5160 fi
5161fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005162
5163 if test "$CXX" = "notfound"
5164 then
5165 CXX=""
5166 fi
5167fi
5168if test "$preset_cxx" != "$CXX"
5169then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005170 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005171
5172 By default, distutils will build C++ extension modules with \"$CXX\".
5173 If this is not intended, then set CXX on the configure command line.
5174 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005175$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005176
5177 By default, distutils will build C++ extension modules with \"$CXX\".
5178 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005179 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005180fi
5181
5182
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005183MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5184
5185
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5187$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5188cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005189#undef bfin
5190#undef cris
5191#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005192#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005193#undef hppa
5194#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005195#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005196#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005197#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005198#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005200#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005201 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005202#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005203# if defined(__x86_64__) && defined(__LP64__)
5204 x86_64-linux-gnu
5205# elif defined(__x86_64__) && defined(__ILP32__)
5206 x86_64-linux-gnux32
5207# elif defined(__i386__)
5208 i386-linux-gnu
5209# elif defined(__aarch64__) && defined(__AARCH64EL__)
5210# if defined(__ILP32__)
5211 aarch64_ilp32-linux-gnu
5212# else
5213 aarch64-linux-gnu
5214# endif
5215# elif defined(__aarch64__) && defined(__AARCH64EB__)
5216# if defined(__ILP32__)
5217 aarch64_be_ilp32-linux-gnu
5218# else
5219 aarch64_be-linux-gnu
5220# endif
5221# elif defined(__alpha__)
5222 alpha-linux-gnu
5223# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5224# if defined(__ARMEL__)
5225 arm-linux-gnueabihf
5226# else
5227 armeb-linux-gnueabihf
5228# endif
5229# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5230# if defined(__ARMEL__)
5231 arm-linux-gnueabi
5232# else
5233 armeb-linux-gnueabi
5234# endif
5235# elif defined(__hppa__)
5236 hppa-linux-gnu
5237# elif defined(__ia64__)
5238 ia64-linux-gnu
5239# elif defined(__m68k__) && !defined(__mcoldfire__)
5240 m68k-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005241# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5242# if _MIPS_SIM == _ABIO32
5243 mipsisa32r6el-linux-gnu
5244# elif _MIPS_SIM == _ABIN32
5245 mipsisa64r6el-linux-gnuabin32
5246# elif _MIPS_SIM == _ABI64
5247 mipsisa64r6el-linux-gnuabi64
5248# else
5249# error unknown platform triplet
5250# endif
5251# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5252# if _MIPS_SIM == _ABIO32
5253 mipsisa32r6-linux-gnu
5254# elif _MIPS_SIM == _ABIN32
5255 mipsisa64r6-linux-gnuabin32
5256# elif _MIPS_SIM == _ABI64
5257 mipsisa64r6-linux-gnuabi64
5258# else
5259# error unknown platform triplet
5260# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005261# elif defined(__mips_hard_float) && defined(_MIPSEL)
5262# if _MIPS_SIM == _ABIO32
5263 mipsel-linux-gnu
5264# elif _MIPS_SIM == _ABIN32
5265 mips64el-linux-gnuabin32
5266# elif _MIPS_SIM == _ABI64
5267 mips64el-linux-gnuabi64
5268# else
5269# error unknown platform triplet
5270# endif
5271# elif defined(__mips_hard_float)
5272# if _MIPS_SIM == _ABIO32
5273 mips-linux-gnu
5274# elif _MIPS_SIM == _ABIN32
5275 mips64-linux-gnuabin32
5276# elif _MIPS_SIM == _ABI64
5277 mips64-linux-gnuabi64
5278# else
5279# error unknown platform triplet
5280# endif
5281# elif defined(__or1k__)
5282 or1k-linux-gnu
5283# elif defined(__powerpc__) && defined(__SPE__)
5284 powerpc-linux-gnuspe
5285# elif defined(__powerpc64__)
5286# if defined(__LITTLE_ENDIAN__)
5287 powerpc64le-linux-gnu
5288# else
5289 powerpc64-linux-gnu
5290# endif
5291# elif defined(__powerpc__)
5292 powerpc-linux-gnu
5293# elif defined(__s390x__)
5294 s390x-linux-gnu
5295# elif defined(__s390__)
5296 s390-linux-gnu
5297# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5298 sh4-linux-gnu
5299# elif defined(__sparc__) && defined(__arch64__)
5300 sparc64-linux-gnu
5301# elif defined(__sparc__)
5302 sparc-linux-gnu
Miss Islington (bot)0596f312018-05-01 07:40:17 -07005303# elif defined(__riscv)
5304# if __riscv_xlen == 32
5305 riscv32-linux-gnu
5306# elif __riscv_xlen == 64
5307 riscv64-linux-gnu
5308# else
5309# error unknown platform triplet
5310# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005311# else
5312# error unknown platform triplet
5313# endif
5314#elif defined(__FreeBSD_kernel__)
5315# if defined(__LP64__)
5316 x86_64-kfreebsd-gnu
5317# elif defined(__i386__)
5318 i386-kfreebsd-gnu
5319# else
5320# error unknown platform triplet
5321# endif
5322#elif defined(__gnu_hurd__)
5323 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005324#elif defined(__APPLE__)
5325 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326#else
5327# error unknown platform triplet
5328#endif
5329
5330EOF
5331
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005332if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5335$as_echo "$PLATFORM_TRIPLET" >&6; }
5336else
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5338$as_echo "none" >&6; }
5339fi
5340rm -f conftest.c conftest.out
5341
5342if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5343 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5344 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5345 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005346elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5347 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005348fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005349
doko@ubuntu.com55532312016-06-14 08:55:19 +02005350if test x$MULTIARCH != x; then
5351 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5352fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005353
5354
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5356$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5357save_LDFLAGS="$LDFLAGS"
5358LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005359
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361/* end confdefs.h. */
5362
5363int
5364main ()
5365{
5366
5367 ;
5368 return 0;
5369}
5370_ACEOF
5371if ac_fn_c_try_link "$LINENO"; then :
5372 NO_AS_NEEDED="-Wl,--no-as-needed"
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5374$as_echo "yes" >&6; }
5375else
5376 NO_AS_NEEDED=""
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5378$as_echo "no" >&6; }
5379fi
5380rm -f core conftest.err conftest.$ac_objext \
5381 conftest$ac_exeext conftest.$ac_ext
5382LDFLAGS="$save_LDFLAGS"
5383
5384
5385
5386# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387
Matthias Kloseb9621712010-04-24 17:59:49 +00005388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5389$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005390if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392else
5393 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5394 then ac_cv_path_EGREP="$GREP -E"
5395 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 # Loop through the user's path and test for each of PROGNAME-LIST
5399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5401do
5402 IFS=$as_save_IFS
5403 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 for ac_prog in egrep; do
5405 for ac_exec_ext in '' $ac_executable_extensions; do
5406 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005407 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005408# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 # Check for GNU $ac_path_EGREP
5410case `"$ac_path_EGREP" --version 2>&1` in
5411*GNU*)
5412 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5413*)
5414 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 while :
5417 do
5418 cat "conftest.in" "conftest.in" >"conftest.tmp"
5419 mv "conftest.tmp" "conftest.in"
5420 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005421 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005422 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5423 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5426 # Best one so far, save it but keep looking for a better one
5427 ac_cv_path_EGREP="$ac_path_EGREP"
5428 ac_path_EGREP_max=$ac_count
5429 fi
5430 # 10*(2^10) chars as input seems more than enough
5431 test $ac_count -gt 10 && break
5432 done
5433 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5434esac
5435
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 $ac_path_EGREP_found && break 3
5437 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005438 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005440IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005442 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 +00005443 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005444else
5445 ac_cv_path_EGREP=$EGREP
5446fi
5447
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448 fi
5449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5451$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005452 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005453
5454
Matthias Kloseb9621712010-04-24 17:59:49 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5456$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005457if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 $as_echo_n "(cached) " >&6
5459else
5460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005461/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005462#include <stdlib.h>
5463#include <stdarg.h>
5464#include <string.h>
5465#include <float.h>
5466
5467int
5468main ()
5469{
5470
5471 ;
5472 return 0;
5473}
5474_ACEOF
5475if ac_fn_c_try_compile "$LINENO"; then :
5476 ac_cv_header_stdc=yes
5477else
5478 ac_cv_header_stdc=no
5479fi
5480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5481
5482if test $ac_cv_header_stdc = yes; then
5483 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5485/* end confdefs.h. */
5486#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005487
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005488_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005490 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005492else
Matthias Kloseb9621712010-04-24 17:59:49 +00005493 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005494fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005495rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Matthias Kloseb9621712010-04-24 17:59:49 +00005497fi
5498
5499if test $ac_cv_header_stdc = yes; then
5500 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502/* end confdefs.h. */
5503#include <stdlib.h>
5504
5505_ACEOF
5506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5507 $EGREP "free" >/dev/null 2>&1; then :
5508
5509else
5510 ac_cv_header_stdc=no
5511fi
5512rm -f conftest*
5513
5514fi
5515
5516if test $ac_cv_header_stdc = yes; then
5517 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5518 if test "$cross_compiling" = yes; then :
5519 :
5520else
5521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5522/* end confdefs.h. */
5523#include <ctype.h>
5524#include <stdlib.h>
5525#if ((' ' & 0x0FF) == 0x020)
5526# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5527# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5528#else
5529# define ISLOWER(c) \
5530 (('a' <= (c) && (c) <= 'i') \
5531 || ('j' <= (c) && (c) <= 'r') \
5532 || ('s' <= (c) && (c) <= 'z'))
5533# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5534#endif
5535
5536#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5537int
5538main ()
5539{
5540 int i;
5541 for (i = 0; i < 256; i++)
5542 if (XOR (islower (i), ISLOWER (i))
5543 || toupper (i) != TOUPPER (i))
5544 return 2;
5545 return 0;
5546}
5547_ACEOF
5548if ac_fn_c_try_run "$LINENO"; then :
5549
5550else
5551 ac_cv_header_stdc=no
5552fi
5553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5554 conftest.$ac_objext conftest.beam conftest.$ac_ext
5555fi
5556
5557fi
5558fi
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5560$as_echo "$ac_cv_header_stdc" >&6; }
5561if test $ac_cv_header_stdc = yes; then
5562
5563$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5564
5565fi
5566
5567# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5568for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5569 inttypes.h stdint.h unistd.h
5570do :
5571 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5572ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5573"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005574if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005575 cat >>confdefs.h <<_ACEOF
5576#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5577_ACEOF
5578
5579fi
5580
5581done
5582
5583
5584
5585 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 +02005586if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005587 MINIX=yes
5588else
5589 MINIX=
5590fi
5591
5592
5593 if test "$MINIX" = yes; then
5594
5595$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5596
5597
5598$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5599
5600
5601$as_echo "#define _MINIX 1" >>confdefs.h
5602
5603 fi
5604
5605
5606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5607$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005608if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 $as_echo_n "(cached) " >&6
5610else
5611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5612/* end confdefs.h. */
5613
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005614# define __EXTENSIONS__ 1
5615 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005616int
5617main ()
5618{
5619
5620 ;
5621 return 0;
5622}
5623_ACEOF
5624if ac_fn_c_try_compile "$LINENO"; then :
5625 ac_cv_safe_to_define___extensions__=yes
5626else
5627 ac_cv_safe_to_define___extensions__=no
5628fi
5629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5630fi
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5632$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5633 test $ac_cv_safe_to_define___extensions__ = yes &&
5634 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5635
5636 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5637
5638 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5639
5640 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5641
5642 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5643
5644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645
Xavier de Gaye95750b12016-07-09 11:05:42 +02005646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5647$as_echo_n "checking for the Android API level... " >&6; }
5648cat >> conftest.c <<EOF
5649#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005650android_api = __ANDROID_API__
5651arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005652#else
5653#error not Android
5654#endif
5655EOF
5656
5657if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005658 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5659 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5661$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005662 if test -z "$ANDROID_API_LEVEL"; then
5663 echo 'Fatal: you must define __ANDROID_API__'
5664 exit 1
5665 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005666
5667cat >>confdefs.h <<_ACEOF
5668#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5669_ACEOF
5670
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005671
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5673$as_echo_n "checking for the Android arm ABI... " >&6; }
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5675$as_echo "$_arm_arch" >&6; }
5676 if test "$_arm_arch" = 7; then
5677 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5678 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5679 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005680else
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5682$as_echo "not Android" >&6; }
5683fi
5684rm -f conftest.c conftest.out
5685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686# Check for unsupported systems
5687case $ac_sys_system/$ac_sys_release in
5688atheos*|Linux*/1*)
5689 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5690 echo See README for details.
5691 exit 1;;
5692esac
5693
5694
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5696$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005699if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 withval=$with_suffix;
5701 case $withval in
5702 no) EXEEXT=;;
5703 yes) EXEEXT=.exe;;
5704 *) EXEEXT=$withval;;
5705 esac
5706fi
5707
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5709$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
5711# Test whether we're running on a non-case-sensitive system, in which
5712# case we give a warning if no ext is given
5713
Matthias Kloseb9621712010-04-24 17:59:49 +00005714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5715$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716if test ! -d CaseSensitiveTestDir; then
5717mkdir CaseSensitiveTestDir
5718fi
5719
5720if test -d casesensitivetestdir
5721then
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5723$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 BUILDEXEEXT=.exe
5725else
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 BUILDEXEEXT=$EXEEXT
5729fi
5730rmdir CaseSensitiveTestDir
5731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732case $ac_sys_system in
5733hp*|HP*)
5734 case $CC in
5735 cc|*/cc) CC="$CC -Ae";;
5736 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737esac
5738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5741$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742if test -z "$LIBRARY"
5743then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005744 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5747$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748
5749# LDLIBRARY is the name of the library to link against (as opposed to the
5750# name of the library into which to insert object files). BLDLIBRARY is also
5751# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5752# is blank as the main program is not linked directly against LDLIBRARY.
5753# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5754# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5755# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5756# DLLLIBRARY is the shared (i.e., DLL) library.
5757#
5758# RUNSHARED is used to run shared python without installed libraries
5759#
5760# INSTSONAME is the name of the shared library that will be use to install
5761# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005762#
5763# LDVERSION is the shared library version number, normally the Python version
5764# with the ABI build flags appended.
5765
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766
5767
5768
5769
5770
5771
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773LDLIBRARY="$LIBRARY"
5774BLDLIBRARY='$(LDLIBRARY)'
5775INSTSONAME='$(LDLIBRARY)'
5776DLLLIBRARY=''
5777LDLIBRARYDIR=''
5778RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005779LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
5781# LINKCC is the command that links the python executable -- default is $(CC).
5782# If CXX is set, and if it is needed to link a main function that was
5783# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5784# python might then depend on the C++ runtime
5785# This is altered for AIX in order to build the export list before
5786# linking.
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5789$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790if test -z "$LINKCC"
5791then
5792 LINKCC='$(PURIFY) $(MAINCC)'
5793 case $ac_sys_system in
5794 AIX*)
5795 exp_extra="\"\""
5796 if test $ac_sys_release -ge 5 -o \
5797 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5798 exp_extra="."
5799 fi
5800 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 QNX*)
5802 # qcc must be used because the other compilers do not
5803 # support -N.
5804 LINKCC=qcc;;
5805 esac
5806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5808$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
5810# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5811# make sure we default having it set to "no": this is used by
5812# distutils.unixccompiler to know if it should add --enable-new-dtags
5813# to linker command lines, and failing to detect GNU ld simply results
5814# in the same bahaviour as before.
5815
Matthias Kloseb9621712010-04-24 17:59:49 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5817$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818ac_prog=ld
5819if test "$GCC" = yes; then
5820 ac_prog=`$CC -print-prog-name=ld`
5821fi
5822case `"$ac_prog" -V 2>&1 < /dev/null` in
5823 *GNU*)
5824 GNULD=yes;;
5825 *)
5826 GNULD=no;;
5827esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5829$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 enableval=$enable_shared;
5836fi
5837
5838
5839if test -z "$enable_shared"
5840then
5841 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005842 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843 enable_shared="yes";;
5844 *)
5845 enable_shared="no";;
5846 esac
5847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5849$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855 enableval=$enable_profiling;
5856fi
5857
5858if test "x$enable_profiling" = xyes; then
5859 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005860 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862/* end confdefs.h. */
5863int main() { return 0; }
5864_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865if ac_fn_c_try_link "$LINENO"; then :
5866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005870rm -f core conftest.err conftest.$ac_objext \
5871 conftest$ac_exeext conftest.$ac_ext
5872 CC="$ac_save_cc"
5873else
5874 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5877$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879if test "x$enable_profiling" = xyes; then
5880 BASECFLAGS="-pg $BASECFLAGS"
5881 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5885$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5888# library that we build, but we do not want to link against it (we
5889# will find it with a -framework option). For this reason there is an
5890# extra variable BLDLIBRARY against which Python and the extension
5891# modules are linked, BLDLIBRARY. This is normally the same as
5892# LDLIBRARY, but empty for MacOSX framework builds.
5893if test "$enable_framework"
5894then
5895 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 BLDLIBRARY=''
5898else
5899 BLDLIBRARY='$(LDLIBRARY)'
5900fi
5901
5902# Other platforms follow
5903if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005904 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 case $ac_sys_system in
5909 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).dll.a'
5911 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
5915 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005918 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005919 then
5920 PY3LIBRARY=libpython3.so
5921 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005923 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 hp*|HP*)
5934 case `uname -m` in
5935 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
5938 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).dylib'
5947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005950 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
5955 esac
5956else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005957 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 case $ac_sys_system in
5959 CYGWIN*)
5960 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 esac
5964fi
5965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005966if test "$cross_compiling" = yes; then
5967 RUNSHARED=
5968fi
5969
Matthias Kloseb9621712010-04-24 17:59:49 +00005970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5971$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005974if test -n "$ac_tool_prefix"; then
5975 for ac_prog in ar aal
5976 do
5977 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5978set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5980$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005981if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983else
5984 if test -n "$AR"; then
5985 ac_cv_prog_AR="$AR" # Let the user override the test.
5986else
5987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5988for as_dir in $PATH
5989do
5990 IFS=$as_save_IFS
5991 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005993 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005994 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996 break 2
5997 fi
5998done
Matthias Kloseb9621712010-04-24 17:59:49 +00005999 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000IFS=$as_save_IFS
6001
6002fi
6003fi
6004AR=$ac_cv_prog_AR
6005if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6007$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008else
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011fi
6012
6013
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006014 test -n "$AR" && break
6015 done
6016fi
6017if test -z "$AR"; then
6018 ac_ct_AR=$AR
6019 for ac_prog in ar aal
6020do
6021 # Extract the first word of "$ac_prog", so it can be a program name with args.
6022set dummy $ac_prog; ac_word=$2
6023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024$as_echo_n "checking for $ac_word... " >&6; }
6025if ${ac_cv_prog_ac_ct_AR+:} false; then :
6026 $as_echo_n "(cached) " >&6
6027else
6028 if test -n "$ac_ct_AR"; then
6029 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6030else
6031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
6035 test -z "$as_dir" && as_dir=.
6036 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006038 ac_cv_prog_ac_ct_AR="$ac_prog"
6039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6040 break 2
6041 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006043 done
6044IFS=$as_save_IFS
6045
6046fi
6047fi
6048ac_ct_AR=$ac_cv_prog_ac_ct_AR
6049if test -n "$ac_ct_AR"; then
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6051$as_echo "$ac_ct_AR" >&6; }
6052else
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054$as_echo "no" >&6; }
6055fi
6056
6057
6058 test -n "$ac_ct_AR" && break
6059done
6060
6061 if test "x$ac_ct_AR" = x; then
6062 AR="ar"
6063 else
6064 case $cross_compiling:$ac_tool_warned in
6065yes:)
6066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6068ac_tool_warned=yes ;;
6069esac
6070 AR=$ac_ct_AR
6071 fi
6072fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073
6074
6075# tweak ARFLAGS only if the user didn't set it on the command line
6076
6077if test -z "$ARFLAGS"
6078then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006079 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080fi
6081
doko@ubuntu.com58844492012-06-30 18:25:32 +02006082if test -n "$ac_tool_prefix"; then
6083 for ac_prog in readelf
6084 do
6085 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6086set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6088$as_echo_n "checking for $ac_word... " >&6; }
6089if ${ac_cv_prog_READELF+:} false; then :
6090 $as_echo_n "(cached) " >&6
6091else
6092 if test -n "$READELF"; then
6093 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6094else
6095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6096for as_dir in $PATH
6097do
6098 IFS=$as_save_IFS
6099 test -z "$as_dir" && as_dir=.
6100 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006102 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6104 break 2
6105 fi
6106done
6107 done
6108IFS=$as_save_IFS
6109
6110fi
6111fi
6112READELF=$ac_cv_prog_READELF
6113if test -n "$READELF"; then
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6115$as_echo "$READELF" >&6; }
6116else
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118$as_echo "no" >&6; }
6119fi
6120
6121
6122 test -n "$READELF" && break
6123 done
6124fi
6125if test -z "$READELF"; then
6126 ac_ct_READELF=$READELF
6127 for ac_prog in readelf
6128do
6129 # Extract the first word of "$ac_prog", so it can be a program name with args.
6130set dummy $ac_prog; ac_word=$2
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6132$as_echo_n "checking for $ac_word... " >&6; }
6133if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6134 $as_echo_n "(cached) " >&6
6135else
6136 if test -n "$ac_ct_READELF"; then
6137 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6138else
6139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH
6141do
6142 IFS=$as_save_IFS
6143 test -z "$as_dir" && as_dir=.
6144 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006146 ac_cv_prog_ac_ct_READELF="$ac_prog"
6147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6148 break 2
6149 fi
6150done
6151 done
6152IFS=$as_save_IFS
6153
6154fi
6155fi
6156ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6157if test -n "$ac_ct_READELF"; then
6158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6159$as_echo "$ac_ct_READELF" >&6; }
6160else
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6162$as_echo "no" >&6; }
6163fi
6164
6165
6166 test -n "$ac_ct_READELF" && break
6167done
6168
6169 if test "x$ac_ct_READELF" = x; then
6170 READELF=":"
6171 else
6172 case $cross_compiling:$ac_tool_warned in
6173yes:)
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6176ac_tool_warned=yes ;;
6177esac
6178 READELF=$ac_ct_READELF
6179 fi
6180fi
6181
6182if test "$cross_compiling" = yes; then
6183 case "$READELF" in
6184 readelf|:)
6185 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6186 ;;
6187 esac
6188fi
6189
6190
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006193hp*|HP*)
6194 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 if test -z "$INSTALL"
6196 then
6197 INSTALL="${srcdir}/install-sh -c"
6198 fi
6199esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200# Find a good install program. We prefer a C program (faster),
6201# so one script is as good as another. But avoid the broken or
6202# incompatible versions:
6203# SysV /etc/install, /usr/sbin/install
6204# SunOS /usr/etc/install
6205# IRIX /sbin/install
6206# AIX /bin/install
6207# AmigaOS /C/install, which installs bootblocks on floppy discs
6208# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6209# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6210# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6211# OS/2's system install, which has a completely different semantic
6212# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006213# Reject install programs that cannot install multiple files.
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6215$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006217if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006218 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219else
6220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6221for as_dir in $PATH
6222do
6223 IFS=$as_save_IFS
6224 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 # Account for people who put trailing slashes in PATH elements.
6226case $as_dir/ in #((
6227 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230 /usr/ucb/* ) ;;
6231 *)
6232 # OSF1 and SCO ODT 3.0 have their own names for install.
6233 # Don't use installbsd from OSF since it installs stuff as root
6234 # by default.
6235 for ac_prog in ginstall scoinst install; do
6236 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006237 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238 if test $ac_prog = install &&
6239 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6240 # AIX install. It has an incompatible calling convention.
6241 :
6242 elif test $ac_prog = install &&
6243 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6244 # program-specific install script used by HP pwplus--don't use.
6245 :
6246 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006247 rm -rf conftest.one conftest.two conftest.dir
6248 echo one > conftest.one
6249 echo two > conftest.two
6250 mkdir conftest.dir
6251 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6252 test -s conftest.one && test -s conftest.two &&
6253 test -s conftest.dir/conftest.one &&
6254 test -s conftest.dir/conftest.two
6255 then
6256 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6257 break 3
6258 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006259 fi
6260 fi
6261 done
6262 done
6263 ;;
6264esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006265
6266 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267IFS=$as_save_IFS
6268
Matthias Kloseb9621712010-04-24 17:59:49 +00006269rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270
6271fi
6272 if test "${ac_cv_path_install+set}" = set; then
6273 INSTALL=$ac_cv_path_install
6274 else
6275 # As a last resort, use the slow shell script. Don't cache a
6276 # value for INSTALL within a source directory, because that will
6277 # break other packages using the cache if that directory is
6278 # removed, or if the value is a relative name.
6279 INSTALL=$ac_install_sh
6280 fi
6281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6283$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284
6285# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6286# It thinks the first close brace ends the variable substitution.
6287test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6288
6289test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6290
6291test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6292
Matthias Klose93a0ef12012-03-15 18:08:34 +01006293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6294$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6295if test -z "$MKDIR_P"; then
6296 if ${ac_cv_path_mkdir+:} false; then :
6297 $as_echo_n "(cached) " >&6
6298else
6299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6300for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6301do
6302 IFS=$as_save_IFS
6303 test -z "$as_dir" && as_dir=.
6304 for ac_prog in mkdir gmkdir; do
6305 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006306 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006307 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6308 'mkdir (GNU coreutils) '* | \
6309 'mkdir (coreutils) '* | \
6310 'mkdir (fileutils) '4.1*)
6311 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6312 break 3;;
6313 esac
6314 done
6315 done
6316 done
6317IFS=$as_save_IFS
6318
6319fi
6320
6321 test -d ./--version && rmdir ./--version
6322 if test "${ac_cv_path_mkdir+set}" = set; then
6323 MKDIR_P="$ac_cv_path_mkdir -p"
6324 else
6325 # As a last resort, use the slow shell script. Don't cache a
6326 # value for MKDIR_P within a source directory, because that will
6327 # break other packages using the cache if that directory is
6328 # removed, or if the value is a relative name.
6329 MKDIR_P="$ac_install_sh -d"
6330 fi
6331fi
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6333$as_echo "$MKDIR_P" >&6; }
6334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335
6336# Not every filesystem supports hard links
6337
6338if test -z "$LN" ; then
6339 case $ac_sys_system in
6340 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 *) LN=ln;;
6342 esac
6343fi
6344
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006345# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006346
6347ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6351$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006352
6353# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006354if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355 withval=$with_pydebug;
6356if test "$withval" != no
6357then
6358
Matthias Kloseb9621712010-04-24 17:59:49 +00006359$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6362$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006364 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006365else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6366$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367fi
6368else
Matthias Kloseb9621712010-04-24 17:59:49 +00006369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371fi
6372
6373
T. Woutersddbfa2c2017-05-23 01:30:49 +02006374# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6375# the ABI. This allows enabling assertions without changing the ABI.
6376assertions='false'
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6378$as_echo_n "checking for --with-assertions... " >&6; }
6379
6380# Check whether --with-assertions was given.
6381if test "${with_assertions+set}" = set; then :
6382 withval=$with_assertions;
6383if test "$withval" != no
6384then
6385 assertions='true'
6386fi
6387fi
6388
6389if test "$assertions" = 'true'; then
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6391$as_echo "yes" >&6; }
6392elif test "$Py_DEBUG" = 'true'; then
6393 assertions='true'
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6395$as_echo "implied by --with-pydebug" >&6; }
6396else
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398$as_echo "no" >&6; }
6399fi
6400
Brett Cannon63d98bc2016-09-06 17:12:40 -07006401# Enable optimization flags
6402
6403
6404Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6406$as_echo_n "checking for --enable-optimizations... " >&6; }
6407# Check whether --enable-optimizations was given.
6408if test "${enable_optimizations+set}" = set; then :
6409 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006410if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006411then
6412 Py_OPT='true'
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6414$as_echo "yes" >&6; };
6415else
6416 Py_OPT='false'
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; };
6419fi
6420else
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006426 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6427 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006428 # 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 +00006429 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006430 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006431 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006432 DEF_MAKE_RULE="build_all"
6433else
6434 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006435 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006436 DEF_MAKE_RULE="all"
6437fi
6438
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006439# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6441$as_echo_n "checking for --with-lto... " >&6; }
6442
6443# Check whether --with-lto was given.
6444if test "${with_lto+set}" = set; then :
6445 withval=$with_lto;
6446if test "$withval" != no
6447then
6448 Py_LTO='true'
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6450$as_echo "yes" >&6; };
6451else
6452 Py_LTO='false'
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454$as_echo "no" >&6; };
6455fi
6456else
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }
6459fi
6460
6461if test "$Py_LTO" = 'true' ; then
6462 case $CC in
6463 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006464 case $ac_sys_system in
6465 Darwin*)
6466 # Any changes made here should be reflected in the GCC+Darwin case below
6467 LTOFLAGS="-flto -Wl,-export_dynamic"
6468 ;;
6469 *)
6470 LTOFLAGS="-flto"
6471 ;;
6472 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006473 ;;
6474 *gcc*)
6475 case $ac_sys_system in
6476 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006477 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006478 ;;
6479 *)
6480 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6481 ;;
6482 esac
6483 ;;
6484 esac
Miss Islington (bot)1bb9dd32018-06-22 00:10:20 -07006485
6486 if test "$ac_cv_prog_cc_g" = "yes"
6487 then
6488 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6489 # to get debug symbols.
6490 LTOFLAGS="$LTOFLAGS -g"
6491 fi
6492
octaviansoldea4c814012017-09-08 12:14:33 -07006493 CFLAGS="$CFLAGS $LTOFLAGS"
6494 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006495fi
6496
Brett Cannon7188a3e2015-09-18 15:13:44 -07006497# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006498
6499
6500
6501
6502
Gregory P. Smith799520c2016-09-07 16:10:00 -07006503# Make this work on systems where llvm tools are not installed with their
6504# normal names in the default $PATH (ie: Ubuntu). They exist under the
6505# non-suffixed name in their versioned llvm directory.
6506llvm_bin_dir=''
6507llvm_path="${PATH}"
6508if test "${CC}" = "clang"
6509then
6510 clang_bin=`which clang`
6511 # Some systems install clang elsewhere as a symlink to the real path
6512 # which is where the related llvm tools are located.
6513 if test -L "${clang_bin}"
6514 then
6515 clang_dir=`dirname "${clang_bin}"`
6516 clang_bin=`readlink "${clang_bin}"`
6517 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6518 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6519 fi
6520fi
Zachary Ware5af85642015-12-21 12:09:17 -06006521
Gregory P. Smith799520c2016-09-07 16:10:00 -07006522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6523$as_echo_n "checking target system type... " >&6; }
6524if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006525 $as_echo_n "(cached) " >&6
6526else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006527 if test "x$target_alias" = x; then
6528 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006529else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006530 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6531 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6532fi
6533
6534fi
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6536$as_echo "$ac_cv_target" >&6; }
6537case $ac_cv_target in
6538*-*-*) ;;
6539*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6540esac
6541target=$ac_cv_target
6542ac_save_IFS=$IFS; IFS='-'
6543set x $ac_cv_target
6544shift
6545target_cpu=$1
6546target_vendor=$2
6547shift; shift
6548# Remember, the first character of IFS is used to create $*,
6549# except with old shells:
6550target_os=$*
6551IFS=$ac_save_IFS
6552case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6553
6554
6555# The aliases save the names the user supplied, while $host etc.
6556# will get canonicalized.
6557test -n "$target_alias" &&
6558 test "$program_prefix$program_suffix$program_transform_name" = \
6559 NONENONEs,x,x, &&
6560 program_prefix=${target_alias}-
6561# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6562set dummy $target_alias-llvm-profdata; ac_word=$2
6563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6564$as_echo_n "checking for $ac_word... " >&6; }
6565if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6566 $as_echo_n "(cached) " >&6
6567else
6568 case $LLVM_PROFDATA in
6569 [\\/]* | ?:[\\/]*)
6570 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6571 ;;
6572 *)
6573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6574for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006575do
6576 IFS=$as_save_IFS
6577 test -z "$as_dir" && as_dir=.
6578 for ac_exec_ext in '' $ac_executable_extensions; do
6579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006580 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6582 break 2
6583 fi
6584done
6585 done
6586IFS=$as_save_IFS
6587
Gregory P. Smith799520c2016-09-07 16:10:00 -07006588 ;;
6589esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006590fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006591LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6592if test -n "$LLVM_PROFDATA"; then
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6594$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006595else
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6597$as_echo "no" >&6; }
6598fi
6599
6600
Gregory P. Smith799520c2016-09-07 16:10:00 -07006601if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6602 if test "$build" = "$target"; then
6603 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6604 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6605set dummy llvm-profdata; ac_word=$2
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6607$as_echo_n "checking for $ac_word... " >&6; }
6608if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6609 $as_echo_n "(cached) " >&6
6610else
6611 case $ac_pt_LLVM_PROFDATA in
6612 [\\/]* | ?:[\\/]*)
6613 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6614 ;;
6615 *)
6616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6617for as_dir in ${llvm_path}
6618do
6619 IFS=$as_save_IFS
6620 test -z "$as_dir" && as_dir=.
6621 for ac_exec_ext in '' $ac_executable_extensions; do
6622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6623 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6625 break 2
6626 fi
6627done
6628 done
6629IFS=$as_save_IFS
6630
6631 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6632 ;;
6633esac
6634fi
6635ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6636if test -n "$ac_pt_LLVM_PROFDATA"; then
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6638$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6639else
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6641$as_echo "no" >&6; }
6642fi
6643
6644 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6645 else
6646 LLVM_PROFDATA="''"
6647 fi
6648else
6649 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6650fi
6651
6652
6653if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6654then
6655 LLVM_PROF_FOUND="found"
6656else
6657 LLVM_PROF_FOUND="not-found"
6658fi
6659if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6660then
6661 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6662 if test -n "${found_llvm_profdata}"
6663 then
6664 # llvm-profdata isn't directly in $PATH in some cases.
6665 # https://apple.stackexchange.com/questions/197053/
6666 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6667 LLVM_PROF_FOUND=found
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6669$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6670 fi
6671fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672LLVM_PROF_ERR=no
6673case $CC in
6674 *clang*)
6675 # Any changes made here should be reflected in the GCC+Darwin case below
6676 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6677 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006678 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006679 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6680 if test $LLVM_PROF_FOUND = not-found
6681 then
6682 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006683 if test "${REQUIRE_PGO}" = "yes"
6684 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006685 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 -07006686 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006687 fi
6688 ;;
6689 *gcc*)
6690 case $ac_sys_system in
6691 Darwin*)
6692 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6693 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006694 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006695 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006696 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006697 then
6698 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006699 if test "${REQUIRE_PGO}" = "yes"
6700 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006701 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 -07006702 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703 fi
6704 ;;
6705 *)
6706 PGO_PROF_GEN_FLAG="-fprofile-generate"
6707 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6708 LLVM_PROF_MERGER="true"
6709 LLVM_PROF_FILE=""
6710 ;;
6711 esac
6712 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006713 *icc*)
6714 PGO_PROF_GEN_FLAG="-prof-gen"
6715 PGO_PROF_USE_FLAG="-prof-use"
6716 LLVM_PROF_MERGER="true"
6717 LLVM_PROF_FILE=""
6718 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006719esac
6720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6722# merged with this chunk of code?
6723
6724# Optimizer/debugger flags
6725# ------------------------
6726# (The following bit of code is complicated enough - please keep things
6727# indented properly. Just pretend you're editing Python code. ;-)
6728
6729# There are two parallel sets of case statements below, one that checks to
6730# see if OPT was set and one that does BASECFLAGS setting based upon
6731# compiler and platform. BASECFLAGS tweaks need to be made even if the
6732# user set OPT.
6733
6734# tweak OPT based on compiler and platform, only if the user didn't set
6735# it on the command line
6736
Victor Stinner9ed34a82017-05-02 22:35:58 +02006737
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006738if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739then
6740 case $GCC in
6741 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006742 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6743 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6744 WRAP="-fwrapv"
6745 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006746
Stefan Krahaf04ff22011-12-08 22:20:31 +01006747 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006748 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006749 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006750 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006751 *)
6752 if $CC --version 2>&1 | grep -q clang
6753 then
6754 cc_is_clang=1
6755 else
6756 cc_is_clang=
6757 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006758 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006759
Victor Stinner35f3d242017-04-21 12:35:24 +02006760 if test -n "${cc_is_clang}"
6761 then
6762 # Clang also needs -fwrapv
6763 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006764 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6765 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006766 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006767 fi
6768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769 case $ac_cv_prog_cc_g in
6770 yes)
6771 if test "$Py_DEBUG" = 'true' ; then
6772 # Optimization messes up debuggers, so turn it off for
6773 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006774 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006775 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006776 else
Victor Stinner28205b22017-04-21 11:24:34 +02006777 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006778 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779 else
Victor Stinner28205b22017-04-21 11:24:34 +02006780 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781 fi
6782 ;;
6783 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006784 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006785 ;;
6786 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788 case $ac_sys_system in
6789 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6790 ;;
6791 esac
6792 ;;
6793
6794 *)
6795 OPT="-O"
6796 ;;
6797 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006798fi
6799
6800
6801
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803# The -arch flags for universal builds on OSX
6804UNIVERSAL_ARCH_FLAGS=
6805
6806
6807# tweak BASECFLAGS based on compiler and platform
6808case $GCC in
6809yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006810 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006811
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6813$as_echo_n "checking for -Wextra... " >&6; }
6814 ac_save_cc="$CC"
6815 CC="$CC -Wextra -Werror"
6816 if ${ac_cv_extra_warnings+:} false; then :
6817 $as_echo_n "(cached) " >&6
6818else
6819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6820/* end confdefs.h. */
6821
6822
6823int
6824main ()
6825{
6826
6827 ;
6828 return 0;
6829}
6830
6831_ACEOF
6832if ac_fn_c_try_compile "$LINENO"; then :
6833
6834 ac_cv_extra_warnings=yes
6835
6836else
6837
6838 ac_cv_extra_warnings=no
6839
6840fi
6841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6842fi
6843
6844 CC="$ac_save_cc"
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6846$as_echo "$ac_cv_extra_warnings" >&6; }
6847
6848 if test $ac_cv_extra_warnings = yes
6849 then
6850 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6851 fi
6852
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006853 # Python doesn't violate C99 aliasing rules, but older versions of
6854 # GCC produce warnings for legal Python code. Enable
6855 # -fno-strict-aliasing on versions of GCC that support but produce
6856 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6858$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 ac_save_cc="$CC"
6860 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006861 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006862 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006863 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006864else
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006867
Matthias Kloseb159a552010-04-25 21:00:44 +00006868
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006869int
6870main ()
6871{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006872
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006873 ;
6874 return 0;
6875}
Matthias Kloseb159a552010-04-25 21:00:44 +00006876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006878if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006879
6880 CC="$ac_save_cc -fstrict-aliasing"
6881 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006883/* end confdefs.h. */
6884
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006885 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006886int
6887main ()
6888{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006889double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006890 ;
6891 return 0;
6892}
Matthias Kloseb159a552010-04-25 21:00:44 +00006893
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006895if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006896
6897 ac_cv_no_strict_aliasing=no
6898
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899else
Matthias Kloseb159a552010-04-25 21:00:44 +00006900
6901 ac_cv_no_strict_aliasing=yes
6902
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006903fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006905
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006906else
Matthias Kloseb159a552010-04-25 21:00:44 +00006907
6908 ac_cv_no_strict_aliasing=no
6909
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006912fi
6913
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006914 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6917$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006918 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 then
6920 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6921 fi
6922
Zachary Ware5af85642015-12-21 12:09:17 -06006923 # ICC doesn't recognize the option, but only emits a warning
6924 ## XXX does it emit an unused result warning and can it be disabled?
6925 case "$CC" in
6926 *icc*)
6927 ac_cv_disable_unused_result_warning=no
6928 ;;
6929 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6931$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6932 ac_save_cc="$CC"
6933 CC="$CC -Wunused-result -Werror"
6934 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006935 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006936 $as_echo_n "(cached) " >&6
6937else
6938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6939/* end confdefs.h. */
6940
6941
6942int
6943main ()
6944{
6945
6946 ;
6947 return 0;
6948}
6949
6950_ACEOF
6951if ac_fn_c_try_compile "$LINENO"; then :
6952
6953 ac_cv_disable_unused_result_warning=yes
6954
6955else
6956
6957 ac_cv_disable_unused_result_warning=no
6958
6959fi
6960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6961fi
6962
6963 CFLAGS="$save_CFLAGS"
6964 CC="$ac_save_cc"
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6966$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006967 ;;
6968 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006969
6970 if test $ac_cv_disable_unused_result_warning = yes
6971 then
6972 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006973 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6974 fi
6975
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6977$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6978 ac_save_cc="$CC"
6979 CC="$CC -Wunused-parameter -Werror"
6980 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6981 $as_echo_n "(cached) " >&6
6982else
6983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6984/* end confdefs.h. */
6985
6986
6987int
6988main ()
6989{
6990
6991 ;
6992 return 0;
6993}
6994
6995_ACEOF
6996if ac_fn_c_try_compile "$LINENO"; then :
6997
6998 ac_cv_disable_unused_parameter_warning=yes
6999
7000else
7001
7002 ac_cv_disable_unused_parameter_warning=no
7003
7004fi
7005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7006fi
7007
7008 CC="$ac_save_cc"
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7010$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7011
7012 if test $ac_cv_disable_unused_parameter_warning = yes
7013 then
7014 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7015 fi
7016
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7018$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7019 ac_save_cc="$CC"
7020 CC="$CC -Wmissing-field-initializers -Werror"
7021 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7022 $as_echo_n "(cached) " >&6
7023else
7024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7025/* end confdefs.h. */
7026
7027
7028int
7029main ()
7030{
7031
7032 ;
7033 return 0;
7034}
7035
7036_ACEOF
7037if ac_fn_c_try_compile "$LINENO"; then :
7038
7039 ac_cv_disable_missing_field_initializers=yes
7040
7041else
7042
7043 ac_cv_disable_missing_field_initializers=no
7044
7045fi
7046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7047fi
7048
7049 CC="$ac_save_cc"
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7051$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7052
7053 if test $ac_cv_disable_missing_field_initializers = yes
7054 then
7055 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007056 fi
7057
Serhiy Storchakaef91dde2018-05-25 13:16:51 +03007058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC invalid function cast warning" >&5
7059$as_echo_n "checking if we can turn off $CC invalid function cast warning... " >&6; }
7060 ac_save_cc="$CC"
7061 CC="$CC -Wcast-function-type -Werror"
7062 if ${ac_cv_disable_cast_function_type+:} false; then :
7063 $as_echo_n "(cached) " >&6
7064else
7065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7066/* end confdefs.h. */
7067
7068
7069int
7070main ()
7071{
7072
7073 ;
7074 return 0;
7075}
7076
7077_ACEOF
7078if ac_fn_c_try_compile "$LINENO"; then :
7079
7080 ac_cv_disable_cast_function_type=yes
7081
7082else
7083
7084 ac_cv_disable_cast_function_type=no
7085
7086fi
7087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7088fi
7089
7090 CC="$ac_save_cc"
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_cast_function_type" >&5
7092$as_echo "$ac_cv_disable_cast_function_type" >&6; }
7093
7094 if test $ac_cv_disable_cast_function_type = yes
7095 then
7096 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-cast-function-type"
7097 fi
7098
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7100$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7101 ac_save_cc="$CC"
7102 CC="$CC -Wsign-compare"
7103 save_CFLAGS="$CFLAGS"
7104 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7105 $as_echo_n "(cached) " >&6
7106else
7107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7108/* end confdefs.h. */
7109
7110
7111int
7112main ()
7113{
7114
7115 ;
7116 return 0;
7117}
7118
7119_ACEOF
7120if ac_fn_c_try_compile "$LINENO"; then :
7121
7122 ac_cv_enable_sign_compare_warning=yes
7123
7124else
7125
7126 ac_cv_enable_sign_compare_warning=no
7127
7128fi
7129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7130fi
7131
7132 CFLAGS="$save_CFLAGS"
7133 CC="$ac_save_cc"
7134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7135$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7136
7137 if test $ac_cv_enable_sign_compare_warning = yes
7138 then
7139 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7140 fi
7141
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7143$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7144 ac_save_cc="$CC"
7145 CC="$CC -Wunreachable-code"
7146 save_CFLAGS="$CFLAGS"
7147 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7148 $as_echo_n "(cached) " >&6
7149else
7150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151/* end confdefs.h. */
7152
7153
7154int
7155main ()
7156{
7157
7158 ;
7159 return 0;
7160}
7161
7162_ACEOF
7163if ac_fn_c_try_compile "$LINENO"; then :
7164
7165 ac_cv_enable_unreachable_code_warning=yes
7166
7167else
7168
7169 ac_cv_enable_unreachable_code_warning=no
7170
7171fi
7172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7173fi
7174
7175 CFLAGS="$save_CFLAGS"
7176 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007177
7178 # Don't enable unreachable code warning in debug mode, since it usually
7179 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007180 # Issue #24324: Unfortunately, the unreachable code warning does not work
7181 # correctly on gcc and has been silently removed from the compiler.
7182 # It is supported on clang but on OS X systems gcc may be an alias
7183 # for clang. Try to determine if the compiler is not really gcc and,
7184 # if so, only then enable the warning.
7185 if test $ac_cv_enable_unreachable_code_warning = yes && \
7186 test "$Py_DEBUG" != "true" && \
7187 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007188 then
7189 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007190 else
7191 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007192 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7194$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007195
Miss Islington (bot)d6e789c2018-06-05 17:12:06 -07007196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7197$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7198 ac_save_cc="$CC"
7199 CC="$CC -Werror -Wstrict-prototypes"
7200 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7201 $as_echo_n "(cached) " >&6
7202else
7203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204/* end confdefs.h. */
7205
7206
7207int
7208main ()
7209{
7210
7211 ;
7212 return 0;
7213}
7214
7215_ACEOF
7216if ac_fn_c_try_compile "$LINENO"; then :
7217
7218 ac_cv_enable_strict_prototypes_warning=yes
7219
7220else
7221
7222 ac_cv_enable_strict_prototypes_warning=no
7223
7224fi
7225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7226fi
7227
7228 CC="$ac_save_cc"
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7230$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7231
7232 if test $ac_cv_enable_strict_prototypes_warning = yes
7233 then
7234 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7235 fi
7236
Victor Stinner193ee0a2017-02-06 14:24:00 +01007237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7238$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7239 ac_save_cc="$CC"
7240 CC="$CC -Werror=implicit-function-declaration"
7241 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243else
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h. */
7246
7247
7248int
7249main ()
7250{
7251
7252 ;
7253 return 0;
7254}
7255
7256_ACEOF
7257if ac_fn_c_try_compile "$LINENO"; then :
7258
7259 ac_cv_enable_implicit_function_declaration_error=yes
7260
7261else
7262
7263 ac_cv_enable_implicit_function_declaration_error=no
7264
7265fi
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267fi
7268
7269 CC="$ac_save_cc"
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7271$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7272
7273 if test $ac_cv_enable_implicit_function_declaration_error = yes
7274 then
7275 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7276 fi
7277
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7279 # support. Without this, treatment of subnormals doesn't follow
7280 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007281 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282 alpha*)
7283 BASECFLAGS="$BASECFLAGS -mieee"
7284 ;;
7285 esac
7286
7287 case $ac_sys_system in
7288 SCO_SV*)
7289 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7290 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007291
7292 # is there any other compiler on Darwin besides gcc?
7293 Darwin*)
7294 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7295 # used to be here, but non-Apple gcc doesn't accept them.
7296 if test "${CC}" = gcc
7297 then
7298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007299$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007300 case "${UNIVERSALSDK}" in
7301 */MacOSX10.4u.sdk)
7302 # Build using 10.4 SDK, force usage of gcc when the
7303 # compiler is gcc, otherwise the user will get very
7304 # confusing error messages when building on OSX 10.6
7305 CC=gcc-4.0
7306 CPP=cpp-4.0
7307 ;;
7308 esac
7309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007310$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007311 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007312
Ned Deily87adb6e2013-10-18 21:09:56 -07007313 if test "${enable_universalsdk}"
7314 then
7315 case "$UNIVERSAL_ARCHS" in
7316 32-bit)
7317 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7318 LIPO_32BIT_FLAGS=""
7319 ARCH_RUN_32BIT=""
7320 ;;
7321 64-bit)
7322 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7323 LIPO_32BIT_FLAGS=""
7324 ARCH_RUN_32BIT="true"
7325 ;;
7326 all)
7327 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7328 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7329 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7330 ;;
7331 intel)
7332 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7333 LIPO_32BIT_FLAGS="-extract i386"
7334 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7335 ;;
7336 intel-32)
7337 UNIVERSAL_ARCH_FLAGS="-arch i386"
7338 LIPO_32BIT_FLAGS=""
7339 ARCH_RUN_32BIT=""
7340 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007341 intel-64)
7342 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7343 LIPO_32BIT_FLAGS=""
7344 ARCH_RUN_32BIT="true"
7345 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007346 3-way)
7347 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7348 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7349 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7350 ;;
7351 *)
7352 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7353 ;;
7354 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 if test "${UNIVERSALSDK}" != "/"
7357 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007358 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7359 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007361 else
7362 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7363 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007364 fi
7365 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366
Ned Deily87adb6e2013-10-18 21:09:56 -07007367 # Calculate an appropriate deployment target for this build:
7368 # The deployment target value is used explicitly to enable certain
7369 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007370 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007371 # component of the string returned by distutils.get_platform().
7372 #
7373 # Use the value from:
7374 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7375 # 2. the operating system version of the build machine if >= 10.6
7376 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7377 # below to pick either 10.3, 10.4, or 10.5 as the target.
7378 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007379
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7381$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007382 cur_target_major=`sw_vers -productVersion | \
7383 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7384 cur_target_minor=`sw_vers -productVersion | \
7385 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7386 cur_target="${cur_target_major}.${cur_target_minor}"
7387 if test ${cur_target_major} -eq 10 && \
7388 test ${cur_target_minor} -ge 3 && \
7389 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007390 then
Ned Deily36820b62014-06-25 13:44:22 -07007391 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007392 cur_target=10.3
7393 if test ${enable_universalsdk}
7394 then
7395 case "$UNIVERSAL_ARCHS" in
7396 all|3-way|intel|64-bit)
7397 # These configurations were first supported in 10.5
7398 cur_target='10.5'
7399 ;;
7400 esac
7401 else
7402 if test `/usr/bin/arch` = "i386"
7403 then
7404 # 10.4 was the first release to support Intel archs
7405 cur_target="10.4"
7406 fi
7407 fi
7408 fi
7409 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007410
Ned Deily87adb6e2013-10-18 21:09:56 -07007411 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7412 # environment with a value that is the same as what we'll use
7413 # in the Makefile to ensure that we'll get the same compiler
7414 # environment during configure and build time.
7415 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7416 export MACOSX_DEPLOYMENT_TARGET
7417 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7419$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007420
Ned Deily87adb6e2013-10-18 21:09:56 -07007421 # end of Darwin* tests
7422 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423 esac
7424 ;;
7425
7426*)
7427 case $ac_sys_system in
7428 OpenUNIX*|UnixWare*)
7429 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7430 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431 SCO_SV*)
7432 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7433 ;;
7434 esac
7435 ;;
7436esac
7437
Zachary Ware5af85642015-12-21 12:09:17 -06007438# ICC needs -fp-model strict or floats behave badly
7439case "$CC" in
7440*icc*)
7441 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7442 ;;
7443esac
7444
T. Woutersddbfa2c2017-05-23 01:30:49 +02007445if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446 :
7447else
7448 OPT="-DNDEBUG $OPT"
7449fi
7450
7451if test "$ac_arch_flags"
7452then
7453 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7454fi
7455
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456# On some compilers, pthreads are available without further options
7457# (e.g. MacOS X). On some of these systems, the compiler will not
7458# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7459# So we have to see first whether pthreads are available without
7460# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7462$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007463if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465else
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467 ac_cv_pthread_is_default=no
7468else
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470/* end confdefs.h. */
7471
Stefan Krah7dba5942012-11-22 22:49:11 +01007472#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473#include <pthread.h>
7474
7475void* routine(void* p){return NULL;}
7476
7477int main(){
7478 pthread_t p;
7479 if(pthread_create(&p,NULL,routine,NULL)!=0)
7480 return 1;
7481 (void)pthread_detach(p);
7482 return 0;
7483}
7484
7485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007486if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487
7488 ac_cv_pthread_is_default=yes
7489 ac_cv_kthread=no
7490 ac_cv_pthread=no
7491
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497fi
7498
7499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500fi
7501
Matthias Kloseb9621712010-04-24 17:59:49 +00007502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7503$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
7505
7506if test $ac_cv_pthread_is_default = yes
7507then
7508 ac_cv_kpthread=no
7509else
7510# -Kpthread, if available, provides the right #defines
7511# and linker options to make pthread_create available
7512# Some compilers won't report that they do not support -Kpthread,
7513# so we need to run a program to see whether it really made the
7514# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7516$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007517if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007518 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519else
7520 ac_save_cc="$CC"
7521CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007522if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523 ac_cv_kpthread=no
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526/* end confdefs.h. */
7527
Stefan Krah7dba5942012-11-22 22:49:11 +01007528#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529#include <pthread.h>
7530
7531void* routine(void* p){return NULL;}
7532
7533int main(){
7534 pthread_t p;
7535 if(pthread_create(&p,NULL,routine,NULL)!=0)
7536 return 1;
7537 (void)pthread_detach(p);
7538 return 0;
7539}
7540
7541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007542if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543 ac_cv_kpthread=yes
7544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549fi
7550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551CC="$ac_save_cc"
7552fi
7553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7555$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556fi
7557
7558if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7559then
7560# -Kthread, if available, provides the right #defines
7561# and linker options to make pthread_create available
7562# Some compilers won't report that they do not support -Kthread,
7563# so we need to run a program to see whether it really made the
7564# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7566$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007567if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007568 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569else
7570 ac_save_cc="$CC"
7571CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573 ac_cv_kthread=no
7574else
Matthias Kloseb9621712010-04-24 17:59:49 +00007575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576/* end confdefs.h. */
7577
Stefan Krah7dba5942012-11-22 22:49:11 +01007578#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579#include <pthread.h>
7580
7581void* routine(void* p){return NULL;}
7582
7583int main(){
7584 pthread_t p;
7585 if(pthread_create(&p,NULL,routine,NULL)!=0)
7586 return 1;
7587 (void)pthread_detach(p);
7588 return 0;
7589}
7590
7591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007592if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593 ac_cv_kthread=yes
7594else
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7598 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599fi
7600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601CC="$ac_save_cc"
7602fi
7603
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7605$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606fi
7607
7608if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7609then
7610# -pthread, if available, provides the right #defines
7611# and linker options to make pthread_create available
7612# Some compilers won't report that they do not support -pthread,
7613# so we need to run a program to see whether it really made the
7614# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7616$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007617if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619else
7620 ac_save_cc="$CC"
7621CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007622if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623 ac_cv_pthread=no
7624else
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
Stefan Krah7dba5942012-11-22 22:49:11 +01007628#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629#include <pthread.h>
7630
7631void* routine(void* p){return NULL;}
7632
7633int main(){
7634 pthread_t p;
7635 if(pthread_create(&p,NULL,routine,NULL)!=0)
7636 return 1;
7637 (void)pthread_detach(p);
7638 return 0;
7639}
7640
7641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007642if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643 ac_cv_pthread=yes
7644else
Matthias Kloseb9621712010-04-24 17:59:49 +00007645 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649fi
7650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651CC="$ac_save_cc"
7652fi
7653
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7655$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656fi
7657
7658# If we have set a CC compiler flag for thread support then
7659# check if it works for CXX, too.
7660ac_cv_cxx_thread=no
7661if test ! -z "$CXX"
7662then
Matthias Kloseb9621712010-04-24 17:59:49 +00007663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7664$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665ac_save_cxx="$CXX"
7666
7667if test "$ac_cv_kpthread" = "yes"
7668then
7669 CXX="$CXX -Kpthread"
7670 ac_cv_cxx_thread=yes
7671elif test "$ac_cv_kthread" = "yes"
7672then
7673 CXX="$CXX -Kthread"
7674 ac_cv_cxx_thread=yes
7675elif test "$ac_cv_pthread" = "yes"
7676then
7677 CXX="$CXX -pthread"
7678 ac_cv_cxx_thread=yes
7679fi
7680
7681if test $ac_cv_cxx_thread = yes
7682then
7683 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7684 $CXX -c conftest.$ac_ext 2>&5
7685 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7686 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7687 then
7688 ac_cv_cxx_thread=yes
7689 else
7690 ac_cv_cxx_thread=no
7691 fi
7692 rm -fr conftest*
7693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7695$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696fi
7697CXX="$ac_save_cxx"
7698
7699
7700# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7702$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007703if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707/* end confdefs.h. */
7708#include <stdlib.h>
7709#include <stdarg.h>
7710#include <string.h>
7711#include <float.h>
7712
7713int
7714main ()
7715{
7716
7717 ;
7718 return 0;
7719}
7720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007721if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007722 ac_cv_header_stdc=yes
7723else
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7727
7728if test $ac_cv_header_stdc = yes; then
7729 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731/* end confdefs.h. */
7732#include <string.h>
7733
7734_ACEOF
7735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $EGREP "memchr" >/dev/null 2>&1; then :
7737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738else
7739 ac_cv_header_stdc=no
7740fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007741rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742
7743fi
7744
7745if test $ac_cv_header_stdc = yes; then
7746 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748/* end confdefs.h. */
7749#include <stdlib.h>
7750
7751_ACEOF
7752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 $EGREP "free" >/dev/null 2>&1; then :
7754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007755else
7756 ac_cv_header_stdc=no
7757fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007758rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759
7760fi
7761
7762if test $ac_cv_header_stdc = yes; then
7763 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765 :
7766else
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007768/* end confdefs.h. */
7769#include <ctype.h>
7770#include <stdlib.h>
7771#if ((' ' & 0x0FF) == 0x020)
7772# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7773# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7774#else
7775# define ISLOWER(c) \
7776 (('a' <= (c) && (c) <= 'i') \
7777 || ('j' <= (c) && (c) <= 'r') \
7778 || ('s' <= (c) && (c) <= 'z'))
7779# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7780#endif
7781
7782#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7783int
7784main ()
7785{
7786 int i;
7787 for (i = 0; i < 256; i++)
7788 if (XOR (islower (i), ISLOWER (i))
7789 || toupper (i) != TOUPPER (i))
7790 return 2;
7791 return 0;
7792}
7793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007794if ac_fn_c_try_run "$LINENO"; then :
7795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007801fi
7802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007803fi
7804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7806$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807if test $ac_cv_header_stdc = yes; then
7808
Matthias Kloseb9621712010-04-24 17:59:49 +00007809$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007810
7811fi
7812
stratakise768c862018-01-23 16:11:24 +01007813for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007814fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007815ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007816sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007817unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007818poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007819sys/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 +01007820sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007821sys/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 +01007822sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007823sys/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 -07007824libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007825linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007826sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007827do :
7828 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7829ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007830if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007832#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007833_ACEOF
7834
7835fi
7836
Guido van Rossum627b2d71993-12-24 10:39:16 +00007837done
7838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007840for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7843$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007844if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007846else
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007848/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007849#include <sys/types.h>
7850#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852int
7853main ()
7854{
7855if ((DIR *) 0)
7856return 0;
7857 ;
7858 return 0;
7859}
7860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007863else
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868eval ac_res=\$$as_ac_Header
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7870$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007871if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007872 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007873#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007874_ACEOF
7875
7876ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007879done
7880# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7881if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7883$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007884if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007886else
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891/* Override any GCC internal prototype to avoid an error.
7892 Use char because int might match the return type of a GCC
7893 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007894#ifdef __cplusplus
7895extern "C"
7896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007897char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007898int
7899main ()
7900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 ;
7903 return 0;
7904}
7905_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906for ac_lib in '' dir; do
7907 if test -z "$ac_lib"; then
7908 ac_res="none required"
7909 else
7910 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007911 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007918 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921done
Victor Stinnere0be4232011-10-25 13:06:09 +02007922if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924else
7925 ac_cv_search_opendir=no
7926fi
7927rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007928LIBS=$ac_func_search_save_LIBS
7929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7931$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007932ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007933if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007935
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007936fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Michael W. Hudson54241132001-12-07 15:38:26 +00007938else
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7940$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007941if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007943else
7944 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948/* Override any GCC internal prototype to avoid an error.
7949 Use char because int might match the return type of a GCC
7950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007951#ifdef __cplusplus
7952extern "C"
7953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007954char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007955int
7956main ()
7957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ;
7960 return 0;
7961}
7962_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963for ac_lib in '' x; do
7964 if test -z "$ac_lib"; then
7965 ac_res="none required"
7966 else
7967 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007968 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007973rm -f core conftest.err conftest.$ac_objext \
7974 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007975 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978done
Victor Stinnere0be4232011-10-25 13:06:09 +02007979if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981else
7982 ac_cv_search_opendir=no
7983fi
7984rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007985LIBS=$ac_func_search_save_LIBS
7986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7988$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007990if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007993fi
7994
7995fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007996
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7998$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007999if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008003/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008004#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008005int
8006main ()
8007{
8008return makedev(0, 0);
8009 ;
8010 return 0;
8011}
8012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008013if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008014 ac_cv_header_sys_types_h_makedev=yes
8015else
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008018rm -f core conftest.err conftest.$ac_objext \
8019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008020
8021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8023$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008024
8025if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008026ac_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 +02008027if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008030
8031fi
8032
8033
8034
8035 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 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 +02008037if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008040
8041fi
8042
8043
8044 fi
8045fi
8046
Michael W. Hudson54241132001-12-07 15:38:26 +00008047
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008048# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8049# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8050SAVE_CFLAGS=$CFLAGS
8051CFLAGS="-std=c99 $CFLAGS"
8052for ac_header in bluetooth/bluetooth.h
8053do :
8054 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8055if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8056 cat >>confdefs.h <<_ACEOF
8057#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8058_ACEOF
8059
8060fi
8061
8062done
8063
8064CFLAGS=$SAVE_CFLAGS
8065
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008066# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8067for ac_header in net/if.h
8068do :
8069 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8070#ifdef STDC_HEADERS
8071# include <stdlib.h>
8072# include <stddef.h>
8073#else
8074# ifdef HAVE_STDLIB_H
8075# include <stdlib.h>
8076# endif
8077#endif
8078#ifdef HAVE_SYS_SOCKET_H
8079# include <sys/socket.h>
8080#endif
8081
8082"
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008084 cat >>confdefs.h <<_ACEOF
8085#define HAVE_NET_IF_H 1
8086_ACEOF
8087
8088fi
8089
8090done
8091
8092
Martin v. Löwis11017b12006-01-14 18:12:57 +00008093# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008094for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008095do :
8096 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 +00008097#ifdef HAVE_ASM_TYPES_H
8098#include <asm/types.h>
8099#endif
8100#ifdef HAVE_SYS_SOCKET_H
8101#include <sys/socket.h>
8102#endif
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104"
Victor Stinnere0be4232011-10-25 13:06:09 +02008105if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008106 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008107#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008108_ACEOF
8109
8110fi
8111
8112done
8113
8114
caaveryeffc12f2017-09-06 18:18:10 -04008115for ac_header in linux/vm_sockets.h
8116do :
8117 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8118#ifdef HAVE_SYS_SOCKET_H
8119#include <sys/socket.h>
8120#endif
8121
8122"
8123if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8124 cat >>confdefs.h <<_ACEOF
8125#define HAVE_LINUX_VM_SOCKETS_H 1
8126_ACEOF
8127
8128fi
8129
8130done
8131
8132
Charles-François Natali47413c12011-10-06 19:47:44 +02008133# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008134for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008135do :
8136 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8137ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8138#ifdef HAVE_SYS_SOCKET_H
8139#include <sys/socket.h>
8140#endif
8141
8142"
8143if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8144 cat >>confdefs.h <<_ACEOF
8145#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8146_ACEOF
8147
8148fi
8149
8150done
8151
8152
Guido van Rossum627b2d71993-12-24 10:39:16 +00008153# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008154was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8156$as_echo_n "checking for clock_t in time.h... " >&6; }
8157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008158/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008159#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
8161_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008164 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008165else
Martin v. Löwis11437992002-04-12 09:54:03 +00008166
8167
Matthias Kloseb9621712010-04-24 17:59:49 +00008168$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008169
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008170
Guido van Rossum627b2d71993-12-24 10:39:16 +00008171fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008172rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008173
Matthias Kloseb9621712010-04-24 17:59:49 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8175$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8178$as_echo_n "checking for makedev... " >&6; }
8179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008180/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008181
Jesus Cea740f53a2010-04-28 11:35:30 +00008182#if defined(MAJOR_IN_MKDEV)
8183#include <sys/mkdev.h>
8184#elif defined(MAJOR_IN_SYSMACROS)
8185#include <sys/sysmacros.h>
8186#else
8187#include <sys/types.h>
8188#endif
8189
Neal Norwitz11690112002-07-30 01:08:28 +00008190int
8191main ()
8192{
Jesus Cea740f53a2010-04-28 11:35:30 +00008193
8194 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008195 ;
8196 return 0;
8197}
Matthias Kloseb159a552010-04-25 21:00:44 +00008198
Neal Norwitz11690112002-07-30 01:08:28 +00008199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008200if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008201 ac_cv_has_makedev=yes
8202else
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008205rm -f core conftest.err conftest.$ac_objext \
8206 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8208$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008209if test "$ac_cv_has_makedev" = "yes"; then
8210
Matthias Kloseb9621712010-04-24 17:59:49 +00008211$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008212
8213fi
8214
Christian Heimes985ecdc2013-11-20 11:46:18 +01008215# byte swapping
8216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8217$as_echo_n "checking for le64toh... " >&6; }
8218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8219/* end confdefs.h. */
8220
8221#ifdef HAVE_ENDIAN_H
8222#include <endian.h>
8223#elif defined(HAVE_SYS_ENDIAN_H)
8224#include <sys/endian.h>
8225#endif
8226
8227int
8228main ()
8229{
8230
8231 le64toh(1)
8232 ;
8233 return 0;
8234}
8235
8236_ACEOF
8237if ac_fn_c_try_link "$LINENO"; then :
8238 ac_cv_has_le64toh=yes
8239else
8240 ac_cv_has_le64toh=no
8241fi
8242rm -f core conftest.err conftest.$ac_objext \
8243 conftest$ac_exeext conftest.$ac_ext
8244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8245$as_echo "$ac_cv_has_le64toh" >&6; }
8246if test "$ac_cv_has_le64toh" = "yes"; then
8247
8248$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8249
8250fi
8251
Martin v. Löwis399a6892002-10-04 10:22:02 +00008252use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008253# Don't use largefile support for GNU/Hurd
8254case $ac_sys_system in GNU*)
8255 use_lfs=no
8256esac
8257
Martin v. Löwis399a6892002-10-04 10:22:02 +00008258if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008259# Two defines needed to enable largefile support on various platforms
8260# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008261case $ac_sys_system/$ac_sys_release in
8262AIX*)
8263
8264$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8265
8266 ;;
8267esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008270
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008273
Martin v. Löwis399a6892002-10-04 10:22:02 +00008274fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008275
Guido van Rossum84e7b241996-08-19 21:59:00 +00008276# Add some code to confdefs.h so that the test for off_t works on SCO
8277cat >> confdefs.h <<\EOF
8278#if defined(SCO_DS)
8279#undef _OFF_T
8280#endif
8281EOF
8282
Guido van Rossumef2255b2000-03-10 22:30:29 +00008283# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008284ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008285if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287else
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289cat >>confdefs.h <<_ACEOF
8290#define mode_t int
8291_ACEOF
8292
8293fi
8294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008296if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008297
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008298else
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
8300cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008302_ACEOF
8303
8304fi
8305
Matthias Kloseb9621712010-04-24 17:59:49 +00008306ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008307if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008309else
Martin v. Löwis11437992002-04-12 09:54:03 +00008310
8311cat >>confdefs.h <<_ACEOF
8312#define pid_t int
8313_ACEOF
8314
8315fi
8316
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008319#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008320_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008321
Matthias Kloseb9621712010-04-24 17:59:49 +00008322ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008323if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008324
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008325else
Martin v. Löwis11437992002-04-12 09:54:03 +00008326
8327cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
8330
8331fi
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8334$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008335if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008339/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008340#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008341
8342_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008345 ac_cv_type_uid_t=yes
8346else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008347 ac_cv_type_uid_t=no
8348fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008349rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8353$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008354if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
8358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008360
8361fi
8362
Mark Dickinson983bc162012-12-02 12:11:38 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008365if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008368
8369fi
8370
Stefan Krah1919b7e2012-03-21 18:25:23 +01008371ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8372if test "x$ac_cv_type___uint128_t" = xyes; then :
8373
8374$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8375
8376fi
8377
Jack Jansendd19cf82001-12-06 22:36:17 +00008378
Michael W. Hudson54241132001-12-07 15:38:26 +00008379# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008380# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381# The cast to long int works around a bug in the HP C Compiler
8382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8384# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8386$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008387if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008389else
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 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 +00008391
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 if test "$ac_cv_type_int" = yes; then
8394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008396as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008397See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398 else
8399 ac_cv_sizeof_int=0
8400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008402
Martin v. Löwis11437992002-04-12 09:54:03 +00008403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8405$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406
8407
8408
Martin v. Löwis11437992002-04-12 09:54:03 +00008409cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008410#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008411_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008412
8413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414# The cast to long int works around a bug in the HP C Compiler
8415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8417# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8419$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008420if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 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 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 if test "$ac_cv_type_long" = yes; then
8427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008429as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008430See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008431 else
8432 ac_cv_sizeof_long=0
8433 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8438$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439
8440
8441
Martin v. Löwis11437992002-04-12 09:54:03 +00008442cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008443#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008444_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008445
8446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447# The cast to long int works around a bug in the HP C Compiler
8448# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8449# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8450# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8452$as_echo_n "checking size of long long... " >&6; }
8453if ${ac_cv_sizeof_long_long+:} false; then :
8454 $as_echo_n "(cached) " >&6
8455else
8456 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8457
8458else
8459 if test "$ac_cv_type_long_long" = yes; then
8460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8462as_fn_error 77 "cannot compute sizeof (long long)
8463See \`config.log' for more details" "$LINENO" 5; }
8464 else
8465 ac_cv_sizeof_long_long=0
8466 fi
8467fi
8468
8469fi
8470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8471$as_echo "$ac_cv_sizeof_long_long" >&6; }
8472
8473
8474
8475cat >>confdefs.h <<_ACEOF
8476#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8477_ACEOF
8478
8479
8480# The cast to long int works around a bug in the HP C Compiler
8481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8483# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8485$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008486if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008488else
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 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 +00008490
Martin v. Löwis11437992002-04-12 09:54:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 if test "$ac_cv_type_void_p" = yes; then
8493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008495as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008496See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497 else
8498 ac_cv_sizeof_void_p=0
8499 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501
Martin v. Löwis11437992002-04-12 09:54:03 +00008502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8504$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505
8506
8507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008509#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008510_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008511
8512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513# The cast to long int works around a bug in the HP C Compiler
8514# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8515# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8516# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8518$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008519if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 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 +00008523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524else
Matthias Kloseb9621712010-04-24 17:59:49 +00008525 if test "$ac_cv_type_short" = yes; then
8526 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8527$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008528as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008529See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530 else
8531 ac_cv_sizeof_short=0
8532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534
Martin v. Löwis11437992002-04-12 09:54:03 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8537$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538
8539
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544
8545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546# The cast to long int works around a bug in the HP C Compiler
8547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8549# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8551$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008552if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 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 +00008556
Martin v. Löwis11437992002-04-12 09:54:03 +00008557else
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 if test "$ac_cv_type_float" = yes; then
8559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008561as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008562See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563 else
8564 ac_cv_sizeof_float=0
8565 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8570$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571
8572
8573
Martin v. Löwis11437992002-04-12 09:54:03 +00008574cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008576_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008577
8578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579# The cast to long int works around a bug in the HP C Compiler
8580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8584$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008585if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 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 +00008589
Martin v. Löwis11437992002-04-12 09:54:03 +00008590else
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 if test "$ac_cv_type_double" = yes; then
8592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008594as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596 else
8597 ac_cv_sizeof_double=0
8598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600
Martin v. Löwis11437992002-04-12 09:54:03 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8603$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604
8605
8606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008608#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008609_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008610
8611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612# The cast to long int works around a bug in the HP C Compiler
8613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8617$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008618if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 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 +00008622
Martin v. Löwis11437992002-04-12 09:54:03 +00008623else
Matthias Kloseb9621712010-04-24 17:59:49 +00008624 if test "$ac_cv_type_fpos_t" = yes; then
8625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008627as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629 else
8630 ac_cv_sizeof_fpos_t=0
8631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633
Martin v. Löwis11437992002-04-12 09:54:03 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8636$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637
8638
8639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008641#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008642_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008643
Michael W. Hudson54241132001-12-07 15:38:26 +00008644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645# The cast to long int works around a bug in the HP C Compiler
8646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8650$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 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 +00008655
Martin v. Löwis18e16552006-02-15 17:27:45 +00008656else
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 if test "$ac_cv_type_size_t" = yes; then
8658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008660as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662 else
8663 ac_cv_sizeof_size_t=0
8664 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666
Martin v. Löwis18e16552006-02-15 17:27:45 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8669$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670
8671
8672
Martin v. Löwis18e16552006-02-15 17:27:45 +00008673cat >>confdefs.h <<_ACEOF
8674#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8675_ACEOF
8676
8677
Christian Heimes400adb02008-02-01 08:12:03 +00008678# The cast to long int works around a bug in the HP C Compiler
8679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8683$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008684if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 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 +00008688
Christian Heimes400adb02008-02-01 08:12:03 +00008689else
Matthias Kloseb9621712010-04-24 17:59:49 +00008690 if test "$ac_cv_type_pid_t" = yes; then
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008693as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008694See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008695 else
8696 ac_cv_sizeof_pid_t=0
8697 fi
8698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699
Christian Heimes400adb02008-02-01 08:12:03 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8702$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008703
8704
8705
8706cat >>confdefs.h <<_ACEOF
8707#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8708_ACEOF
8709
8710
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008711# The cast to long int works around a bug in the HP C Compiler
8712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8714# This bug is HP SR number 8606223364.
8715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8716$as_echo_n "checking size of uintptr_t... " >&6; }
8717if ${ac_cv_sizeof_uintptr_t+:} false; then :
8718 $as_echo_n "(cached) " >&6
8719else
8720 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8721
8722else
8723 if test "$ac_cv_type_uintptr_t" = yes; then
8724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8726as_fn_error 77 "cannot compute sizeof (uintptr_t)
8727See \`config.log' for more details" "$LINENO" 5; }
8728 else
8729 ac_cv_sizeof_uintptr_t=0
8730 fi
8731fi
8732
8733fi
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8735$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8736
8737
8738
8739cat >>confdefs.h <<_ACEOF
8740#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8741_ACEOF
8742
8743
Michael W. Hudson54241132001-12-07 15:38:26 +00008744
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8746$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008747have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008749/* end confdefs.h. */
8750
8751int
8752main ()
8753{
8754long double x; x = (long double)0;
8755 ;
8756 return 0;
8757}
8758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008759if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008760
8761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008763
8764 have_long_double=yes
8765
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008766fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8769$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008770if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06: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 long double" >&5
8776$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008777if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 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 +00008781
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if test "$ac_cv_type_long_double" = yes; then
8784 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008786as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008787See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008788 else
8789 ac_cv_sizeof_long_double=0
8790 fi
8791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008792
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8795$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008796
8797
8798
8799cat >>confdefs.h <<_ACEOF
8800#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8801_ACEOF
8802
8803
8804fi
8805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806# The cast to long int works around a bug in the HP C Compiler
8807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8809# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8811$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008812if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008813 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 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 +00008816
Thomas Woutersb2137042007-02-01 18:02:27 +00008817else
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 if test "$ac_cv_type__Bool" = yes; then
8819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008821as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008822See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823 else
8824 ac_cv_sizeof__Bool=0
8825 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827
Thomas Woutersb2137042007-02-01 18:02:27 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8830$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831
8832
8833
Thomas Woutersb2137042007-02-01 18:02:27 +00008834cat >>confdefs.h <<_ACEOF
8835#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8836_ACEOF
8837
8838
Thomas Woutersb2137042007-02-01 18:02:27 +00008839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840# The cast to long int works around a bug in the HP C Compiler
8841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8845$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850#ifdef HAVE_SYS_TYPES_H
8851#include <sys/types.h>
8852#endif
8853
Matthias Kloseb9621712010-04-24 17:59:49 +00008854"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 if test "$ac_cv_type_off_t" = yes; then
8858 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008860as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008861See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008862 else
8863 ac_cv_sizeof_off_t=0
8864 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8869$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008871
8872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008874#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008875_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008876
Michael W. Hudson54241132001-12-07 15:38:26 +00008877
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008878
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8880$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008881if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008882 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008883
Matthias Kloseb9621712010-04-24 17:59:49 +00008884$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008885
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8887$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008891fi
8892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893# The cast to long int works around a bug in the HP C Compiler
8894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8896# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8898$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008899if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008901else
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008903#ifdef HAVE_SYS_TYPES_H
8904#include <sys/types.h>
8905#endif
8906#ifdef HAVE_TIME_H
8907#include <time.h>
8908#endif
8909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912else
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 if test "$ac_cv_type_time_t" = yes; then
8914 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008916as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008917See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008918 else
8919 ac_cv_sizeof_time_t=0
8920 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8925$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008927
8928
Martin v. Löwis11437992002-04-12 09:54:03 +00008929cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008930#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008932
Michael W. Hudson54241132001-12-07 15:38:26 +00008933
8934
Trent Mick635f6fb2000-08-23 21:33:05 +00008935# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008936ac_save_cc="$CC"
8937if test "$ac_cv_kpthread" = "yes"
8938then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008939elif test "$ac_cv_kthread" = "yes"
8940then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008941elif test "$ac_cv_pthread" = "yes"
8942then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008943fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008944
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8946$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008947have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008949/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008950
8951 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008952int
8953main ()
8954{
Guido van Rossum12580492000-09-24 16:47:19 +00008955pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ;
8957 return 0;
8958}
Matthias Kloseb159a552010-04-25 21:00:44 +00008959
Martin v. Löwis11437992002-04-12 09:54:03 +00008960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008961if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008962 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8966$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008967if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8971# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8973$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008974if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008976else
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978#ifdef HAVE_PTHREAD_H
8979#include <pthread.h>
8980#endif
8981
Matthias Kloseb9621712010-04-24 17:59:49 +00008982"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008984else
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 if test "$ac_cv_type_pthread_t" = yes; then
8986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008988as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008989See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008990 else
8991 ac_cv_sizeof_pthread_t=0
8992 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994
Trent Mick635f6fb2000-08-23 21:33:05 +00008995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8997$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008999
9000
Martin v. Löwis11437992002-04-12 09:54:03 +00009001cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009002#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009003_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005
Trent Mick635f6fb2000-08-23 21:33:05 +00009006fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009007
9008# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9009# This checking will be unnecessary after removing deprecated TLS API.
9010# The cast to long int works around a bug in the HP C Compiler
9011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9013# This bug is HP SR number 8606223364.
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9015$as_echo_n "checking size of pthread_key_t... " >&6; }
9016if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9017 $as_echo_n "(cached) " >&6
9018else
9019 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9020"; then :
9021
9022else
9023 if test "$ac_cv_type_pthread_key_t" = yes; then
9024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9026as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9027See \`config.log' for more details" "$LINENO" 5; }
9028 else
9029 ac_cv_sizeof_pthread_key_t=0
9030 fi
9031fi
9032
9033fi
9034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9035$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9036
9037
9038
9039cat >>confdefs.h <<_ACEOF
9040#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9041_ACEOF
9042
9043
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9045$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9046if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9048/* end confdefs.h. */
9049#include <pthread.h>
9050int
9051main ()
9052{
9053pthread_key_t k; k * 1;
9054 ;
9055 return 0;
9056}
9057_ACEOF
9058if ac_fn_c_try_compile "$LINENO"; then :
9059 ac_pthread_key_t_is_arithmetic_type=yes
9060else
9061 ac_pthread_key_t_is_arithmetic_type=no
9062
9063fi
9064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9066$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9067 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9068
9069$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9070
9071 fi
9072else
9073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
9075fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009076CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009077
Michael W. Hudson54241132001-12-07 15:38:26 +00009078
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009079case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009080 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009081 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9082 ;;
9083 Darwin/*)
9084 OTHER_LIBTOOL_OPT=""
9085 ;;
9086esac
9087
9088
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009089
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009090case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009091 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009092 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9093 if test "${enable_universalsdk}"; then
9094 :
9095 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009096 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009097 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009098 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009099 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009100 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009101 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009102 if test ${gcc_version} '<' 4.0
9103 then
9104 LIBTOOL_CRUFT="-lcc_dynamic"
9105 else
9106 LIBTOOL_CRUFT=""
9107 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009109 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009110else
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009112/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009113
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009114 #include <unistd.h>
9115 int main(int argc, char*argv[])
9116 {
9117 if (sizeof(long) == 4) {
9118 return 0;
9119 } else {
9120 return 1;
9121 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009122 }
9123
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009125if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009126 ac_osx_32bit=yes
9127else
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009132fi
9133
9134
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009135 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009136 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009137 i386)
9138 MACOSX_DEFAULT_ARCH="i386"
9139 ;;
9140 ppc)
9141 MACOSX_DEFAULT_ARCH="ppc"
9142 ;;
9143 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009144 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009145 ;;
9146 esac
9147 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009148 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009149 i386)
9150 MACOSX_DEFAULT_ARCH="x86_64"
9151 ;;
9152 ppc)
9153 MACOSX_DEFAULT_ARCH="ppc64"
9154 ;;
9155 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009156 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009157 ;;
9158 esac
9159
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009160 fi
9161
9162 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009163 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009164 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009165esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9167$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009168if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009169then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009170 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009172 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009173
Matthias Kloseb9621712010-04-24 17:59:49 +00009174$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009175
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9177$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009178 if test $enable_shared = "yes"
9179 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009180 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 +00009181 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009182else
Matthias Kloseb9621712010-04-24 17:59:49 +00009183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9184$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009185fi
9186
Matthias Kloseb9621712010-04-24 17:59:49 +00009187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9188$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009189case $ac_sys_system/$ac_sys_release in
9190 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009191
Matthias Kloseb9621712010-04-24 17:59:49 +00009192$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009193
Matthias Kloseb9621712010-04-24 17:59:49 +00009194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9195$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009196 ;;
9197 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9199$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009200 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009201esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009202
Guido van Rossum0a516c91994-09-12 10:58:40 +00009203# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009204
Michael W. Hudson54241132001-12-07 15:38:26 +00009205
9206
9207
9208
Benjamin Peterson99f03762010-04-11 22:15:28 +00009209
Thomas Wouters477c8d52006-05-27 19:21:47 +00009210
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009211# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9212# -- usually .so, .sl on HP-UX, .dll on Cygwin
9213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9214$as_echo_n "checking the extension of shared libraries... " >&6; }
9215if test -z "$SHLIB_SUFFIX"; then
9216 case $ac_sys_system in
9217 hp*|HP*)
9218 case `uname -m` in
9219 ia64) SHLIB_SUFFIX=.so;;
9220 *) SHLIB_SUFFIX=.sl;;
9221 esac
9222 ;;
9223 CYGWIN*) SHLIB_SUFFIX=.dll;;
9224 *) SHLIB_SUFFIX=.so;;
9225 esac
9226fi
9227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9228$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009229
Guido van Rossum0a516c91994-09-12 10:58:40 +00009230# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009231# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009232# (Shared libraries in this instance are shared modules to be loaded into
9233# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9235$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009236if test -z "$LDSHARED"
9237then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009238 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009239 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009240 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009241 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009242 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009244 if test "$GCC" = "yes" ; then
9245 LDSHARED='$(CC) -shared'
9246 LDCXXSHARED='$(CXX) -shared'
9247 else
9248 LDSHARED='$(CC) -G'
9249 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009250 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009251 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009252 if test "$GCC" = "yes" ; then
9253 LDSHARED='$(CC) -shared'
9254 LDCXXSHARED='$(CXX) -shared'
9255 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009256 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009257 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009258 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009259 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009260 LDSHARED='$(CC) -bundle'
9261 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009262 if test "$enable_framework" ; then
9263 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009264 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9265 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009266 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009267 else
9268 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009269 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009270 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009271 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009272 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009273 LDSHARED='$(CC) -bundle'
9274 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009275 if test "$enable_framework" ; then
9276 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009277 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9278 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009279 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009280 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009281 # No framework, use the Python app as bundle-loader
9282 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009283 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009284 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009285 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009286 Darwin/*)
9287 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9288 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009289
Ned Deily36820b62014-06-25 13:44:22 -07009290 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9291 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9292 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9293 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9294 if test ${dep_target_major} -eq 10 && \
9295 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009296 then
Ned Deily36820b62014-06-25 13:44:22 -07009297 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009298 LDSHARED='$(CC) -bundle'
9299 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009300 if test "$enable_framework" ; then
9301 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009302 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9303 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009304 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009305 else
9306 # No framework, use the Python app as bundle-loader
9307 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9308 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009309 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009310 fi
Ned Deily36820b62014-06-25 13:44:22 -07009311 else
9312 # building for OS X 10.3 and later
9313 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9314 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9315 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009316 fi
9317 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009318 Linux*|GNU*|QNX*)
9319 LDSHARED='$(CC) -shared'
9320 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009321 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009322 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009323 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009324 LDSHARED='$(CC) -shared'
9325 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009326 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009327 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009328 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009329 OpenBSD*)
9330 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9331 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009332 LDSHARED='$(CC) -shared $(CCSHARED)'
9333 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009334 else
9335 case `uname -r` in
9336 [01].* | 2.[0-7] | 2.[0-7].*)
9337 LDSHARED="ld -Bshareable ${LDFLAGS}"
9338 ;;
9339 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009340 LDSHARED='$(CC) -shared $(CCSHARED)'
9341 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009342 ;;
9343 esac
9344 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009345 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009346 LDSHARED='$(CC) -shared'
9347 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009348 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009349 if test "$GCC" = "yes" ; then
9350 LDSHARED='$(CC) -shared'
9351 LDCXXSHARED='$(CXX) -shared'
9352 else
9353 LDSHARED='$(CC) -G'
9354 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009355 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009356 SCO_SV*)
9357 LDSHARED='$(CC) -Wl,-G,-Bexport'
9358 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9359 CYGWIN*)
9360 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9361 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009362 *) LDSHARED="ld";;
9363 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9366$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009367LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009368BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009369# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009370# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9372$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009373if test -z "$CCSHARED"
9374then
Guido van Rossum07397971997-04-29 21:49:50 +00009375 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009376 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009377 then CCSHARED="-fPIC";
9378 elif test `uname -p` = sparc;
9379 then CCSHARED="-xcode=pic32";
9380 else CCSHARED="-Kpic";
9381 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009382 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009383 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009384 else CCSHARED="+z";
9385 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009386 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009387 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009388 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009389 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009390 if test "$GCC" = "yes"
9391 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009392 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009393 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009394 SCO_SV*)
9395 if test "$GCC" = "yes"
9396 then CCSHARED="-fPIC"
9397 else CCSHARED="-Kpic -belf"
9398 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9402$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009404# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9406$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407if test -z "$LINKFORSHARED"
9408then
Guido van Rossum07397971997-04-29 21:49:50 +00009409 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009410 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009411 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009412 LINKFORSHARED="-Wl,-E -Wl,+s";;
9413# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009414 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009415 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009416 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009418 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009419
9420 # Issue #18075: the default maximum stack size (8MBytes) is too
9421 # small for the default recursion limit. Increase the stack size
9422 # to ensure that tests don't crash
9423 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9424
Jack Jansene578a632001-08-15 01:27:14 +00009425 if test "$enable_framework"
9426 then
Jack Jansenda49e192005-01-07 13:08:22 +00009427 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009428 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009429 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009430 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009431 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009432 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009433 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009434 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9435 then
9436 LINKFORSHARED="-Wl,--export-dynamic"
9437 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009438 SunOS/5*) case $CC in
9439 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009440 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009441 then
9442 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009443 fi;;
9444 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009445 CYGWIN*)
9446 if test $enable_shared = "no"
9447 then
9448 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9449 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009450 QNX*)
9451 # -Wl,-E causes the symbols to be added to the dynamic
9452 # symbol table so that they can be found when a module
9453 # is loaded. -N 2048K causes the stack size to be set
9454 # to 2048 kilobytes so that the stack doesn't overflow
9455 # when running test_compile.py.
9456 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009457 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9460$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009461
Michael W. Hudson54241132001-12-07 15:38:26 +00009462
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9465$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009466if test ! "$LIBRARY" = "$LDLIBRARY"
9467then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009468 case $ac_sys_system in
9469 CYGWIN*)
9470 # Cygwin needs CCSHARED when building extension DLLs
9471 # but not when building the interpreter DLL.
9472 CFLAGSFORSHARED='';;
9473 *)
9474 CFLAGSFORSHARED='$(CCSHARED)'
9475 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9478$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009479
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009480# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9481# library (with --enable-shared).
9482# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009483# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9484# if it is not required, since it creates a dependency of the shared library
9485# to LIBS. This, in turn, means that applications linking the shared libpython
9486# don't need to link LIBS explicitly. The default should be only changed
9487# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9490$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009491case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009492 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009493 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009494esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9496$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009497
9498
Guido van Rossum627b2d71993-12-24 10:39:16 +00009499# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9501$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009502if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009503 $as_echo_n "(cached) " >&6
9504else
9505 ac_check_lib_save_LIBS=$LIBS
9506LIBS="-lsendfile $LIBS"
9507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9508/* end confdefs.h. */
9509
9510/* Override any GCC internal prototype to avoid an error.
9511 Use char because int might match the return type of a GCC
9512 builtin and then its argument prototype would still apply. */
9513#ifdef __cplusplus
9514extern "C"
9515#endif
9516char sendfile ();
9517int
9518main ()
9519{
9520return sendfile ();
9521 ;
9522 return 0;
9523}
9524_ACEOF
9525if ac_fn_c_try_link "$LINENO"; then :
9526 ac_cv_lib_sendfile_sendfile=yes
9527else
9528 ac_cv_lib_sendfile_sendfile=no
9529fi
9530rm -f core conftest.err conftest.$ac_objext \
9531 conftest$ac_exeext conftest.$ac_ext
9532LIBS=$ac_check_lib_save_LIBS
9533fi
9534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9535$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009536if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009537 cat >>confdefs.h <<_ACEOF
9538#define HAVE_LIBSENDFILE 1
9539_ACEOF
9540
9541 LIBS="-lsendfile $LIBS"
9542
9543fi
9544
Matthias Kloseb9621712010-04-24 17:59:49 +00009545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9546$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009547if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009549else
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009551LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555/* Override any GCC internal prototype to avoid an error.
9556 Use char because int might match the return type of a GCC
9557 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009558#ifdef __cplusplus
9559extern "C"
9560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009561char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ;
9567 return 0;
9568}
9569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009572else
Matthias Kloseb9621712010-04-24 17:59:49 +00009573 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009575rm -f core conftest.err conftest.$ac_objext \
9576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009577LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9580$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009581if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 cat >>confdefs.h <<_ACEOF
9583#define HAVE_LIBDL 1
9584_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009585
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009586 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009587
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009588fi
9589 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9591$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009592if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009593 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009594else
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009596LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600/* Override any GCC internal prototype to avoid an error.
9601 Use char because int might match the return type of a GCC
9602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009603#ifdef __cplusplus
9604extern "C"
9605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009606char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009607int
9608main ()
9609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009611 ;
9612 return 0;
9613}
9614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009617else
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009620rm -f core conftest.err conftest.$ac_objext \
9621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9625$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009626if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 cat >>confdefs.h <<_ACEOF
9628#define HAVE_LIBDLD 1
9629_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009630
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009631 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009632
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009633fi
9634 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009635
Michael Felt0d3ccb42017-12-30 22:39:20 +01009636# checks for uuid.h location
9637for ac_header in uuid/uuid.h uuid.h
9638do :
9639 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9640ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9641if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9642 cat >>confdefs.h <<_ACEOF
9643#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9644_ACEOF
9645
9646fi
9647
9648done
9649
9650
Berker Peksag9a10ff42017-11-08 23:09:16 +03009651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9652$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9654/* end confdefs.h. */
9655#include <uuid/uuid.h>
9656int
9657main ()
9658{
9659
9660#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009661void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009662#endif
9663
9664 ;
9665 return 0;
9666}
9667_ACEOF
9668if ac_fn_c_try_compile "$LINENO"; then :
9669
9670$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9671
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9673$as_echo "yes" >&6; }
9674else
9675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676$as_echo "no" >&6; }
9677
9678fi
9679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9680
Michael Felt0d3ccb42017-12-30 22:39:20 +01009681# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009682# FreeBSD and OpenBSD provides support as well
9683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9684$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9686/* end confdefs.h. */
9687#include <uuid.h>
9688int
9689main ()
9690{
9691
9692#ifndef uuid_create
9693void *x = uuid_create
9694#endif
9695
9696 ;
9697 return 0;
9698}
9699_ACEOF
9700if ac_fn_c_try_compile "$LINENO"; then :
9701
9702$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9703
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9705$as_echo "yes" >&6; }
9706else
9707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9708$as_echo "no" >&6; }
9709
9710fi
9711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9712
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009713# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9714# stream in big-endian byte-order
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9716$as_echo_n "checking for uuid_enc_be... " >&6; }
9717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9718/* end confdefs.h. */
9719#include <uuid.h>
9720int
9721main ()
9722{
9723
9724#ifndef uuid_enc_be
Michael Felt20cd5c62018-06-09 15:59:02 -06009725void *x = uuid_enc_be
Miss Islington (bot)5734f412018-05-24 16:22:59 -07009726#endif
9727
9728 ;
9729 return 0;
9730}
9731_ACEOF
9732if ac_fn_c_try_compile "$LINENO"; then :
9733
9734$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9735
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9737$as_echo "yes" >&6; }
9738else
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
9741
9742fi
9743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9744
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009745# 'Real Time' functions on Solaris
9746# posix4 on Solaris 2.6
9747# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009749$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009750if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009752else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009753 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009757/* Override any GCC internal prototype to avoid an error.
9758 Use char because int might match the return type of a GCC
9759 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760#ifdef __cplusplus
9761extern "C"
9762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009763char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
9766{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ;
9769 return 0;
9770}
9771_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772for ac_lib in '' pthread rt posix4; do
9773 if test -z "$ac_lib"; then
9774 ac_res="none required"
9775 else
9776 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009777 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782rm -f core conftest.err conftest.$ac_objext \
9783 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009784 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787done
Victor Stinnere0be4232011-10-25 13:06:09 +02009788if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790else
9791 ac_cv_search_sem_init=no
9792fi
9793rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009794LIBS=$ac_func_search_save_LIBS
9795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9797$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009799if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009801
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009802fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009803
Martin v. Löwis519adae2003-09-20 10:47:47 +00009804
Martin v. Löwis19d17342003-06-14 21:03:05 +00009805# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9807$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009808if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009810else
9811 ac_check_lib_save_LIBS=$LIBS
9812LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009814/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009815
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816/* Override any GCC internal prototype to avoid an error.
9817 Use char because int might match the return type of a GCC
9818 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009819#ifdef __cplusplus
9820extern "C"
9821#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009822char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009823int
9824main ()
9825{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009827 ;
9828 return 0;
9829}
9830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009831if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009832 ac_cv_lib_intl_textdomain=yes
9833else
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009836rm -f core conftest.err conftest.$ac_objext \
9837 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009838LIBS=$ac_check_lib_save_LIBS
9839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9841$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009842if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009845
Brett Cannonc6d936e2009-06-07 20:09:53 +00009846 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009847fi
9848
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009849
9850# checks for system dependent C++ extensions support
9851case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9853$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009856
Georg Brandl59e87bd2011-02-15 19:48:59 +00009857 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009858int
9859main ()
9860{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009861loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 ;
9863 return 0;
9864}
Matthias Kloseb159a552010-04-25 21:00:44 +00009865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009867if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009868
Matthias Kloseb159a552010-04-25 21:00:44 +00009869
Matthias Kloseb9621712010-04-24 17:59:49 +00009870$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009871
Matthias Kloseb159a552010-04-25 21:00:44 +00009872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009873$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009874
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009875else
Matthias Kloseb159a552010-04-25 21:00:44 +00009876
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009878$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009879
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881rm -f core conftest.err conftest.$ac_objext \
9882 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009883 *) ;;
9884esac
9885
Christian Heimes985ecdc2013-11-20 11:46:18 +01009886# check for systems that require aligned memory access
9887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9888$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009889if ${ac_cv_aligned_required+:} false; then :
9890 $as_echo_n "(cached) " >&6
9891else
9892 if test "$cross_compiling" = yes; then :
9893 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009894else
9895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9896/* end confdefs.h. */
9897
9898int main()
9899{
9900 char s[16];
9901 int i, *p1, *p2;
9902 for (i=0; i < 16; i++)
9903 s[i] = i;
9904 p1 = (int*)(s+1);
9905 p2 = (int*)(s+2);
9906 if (*p1 == *p2)
9907 return 1;
9908 return 0;
9909}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009910_ACEOF
9911if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009912 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009913else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009914 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009915fi
9916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9917 conftest.$ac_objext conftest.beam conftest.$ac_ext
9918fi
9919
9920
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009921fi
9922
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9924$as_echo "$ac_cv_aligned_required" >&6; }
9925if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009926
9927$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9928
9929fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009930
9931# str, bytes and memoryview hash algorithm
9932
9933
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9935$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9936
9937# Check whether --with-hash_algorithm was given.
9938if test "${with_hash_algorithm+set}" = set; then :
9939 withval=$with_hash_algorithm;
9940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9941$as_echo "$withval" >&6; }
9942case "$withval" in
9943 siphash24)
9944 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9945
9946 ;;
9947 fnv)
9948 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9949
9950 ;;
9951 *)
9952 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9953 ;;
9954esac
9955
9956else
9957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9958$as_echo "default" >&6; }
9959fi
9960
9961
Charles-François Natalid30b0222014-05-08 23:08:51 +01009962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9963$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9964
9965# Check whether --with-address_sanitizer was given.
9966if test "${with_address_sanitizer+set}" = set; then :
9967 withval=$with_address_sanitizer;
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9969$as_echo "$withval" >&6; }
9970BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9971LDFLAGS="-fsanitize=address $LDFLAGS"
9972
9973else
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975$as_echo "no" >&6; }
9976fi
9977
9978
Guido van Rossum70c7f481998-03-26 18:44:10 +00009979# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9981$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009982if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009984else
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009986LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990/* Override any GCC internal prototype to avoid an error.
9991 Use char because int might match the return type of a GCC
9992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009993#ifdef __cplusplus
9994extern "C"
9995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009996char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009997int
9998main ()
9999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010001 ;
10002 return 0;
10003}
10004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010006 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010007else
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010rm -f core conftest.err conftest.$ac_objext \
10011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010012LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10015$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010016if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010017 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010018fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010019 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10021$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010022if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010023 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010024else
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010026LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030/* Override any GCC internal prototype to avoid an error.
10031 Use char because int might match the return type of a GCC
10032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010033#ifdef __cplusplus
10034extern "C"
10035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010036char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010037int
10038main ()
10039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010040return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ;
10042 return 0;
10043}
10044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010046 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010047else
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010050rm -f core conftest.err conftest.$ac_objext \
10051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010052LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10055$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010056if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010057 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010058fi
10059 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010060
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10062$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010065if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10068$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010069LIBS="$withval $LIBS"
10070
10071else
Matthias Kloseb9621712010-04-24 17:59:49 +000010072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074fi
10075
Guido van Rossum7f43da71994-08-01 12:15:30 +000010076
Victor Stinner8291b5e2015-03-20 16:03:14 +010010077
10078
10079
10080
10081
10082
Benjamin Peterson62ed6be2017-12-21 21:43:09 -080010083
Victor Stinner8291b5e2015-03-20 16:03:14 +010010084if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10085 if test -n "$ac_tool_prefix"; then
10086 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10087set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10089$as_echo_n "checking for $ac_word... " >&6; }
10090if ${ac_cv_path_PKG_CONFIG+:} false; then :
10091 $as_echo_n "(cached) " >&6
10092else
10093 case $PKG_CONFIG in
10094 [\\/]* | ?:[\\/]*)
10095 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10096 ;;
10097 *)
10098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10099for as_dir in $PATH
10100do
10101 IFS=$as_save_IFS
10102 test -z "$as_dir" && as_dir=.
10103 for ac_exec_ext in '' $ac_executable_extensions; do
10104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10105 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10107 break 2
10108 fi
10109done
10110 done
10111IFS=$as_save_IFS
10112
10113 ;;
10114esac
10115fi
10116PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10117if test -n "$PKG_CONFIG"; then
10118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10119$as_echo "$PKG_CONFIG" >&6; }
10120else
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
10123fi
10124
10125
10126fi
10127if test -z "$ac_cv_path_PKG_CONFIG"; then
10128 ac_pt_PKG_CONFIG=$PKG_CONFIG
10129 # Extract the first word of "pkg-config", so it can be a program name with args.
10130set dummy pkg-config; ac_word=$2
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10132$as_echo_n "checking for $ac_word... " >&6; }
10133if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10134 $as_echo_n "(cached) " >&6
10135else
10136 case $ac_pt_PKG_CONFIG in
10137 [\\/]* | ?:[\\/]*)
10138 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10139 ;;
10140 *)
10141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10142for as_dir in $PATH
10143do
10144 IFS=$as_save_IFS
10145 test -z "$as_dir" && as_dir=.
10146 for ac_exec_ext in '' $ac_executable_extensions; do
10147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10148 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10150 break 2
10151 fi
10152done
10153 done
10154IFS=$as_save_IFS
10155
10156 ;;
10157esac
10158fi
10159ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10160if test -n "$ac_pt_PKG_CONFIG"; then
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10162$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10163else
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
10166fi
10167
10168 if test "x$ac_pt_PKG_CONFIG" = x; then
10169 PKG_CONFIG=""
10170 else
10171 case $cross_compiling:$ac_tool_warned in
10172yes:)
10173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10175ac_tool_warned=yes ;;
10176esac
10177 PKG_CONFIG=$ac_pt_PKG_CONFIG
10178 fi
10179else
10180 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10181fi
10182
10183fi
10184if test -n "$PKG_CONFIG"; then
10185 _pkg_min_version=0.9.0
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10187$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10188 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10190$as_echo "yes" >&6; }
10191 else
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193$as_echo "no" >&6; }
10194 PKG_CONFIG=""
10195 fi
10196fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010197
10198# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10200$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010201
10202# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010203if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010204 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010205else
10206 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010207fi
10208
10209
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10211$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010212
10213# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10215$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010216
10217# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010218if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010219 withval=$with_system_ffi;
10220fi
10221
10222
Zachary Waref40d4dd2016-09-17 01:25:24 -050010223if test "$ac_sys_system" = "Darwin"
10224then
10225 case "$with_system_ffi" in
10226 "")
10227 with_system_ffi="no"
10228 ;;
10229 yes|no)
10230 ;;
10231 *)
10232 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10233 ;;
10234 esac
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10236$as_echo "$with_system_ffi" >&6; }
10237else
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10239$as_echo "yes" >&6; }
10240 if test "$with_system_ffi" != ""
10241 then
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10243$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10244 fi
10245 with_system_ffi="yes"
10246fi
Zachary Ware935043d2016-09-09 17:01:21 -070010247
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010248if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010249 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10250else
10251 LIBFFI_INCLUDEDIR=""
10252fi
10253
10254
Stefan Krah60187b52012-03-23 19:06:27 +010010255# Check for use of the system libmpdec library
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10257$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10258
10259# Check whether --with-system_libmpdec was given.
10260if test "${with_system_libmpdec+set}" = set; then :
10261 withval=$with_system_libmpdec;
10262else
10263 with_system_libmpdec="no"
10264fi
10265
10266
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10268$as_echo "$with_system_libmpdec" >&6; }
10269
Benjamin Peterson076ed002010-10-31 17:11:02 +000010270# Check for support for loadable sqlite extensions
10271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10272$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10273# Check whether --enable-loadable-sqlite-extensions was given.
10274if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10275 enableval=$enable_loadable_sqlite_extensions;
10276else
10277 enable_loadable_sqlite_extensions="no"
10278fi
10279
10280
10281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10282$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10283
Ned Deilyd819b932013-09-06 01:07:05 -070010284# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10285
10286
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10288$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10289
10290# Check whether --with-tcltk-includes was given.
10291if test "${with_tcltk_includes+set}" = set; then :
10292 withval=$with_tcltk_includes;
10293else
10294 with_tcltk_includes="default"
10295fi
10296
10297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10298$as_echo "$with_tcltk_includes" >&6; }
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10300$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10301
10302# Check whether --with-tcltk-libs was given.
10303if test "${with_tcltk_libs+set}" = set; then :
10304 withval=$with_tcltk_libs;
10305else
10306 with_tcltk_libs="default"
10307fi
10308
10309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10310$as_echo "$with_tcltk_libs" >&6; }
10311if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10312then
10313 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10314 then
10315 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10316 fi
10317 TCLTK_INCLUDES=""
10318 TCLTK_LIBS=""
10319else
10320 TCLTK_INCLUDES="$with_tcltk_includes"
10321 TCLTK_LIBS="$with_tcltk_libs"
10322fi
10323
Matthias Klose55708cc2009-04-30 08:06:49 +000010324# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10326$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010327
10328# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010329if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010330 withval=$with_dbmliborder;
10331if test x$with_dbmliborder = xyes
10332then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010333as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010334else
10335 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10336 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10337 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010338 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010339 fi
10340 done
10341fi
10342fi
10343
Matthias Kloseb9621712010-04-24 17:59:49 +000010344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10345$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347
Martin v. Löwis11437992002-04-12 09:54:03 +000010348
10349# Templates for things AC_DEFINEd more than once.
10350# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010351
10352
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010353if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010354then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010355 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010357
10358 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010359elif test "$ac_cv_kpthread" = "yes"
10360then
10361 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010362 if test "$ac_cv_cxx_thread" = "yes"; then
10363 CXX="$CXX -Kpthread"
10364 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010365 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010366elif test "$ac_cv_kthread" = "yes"
10367then
10368 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010369 if test "$ac_cv_cxx_thread" = "yes"; then
10370 CXX="$CXX -Kthread"
10371 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010372 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010373elif test "$ac_cv_pthread" = "yes"
10374then
10375 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010376 if test "$ac_cv_cxx_thread" = "yes"; then
10377 CXX="$CXX -pthread"
10378 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010379 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010380else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010381 if test ! -z "$withval" -a -d "$withval"
10382 then LDFLAGS="$LDFLAGS -L$withval"
10383 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010384
10385 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010386 # define _POSIX_THREADS in unistd.h. Some apparently don't
10387 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10389$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010391/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010392
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010393#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010394#ifdef _POSIX_THREADS
10395yes
10396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010397
10398_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010401 unistd_defines_pthreads=yes
10402else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010403 unistd_defines_pthreads=no
10404fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010405rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010406
Matthias Kloseb9621712010-04-24 17:59:49 +000010407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10408$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010409
Matthias Kloseb9621712010-04-24 17:59:49 +000010410 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010411
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010412 # Just looking for pthread_create in libpthread is not enough:
10413 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10414 # So we really have to include pthread.h, and then link.
10415 _libs=$LIBS
10416 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10418$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010421
10422#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010423#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010424
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010425void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010426int
10427main ()
10428{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010429
10430pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010431 ;
10432 return 0;
10433}
10434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010435if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10438$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010439 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010440
Guido van Rossum02a1c402000-02-25 19:26:31 +000010441else
Martin v. Löwis11437992002-04-12 09:54:03 +000010442
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010443 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010445if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010446
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010447 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010448
Guido van Rossumad678af1998-10-02 14:42:15 +000010449else
Guido van Rossumad678af1998-10-02 14:42:15 +000010450
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10452$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010453if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010455else
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010457LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461/* Override any GCC internal prototype to avoid an error.
10462 Use char because int might match the return type of a GCC
10463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010464#ifdef __cplusplus
10465extern "C"
10466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010467char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010468int
10469main ()
10470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010471return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010478else
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010483LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10486$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010487if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010488
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010489 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010490 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010491
Greg Steinadf63d62000-07-05 10:38:09 +000010492else
Greg Steinadf63d62000-07-05 10:38:09 +000010493
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10495$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010496if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010498else
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010500LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010503
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504/* Override any GCC internal prototype to avoid an error.
10505 Use char because int might match the return type of a GCC
10506 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010507#ifdef __cplusplus
10508extern "C"
10509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010510char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010511int
10512main ()
10513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010515 ;
10516 return 0;
10517}
10518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010520 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010521else
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010524rm -f core conftest.err conftest.$ac_objext \
10525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010526LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10529$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010530if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010533 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010534
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010535else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010536
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10538$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010539if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010541else
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010543LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547/* Override any GCC internal prototype to avoid an error.
10548 Use char because int might match the return type of a GCC
10549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010550#ifdef __cplusplus
10551extern "C"
10552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010553char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010554int
10555main ()
10556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 ;
10559 return 0;
10560}
10561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010563 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010564else
Matthias Kloseb9621712010-04-24 17:59:49 +000010565 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010567rm -f core conftest.err conftest.$ac_objext \
10568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010569LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10572$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010573if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010574
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010575 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010576 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010577
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010578else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10581$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010582if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010584else
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010586LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590/* Override any GCC internal prototype to avoid an error.
10591 Use char because int might match the return type of a GCC
10592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010593#ifdef __cplusplus
10594extern "C"
10595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010596char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010597int
10598main ()
10599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 ;
10602 return 0;
10603}
10604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010610rm -f core conftest.err conftest.$ac_objext \
10611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010612LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10615$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010616if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010617
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010618 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010619 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010620
Guido van Rossumb93a8621998-05-07 13:27:32 +000010621else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010622
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010623 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10624
Guido van Rossum2d38f911996-06-26 19:47:01 +000010625fi
10626
Guido van Rossum627b2d71993-12-24 10:39:16 +000010627
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010628fi
10629
Guido van Rossum0be3e491997-05-22 20:33:33 +000010630fi
10631
Guido van Rossum49545951997-12-02 19:28:29 +000010632fi
10633
Guido van Rossumb93a8621998-05-07 13:27:32 +000010634fi
10635
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010637rm -f core conftest.err conftest.$ac_objext \
10638 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10641$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644else
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010646LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650/* Override any GCC internal prototype to avoid an error.
10651 Use char because int might match the return type of a GCC
10652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010653#ifdef __cplusplus
10654extern "C"
10655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010656char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010657int
10658main ()
10659{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 ;
10662 return 0;
10663}
10664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010667else
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670rm -f core conftest.err conftest.$ac_objext \
10671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010672LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10675$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010676if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010677
Martin v. Löwis130fb172001-07-19 11:00:41 +000010678 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010679
Guido van Rossum627b2d71993-12-24 10:39:16 +000010680fi
10681
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010682
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010683fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010684
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685if test "$posix_threads" = "yes"; then
10686 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689
10690 fi
10691
10692 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10693 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010694 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010695$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010697 ;;
10698 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700
10701 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010702 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010703$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010704
10705 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706 esac
10707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10709$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010710 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712else
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010714 ac_cv_pthread_system_supported=no
10715else
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010718
10719 #include <stdio.h>
10720 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010721 void *foo(void *parm) {
10722 return NULL;
10723 }
10724 main() {
10725 pthread_attr_t attr;
10726 pthread_t id;
10727 if (pthread_attr_init(&attr)) exit(-1);
10728 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10729 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10730 exit(0);
10731 }
10732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010733if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010734 ac_cv_pthread_system_supported=yes
10735else
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010740fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742
Guido van Rossum627b2d71993-12-24 10:39:16 +000010743fi
10744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10746$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010747 if test "$ac_cv_pthread_system_supported" = "yes"; then
10748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010750
10751 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 for ac_func in pthread_sigmask
10753do :
10754 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010755if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010756 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010757#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010758_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010759 case $ac_sys_system in
10760 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010763
10764 ;;
10765 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010766fi
10767done
10768
pdoxe14679c2017-10-05 00:01:56 -070010769 for ac_func in pthread_getcpuclockid
10770do :
10771 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10772if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10773 cat >>confdefs.h <<_ACEOF
10774#define HAVE_PTHREAD_GETCPUCLOCKID 1
10775_ACEOF
10776
10777fi
10778done
10779
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010780fi
10781
10782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Matthias Kloseb9621712010-04-24 17:59:49 +000010785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10786$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010788if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010789 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793 ipv6=no
10794 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10796$as_echo "yes" >&6; }
10797 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798
10799 ipv6=yes
10800 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802else
Martin v. Löwis11437992002-04-12 09:54:03 +000010803
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010805/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806 /* AF_INET6 available check */
10807#include <sys/types.h>
10808#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010809int
10810main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010811{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010812int domain = AF_INET6;
10813 ;
10814 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815}
Martin v. Löwis11437992002-04-12 09:54:03 +000010816_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010817if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010818
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10820$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010823else
Matthias Kloseb159a552010-04-25 21:00:44 +000010824
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10826$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010828
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010829fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010831
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010832if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10834$as_echo_n "checking if RFC2553 API is available... " >&6; }
10835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010836/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010837
10838 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010839#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010840int
10841main ()
10842{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010843struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010844 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 ;
10846 return 0;
10847}
Matthias Kloseb159a552010-04-25 21:00:44 +000010848
Martin v. Löwis11437992002-04-12 09:54:03 +000010849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010850if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010851
10852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010853$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010854 ipv6=yes
10855
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010856else
Matthias Kloseb159a552010-04-25 21:00:44 +000010857
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010859$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010860 ipv6=no
10861
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010864fi
10865
10866if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010868
10869fi
10870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871fi
10872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873
10874ipv6type=unknown
10875ipv6lib=none
10876ipv6trylibc=no
10877
10878if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10880$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010881 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10882 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883 case $i in
10884 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888#include <netinet/in.h>
10889#ifdef IPV6_INRIA_VERSION
10890yes
10891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010895 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010897rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898
10899 ;;
10900 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010902/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010903
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010904#include <netinet/in.h>
10905#ifdef __KAME__
10906yes
10907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010908_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911 ipv6type=$i;
10912 ipv6lib=inet6
10913 ipv6libdir=/usr/local/v6/lib
10914 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010916rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917
10918 ;;
10919 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923#include <features.h>
10924#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10925yes
10926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930 ipv6type=$i;
10931 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010933rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010934
10935 ;;
10936 linux-inet6)
10937 if test -d /usr/inet6; then
10938 ipv6type=$i
10939 ipv6lib=inet6
10940 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010941 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010942 fi
10943 ;;
10944 solaris)
10945 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010946 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010947 ipv6type=$i
10948 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949 fi
10950 fi
10951 ;;
10952 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010954/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956#include <sys/param.h>
10957#ifdef _TOSHIBA_INET6
10958yes
10959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010960_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963 ipv6type=$i;
10964 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010965 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010966fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010967rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968
10969 ;;
10970 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010972/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010973
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974#include </usr/local/v6/include/sys/v6config.h>
10975#ifdef __V6D__
10976yes
10977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010980 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010981 ipv6type=$i;
10982 ipv6lib=v6;
10983 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010984 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010986rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010987
10988 ;;
10989 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010991/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010993#include <sys/param.h>
10994#ifdef _ZETA_MINAMI_INET6
10995yes
10996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010998if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011000 ipv6type=$i;
11001 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011002 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011003fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011004rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005
11006 ;;
11007 esac
11008 if test "$ipv6type" != "unknown"; then
11009 break
11010 fi
11011 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11013$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011014fi
11015
11016if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11017 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11018 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11019 echo "using lib$ipv6lib"
11020 else
11021 if test $ipv6trylibc = "yes"; then
11022 echo "using libc"
11023 else
11024 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11025 echo "You need to fetch lib$ipv6lib.a from appropriate"
11026 echo 'ipv6 kit and compile beforehand.'
11027 exit 1
11028 fi
11029 fi
11030fi
11031
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11033$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11035/* end confdefs.h. */
11036 /* CAN_RAW_FD_FRAMES available check */
11037#include <linux/can/raw.h>
11038int
11039main ()
11040{
11041int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11042 ;
11043 return 0;
11044}
11045_ACEOF
11046if ac_fn_c_try_compile "$LINENO"; then :
11047
11048
11049$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11050
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11052$as_echo "yes" >&6; }
11053
11054else
11055
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11057$as_echo "no" >&6; }
11058
11059fi
11060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11061
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011062# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11064$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011067if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011068 withval=$with_doc_strings;
11069fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011070
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011071
11072if test -z "$with_doc_strings"
11073then with_doc_strings="yes"
11074fi
11075if test "$with_doc_strings" != "no"
11076then
11077
Matthias Kloseb9621712010-04-24 17:59:49 +000011078$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011079
11080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11082$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011083
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011084# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11086$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011089if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090 withval=$with_pymalloc;
11091fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011092
Neil Schemenauera35c6882001-02-27 04:45:05 +000011093
Neil Schemenauer16c22972002-03-22 15:34:49 +000011094if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011095then
11096 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011097fi
11098if test "$with_pymalloc" != "no"
11099then
Martin v. Löwis11437992002-04-12 09:54:03 +000011100
Matthias Kloseb9621712010-04-24 17:59:49 +000011101$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011102
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011103 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11106$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011107
Nick Coghlan6ea41862017-06-11 13:16:15 +100011108# Check for --with-c-locale-coercion
11109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11110$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11111
11112# Check whether --with-c-locale-coercion was given.
11113if test "${with_c_locale_coercion+set}" = set; then :
11114 withval=$with_c_locale_coercion;
11115fi
11116
11117
11118if test -z "$with_c_locale_coercion"
11119then
11120 with_c_locale_coercion="yes"
11121fi
11122if test "$with_c_locale_coercion" != "no"
11123then
11124
11125$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11126
11127fi
11128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11129$as_echo "$with_c_locale_coercion" >&6; }
11130
11131# Check for --with-c-locale-warning
11132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5
11133$as_echo_n "checking for --with-c-locale-warning... " >&6; }
11134
11135# Check whether --with-c-locale-warning was given.
11136if test "${with_c_locale_warning+set}" = set; then :
11137 withval=$with_c_locale_warning;
11138fi
11139
11140
11141if test -z "$with_c_locale_warning"
11142then
11143 with_c_locale_warning="yes"
11144fi
11145if test "$with_c_locale_warning" != "no"
11146then
11147
11148$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h
11149
11150fi
11151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5
11152$as_echo "$with_c_locale_warning" >&6; }
11153
Benjamin Peterson05159c42009-12-03 03:01:27 +000011154# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11156$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011157
11158# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011159if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011160 withval=$with_valgrind;
11161else
11162 with_valgrind=no
11163fi
11164
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11166$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011167if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 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 +020011169if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011172
11173else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011174 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011175
11176fi
11177
11178
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011179 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011180fi
11181
Łukasz Langaa785c872016-09-09 17:37:37 -070011182# Check for DTrace support
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11184$as_echo_n "checking for --with-dtrace... " >&6; }
11185
11186# Check whether --with-dtrace was given.
11187if test "${with_dtrace+set}" = set; then :
11188 withval=$with_dtrace;
11189else
11190 with_dtrace=no
11191fi
11192
11193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11194$as_echo "$with_dtrace" >&6; }
11195
11196
11197
11198
11199
11200DTRACE=
11201DFLAGS=
11202DTRACE_HEADERS=
11203DTRACE_OBJS=
11204
11205if test "$with_dtrace" = "yes"
11206then
11207 # Extract the first word of "dtrace", so it can be a program name with args.
11208set dummy dtrace; ac_word=$2
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210$as_echo_n "checking for $ac_word... " >&6; }
11211if ${ac_cv_path_DTRACE+:} false; then :
11212 $as_echo_n "(cached) " >&6
11213else
11214 case $DTRACE in
11215 [\\/]* | ?:[\\/]*)
11216 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11217 ;;
11218 *)
11219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220for as_dir in $PATH
11221do
11222 IFS=$as_save_IFS
11223 test -z "$as_dir" && as_dir=.
11224 for ac_exec_ext in '' $ac_executable_extensions; do
11225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228 break 2
11229 fi
11230done
11231 done
11232IFS=$as_save_IFS
11233
11234 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11235 ;;
11236esac
11237fi
11238DTRACE=$ac_cv_path_DTRACE
11239if test -n "$DTRACE"; then
11240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11241$as_echo "$DTRACE" >&6; }
11242else
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11244$as_echo "no" >&6; }
11245fi
11246
11247
11248 if test "$DTRACE" = "not found"; then
11249 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11250 fi
11251
11252$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11253
11254 DTRACE_HEADERS="Include/pydtrace_probes.h"
11255
11256 # On OS X, DTrace providers do not need to be explicitly compiled and
11257 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11258 # generation flag '-G'. We check for presence of this flag, rather than
11259 # hardcoding support by OS, in the interest of robustness.
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11261$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11262if ${ac_cv_dtrace_link+:} false; then :
11263 $as_echo_n "(cached) " >&6
11264else
11265 ac_cv_dtrace_link=no
11266 echo 'BEGIN' > conftest.d
11267 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11268 ac_cv_dtrace_link=yes
11269
11270fi
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11272$as_echo "$ac_cv_dtrace_link" >&6; }
11273 if test "$ac_cv_dtrace_link" = "yes"; then
11274 DTRACE_OBJS="Python/pydtrace.o"
11275 fi
11276fi
11277
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011278# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011279
Guido van Rossum98935bf2001-09-05 19:13:16 +000011280DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011281
Guido van Rossume97ee181999-12-20 21:27:22 +000011282# the dlopen() function means we might want to use dynload_shlib.o. some
11283# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011284for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011285do :
11286 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011287if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011290_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011291
Guido van Rossume97ee181999-12-20 21:27:22 +000011292fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011293done
Guido van Rossume97ee181999-12-20 21:27:22 +000011294
Michael W. Hudson54241132001-12-07 15:38:26 +000011295
Guido van Rossume97ee181999-12-20 21:27:22 +000011296# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11297# loading of modules.
11298
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11300$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011301if test -z "$DYNLOADFILE"
11302then
11303 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011304 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11305 if test "$ac_cv_func_dlopen" = yes
11306 then DYNLOADFILE="dynload_shlib.o"
11307 else DYNLOADFILE="dynload_aix.o"
11308 fi
11309 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011310 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011311 *)
11312 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11313 # out any dynamic loading
11314 if test "$ac_cv_func_dlopen" = yes
11315 then DYNLOADFILE="dynload_shlib.o"
11316 else DYNLOADFILE="dynload_stub.o"
11317 fi
11318 ;;
11319 esac
11320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11322$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011323if test "$DYNLOADFILE" != "dynload_stub.o"
11324then
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011327
11328fi
11329
Neil Schemenauer4e425612001-06-19 15:44:15 +000011330# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11331
Michael W. Hudson54241132001-12-07 15:38:26 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11334$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011335if test -z "$MACHDEP_OBJS"
11336then
Jack Jansene578a632001-08-15 01:27:14 +000011337 MACHDEP_OBJS=$extra_machdep_objs
11338else
11339 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011340fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011341if test -z "$MACHDEP_OBJS"; then
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11343$as_echo "none" >&6; }
11344else
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11346$as_echo "$MACHDEP_OBJS" >&6; }
11347fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011348
Guido van Rossum627b2d71993-12-24 10:39:16 +000011349# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011350for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011351 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011352 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011353 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011354 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011355 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011356 if_nameindex \
xdegaye5ce10692017-11-23 12:01:36 +010011357 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011358 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011359 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011360 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011361 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011362 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011363 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011364 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011365 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11366 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011367 sigaction sigaltstack siginterrupt sigpending sigrelse \
11368 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011369 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011370 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011371 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011372do :
11373 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11374ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011375if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011378_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011380fi
11381done
11382
Michael W. Hudson54241132001-12-07 15:38:26 +000011383
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011384ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11385 #include <dirent.h>
11386"
11387if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11388
11389$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11390
11391fi
11392
11393
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011394# For some functions, having a definition is not sufficient, since
11395# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11397$as_echo_n "checking for chroot... " >&6; }
11398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011400#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011401int
11402main ()
11403{
11404void *x=chroot
11405 ;
11406 return 0;
11407}
11408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011412
Matthias Kloseb159a552010-04-25 21:00:44 +000011413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011414$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011415else
Matthias Kloseb9621712010-04-24 17:59:49 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011418
11419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11422$as_echo_n "checking for link... " >&6; }
11423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011424/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011425#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011426int
11427main ()
11428{
11429void *x=link
11430 ;
11431 return 0;
11432}
11433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011435
Matthias Kloseb9621712010-04-24 17:59:49 +000011436$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011437
Matthias Kloseb159a552010-04-25 21:00:44 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011439$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011443
11444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11447$as_echo_n "checking for symlink... " >&6; }
11448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011449/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011450#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011451int
11452main ()
11453{
11454void *x=symlink
11455 ;
11456 return 0;
11457}
11458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011462
Matthias Kloseb159a552010-04-25 21:00:44 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011465else
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011468
11469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11472$as_echo_n "checking for fchdir... " >&6; }
11473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011474/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011475#include <unistd.h>
11476int
11477main ()
11478{
11479void *x=fchdir
11480 ;
11481 return 0;
11482}
11483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011487
Matthias Kloseb159a552010-04-25 21:00:44 +000011488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011489$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11492$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011493
11494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11497$as_echo_n "checking for fsync... " >&6; }
11498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011499/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011500#include <unistd.h>
11501int
11502main ()
11503{
11504void *x=fsync
11505 ;
11506 return 0;
11507}
11508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011510
Matthias Kloseb9621712010-04-24 17:59:49 +000011511$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011512
Matthias Kloseb159a552010-04-25 21:00:44 +000011513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011514$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011515else
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11517$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011518
11519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11522$as_echo_n "checking for fdatasync... " >&6; }
11523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011524/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011525#include <unistd.h>
11526int
11527main ()
11528{
11529void *x=fdatasync
11530 ;
11531 return 0;
11532}
11533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011537
Matthias Kloseb159a552010-04-25 21:00:44 +000011538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011539$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011540else
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11542$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011543
11544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11547$as_echo_n "checking for epoll... " >&6; }
11548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011549/* end confdefs.h. */
11550#include <sys/epoll.h>
11551int
11552main ()
11553{
11554void *x=epoll_create
11555 ;
11556 return 0;
11557}
11558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011562
Matthias Kloseb159a552010-04-25 21:00:44 +000011563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011565else
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011568
11569fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11572$as_echo_n "checking for epoll_create1... " >&6; }
11573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11574/* end confdefs.h. */
11575#include <sys/epoll.h>
11576int
11577main ()
11578{
11579void *x=epoll_create1
11580 ;
11581 return 0;
11582}
11583_ACEOF
11584if ac_fn_c_try_compile "$LINENO"; then :
11585
11586$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11587
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11589$as_echo "yes" >&6; }
11590else
11591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
11593
11594fi
11595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11597$as_echo_n "checking for kqueue... " >&6; }
11598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011599/* end confdefs.h. */
11600
11601#include <sys/types.h>
11602#include <sys/event.h>
11603
11604int
11605main ()
11606{
11607int x=kqueue()
11608 ;
11609 return 0;
11610}
11611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011612if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011615
Matthias Kloseb159a552010-04-25 21:00:44 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011618else
Matthias Kloseb9621712010-04-24 17:59:49 +000011619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11620$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011621
11622fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11625$as_echo_n "checking for prlimit... " >&6; }
11626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11627/* end confdefs.h. */
11628
11629#include <sys/time.h>
11630#include <sys/resource.h>
11631
11632int
11633main ()
11634{
11635void *x=prlimit
11636 ;
11637 return 0;
11638}
11639_ACEOF
11640if ac_fn_c_try_compile "$LINENO"; then :
11641
11642$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11643
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11645$as_echo "yes" >&6; }
11646else
11647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
11649
11650fi
11651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11652
Martin v. Löwisd5843682002-11-21 20:41:28 +000011653# On some systems (eg. FreeBSD 5), we would find a definition of the
11654# functions ctermid_r, setgroups in the library, but no prototype
11655# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11656# address to avoid compiler warnings and potential miscompilations
11657# because of the missing prototypes.
11658
Matthias Kloseb9621712010-04-24 17:59:49 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11660$as_echo_n "checking for ctermid_r... " >&6; }
11661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011662/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011663
Martin v. Löwisd5843682002-11-21 20:41:28 +000011664#include <stdio.h>
11665
Martin v. Löwisd5843682002-11-21 20:41:28 +000011666int
11667main ()
11668{
11669void* p = ctermid_r
11670 ;
11671 return 0;
11672}
11673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011677
Matthias Kloseb159a552010-04-25 21:00:44 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011683
11684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11686
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11688$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011689if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011690 $as_echo_n "(cached) " >&6
11691else
11692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011693/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011694#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011695int
11696main ()
11697{
11698void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011699
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011700 ;
11701 return 0;
11702}
11703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011704if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011705 ac_cv_flock_decl=yes
11706else
11707 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011708
11709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011711
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011712fi
11713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11714$as_echo "$ac_cv_flock_decl" >&6; }
11715if test "x${ac_cv_flock_decl}" = xyes; then
11716 for ac_func in flock
11717do :
11718 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011719if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011720 cat >>confdefs.h <<_ACEOF
11721#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011722_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011723
Antoine Pitroua3000072010-09-07 14:52:42 +000011724else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011726$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011727if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011728 $as_echo_n "(cached) " >&6
11729else
11730 ac_check_lib_save_LIBS=$LIBS
11731LIBS="-lbsd $LIBS"
11732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11733/* end confdefs.h. */
11734
11735/* Override any GCC internal prototype to avoid an error.
11736 Use char because int might match the return type of a GCC
11737 builtin and then its argument prototype would still apply. */
11738#ifdef __cplusplus
11739extern "C"
11740#endif
11741char flock ();
11742int
11743main ()
11744{
11745return flock ();
11746 ;
11747 return 0;
11748}
11749_ACEOF
11750if ac_fn_c_try_link "$LINENO"; then :
11751 ac_cv_lib_bsd_flock=yes
11752else
11753 ac_cv_lib_bsd_flock=no
11754fi
11755rm -f core conftest.err conftest.$ac_objext \
11756 conftest$ac_exeext conftest.$ac_ext
11757LIBS=$ac_check_lib_save_LIBS
11758fi
11759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11760$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011762 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011763
11764
11765$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11766
11767
11768fi
11769
11770
11771fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011772done
11773
Antoine Pitroua3000072010-09-07 14:52:42 +000011774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11777$as_echo_n "checking for getpagesize... " >&6; }
11778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011779/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011780
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011781#include <unistd.h>
11782
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011783int
11784main ()
11785{
11786void* p = getpagesize
11787 ;
11788 return 0;
11789}
11790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011791if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011792
Matthias Kloseb9621712010-04-24 17:59:49 +000011793$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011794
Matthias Kloseb159a552010-04-25 21:00:44 +000011795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011796$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011797else
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011800
11801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011803
Victor Stinner984890f2011-11-24 13:53:38 +010011804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11805$as_echo_n "checking for broken unsetenv... " >&6; }
11806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11807/* end confdefs.h. */
11808
11809#include <stdlib.h>
11810
11811int
11812main ()
11813{
11814int res = unsetenv("DUMMY")
11815 ;
11816 return 0;
11817}
11818_ACEOF
11819if ac_fn_c_try_compile "$LINENO"; then :
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11821$as_echo "no" >&6; }
11822else
11823
11824$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11825
11826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11827$as_echo "yes" >&6; }
11828
11829fi
11830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11831
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011832for ac_prog in true
11833do
11834 # Extract the first word of "$ac_prog", so it can be a program name with args.
11835set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011838if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011840else
11841 if test -n "$TRUE"; then
11842 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11843else
11844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11845for as_dir in $PATH
11846do
11847 IFS=$as_save_IFS
11848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011851 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 $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 +000011853 break 2
11854 fi
11855done
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011857IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011858
11859fi
11860fi
11861TRUE=$ac_cv_prog_TRUE
11862if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11864$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11867$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011868fi
11869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011871 test -n "$TRUE" && break
11872done
11873test -n "$TRUE" || TRUE="/bin/true"
11874
11875
Matthias Kloseb9621712010-04-24 17:59:49 +000011876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11877$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011878if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011880else
11881 ac_check_lib_save_LIBS=$LIBS
11882LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011884/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886/* Override any GCC internal prototype to avoid an error.
11887 Use char because int might match the return type of a GCC
11888 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011889#ifdef __cplusplus
11890extern "C"
11891#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011892char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011893int
11894main ()
11895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011897 ;
11898 return 0;
11899}
11900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011901if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011902 ac_cv_lib_c_inet_aton=yes
11903else
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011906rm -f core conftest.err conftest.$ac_objext \
11907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011908LIBS=$ac_check_lib_save_LIBS
11909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11911$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011912if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011913 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011914else
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11916$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011917if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011919else
11920 ac_check_lib_save_LIBS=$LIBS
11921LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011923/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011925/* Override any GCC internal prototype to avoid an error.
11926 Use char because int might match the return type of a GCC
11927 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011928#ifdef __cplusplus
11929extern "C"
11930#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011931char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011932int
11933main ()
11934{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011935return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011936 ;
11937 return 0;
11938}
11939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011941 ac_cv_lib_resolv_inet_aton=yes
11942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011945rm -f core conftest.err conftest.$ac_objext \
11946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011947LIBS=$ac_check_lib_save_LIBS
11948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11950$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011951if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011952 cat >>confdefs.h <<_ACEOF
11953#define HAVE_LIBRESOLV 1
11954_ACEOF
11955
11956 LIBS="-lresolv $LIBS"
11957
11958fi
11959
11960
11961fi
11962
11963
Christian Heimesd0764e22007-12-04 15:00:33 +000011964# On Tru64, chflags seems to be present, but calling it will
11965# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11967$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011968if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011972 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011975/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011976
Christian Heimesd0764e22007-12-04 15:00:33 +000011977#include <sys/stat.h>
11978#include <unistd.h>
11979int main(int argc, char*argv[])
11980{
11981 if(chflags(argv[0], 0) != 0)
11982 return 1;
11983 return 0;
11984}
Ned Deily3eb67d52011-06-28 00:00:28 -070011985
Christian Heimesd0764e22007-12-04 15:00:33 +000011986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011988 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011989else
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011994fi
11995
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11999$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012000if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012002if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012003 ac_cv_have_chflags="yes"
12004else
12005 ac_cv_have_chflags="no"
12006fi
12007
12008fi
12009if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012012
12013fi
12014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12016$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012017if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012019else
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012021 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012024/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012025
Christian Heimesd0764e22007-12-04 15:00:33 +000012026#include <sys/stat.h>
12027#include <unistd.h>
12028int main(int argc, char*argv[])
12029{
12030 if(lchflags(argv[0], 0) != 0)
12031 return 1;
12032 return 0;
12033}
Ned Deily3eb67d52011-06-28 00:00:28 -070012034
Christian Heimesd0764e22007-12-04 15:00:33 +000012035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012036if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012037 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012038else
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12042 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012043fi
12044
12045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12048$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012049if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012051if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012052 ac_cv_have_lchflags="yes"
12053else
12054 ac_cv_have_lchflags="no"
12055fi
12056
12057fi
12058if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012061
12062fi
12063
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012064case $ac_sys_system/$ac_sys_release in
12065Darwin/*)
12066 _CUR_CFLAGS="${CFLAGS}"
12067 _CUR_LDFLAGS="${LDFLAGS}"
12068 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12069 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12070 ;;
12071esac
12072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12074$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012075if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012077else
12078 ac_check_lib_save_LIBS=$LIBS
12079LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012081/* end confdefs.h. */
12082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083/* Override any GCC internal prototype to avoid an error.
12084 Use char because int might match the return type of a GCC
12085 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012086#ifdef __cplusplus
12087extern "C"
12088#endif
12089char inflateCopy ();
12090int
12091main ()
12092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012094 ;
12095 return 0;
12096}
12097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012099 ac_cv_lib_z_inflateCopy=yes
12100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012103rm -f core conftest.err conftest.$ac_objext \
12104 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012105LIBS=$ac_check_lib_save_LIBS
12106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12108$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012109if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012110
Matthias Kloseb9621712010-04-24 17:59:49 +000012111$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012112
12113fi
12114
12115
12116case $ac_sys_system/$ac_sys_release in
12117Darwin/*)
12118 CFLAGS="${_CUR_CFLAGS}"
12119 LDFLAGS="${_CUR_LDFLAGS}"
12120 ;;
12121esac
12122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12124$as_echo_n "checking for hstrerror... " >&6; }
12125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012126/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012127
Martin v. Löwise9416172003-05-03 10:12:45 +000012128#include <netdb.h>
12129
Martin v. Löwise9416172003-05-03 10:12:45 +000012130int
12131main ()
12132{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012133void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012134 ;
12135 return 0;
12136}
12137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012138if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012141
Matthias Kloseb159a552010-04-25 21:00:44 +000012142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012143$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12146$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012147
12148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012149rm -f core conftest.err conftest.$ac_objext \
12150 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12153$as_echo_n "checking for inet_aton... " >&6; }
12154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012155/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012156
Martin v. Löwis86d66262006-02-17 08:40:11 +000012157#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012158#include <sys/socket.h>
12159#include <netinet/in.h>
12160#include <arpa/inet.h>
12161
Martin v. Löwise9416172003-05-03 10:12:45 +000012162int
12163main ()
12164{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012165void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012166 ;
12167 return 0;
12168}
12169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012173
Matthias Kloseb159a552010-04-25 21:00:44 +000012174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012175$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12178$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012179
12180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012181rm -f core conftest.err conftest.$ac_objext \
12182 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12185$as_echo_n "checking for inet_pton... " >&6; }
12186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012187/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012188
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012189#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012190#include <sys/socket.h>
12191#include <netinet/in.h>
12192#include <arpa/inet.h>
12193
Martin v. Löwise9416172003-05-03 10:12:45 +000012194int
12195main ()
12196{
12197void* p = inet_pton
12198 ;
12199 return 0;
12200}
12201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012205
Matthias Kloseb159a552010-04-25 21:00:44 +000012206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012207$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012208else
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12210$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012211
12212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012214
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012215# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12217$as_echo_n "checking for setgroups... " >&6; }
12218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012219/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012220
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012221#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012222#ifdef HAVE_GRP_H
12223#include <grp.h>
12224#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012225
Martin v. Löwisd5843682002-11-21 20:41:28 +000012226int
12227main ()
12228{
12229void* p = setgroups
12230 ;
12231 return 0;
12232}
12233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012237
Matthias Kloseb159a552010-04-25 21:00:44 +000012238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012239$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012240else
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12242$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012243
12244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012246
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012247# check for openpty and forkpty
12248
12249for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012250do :
12251 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012252if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012255_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012256
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012257else
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12259$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012260if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012262else
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012264LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268/* Override any GCC internal prototype to avoid an error.
12269 Use char because int might match the return type of a GCC
12270 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012271#ifdef __cplusplus
12272extern "C"
12273#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012274char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012275int
12276main ()
12277{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012288rm -f core conftest.err conftest.$ac_objext \
12289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012290LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12293$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012294if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12299$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012302else
12303 ac_check_lib_save_LIBS=$LIBS
12304LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012306/* end confdefs.h. */
12307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308/* Override any GCC internal prototype to avoid an error.
12309 Use char because int might match the return type of a GCC
12310 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012311#ifdef __cplusplus
12312extern "C"
12313#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012314char openpty ();
12315int
12316main ()
12317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012324 ac_cv_lib_bsd_openpty=yes
12325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012328rm -f core conftest.err conftest.$ac_objext \
12329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012330LIBS=$ac_check_lib_save_LIBS
12331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12333$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012334if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012336 LIBS="$LIBS -lbsd"
12337fi
12338
12339
12340fi
12341
Fred Drake8cef4cf2000-06-28 16:40:38 +000012342
12343fi
12344done
12345
12346for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012347do :
12348 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012349if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012350 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012351#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012352_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012353
Fred Drake8cef4cf2000-06-28 16:40:38 +000012354else
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12356$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012357if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012359else
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012361LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365/* Override any GCC internal prototype to avoid an error.
12366 Use char because int might match the return type of a GCC
12367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012368#ifdef __cplusplus
12369extern "C"
12370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012371char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012372int
12373main ()
12374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 ;
12377 return 0;
12378}
12379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012385rm -f core conftest.err conftest.$ac_objext \
12386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012387LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12390$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012391if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012393 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012394else
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12396$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012397if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012399else
12400 ac_check_lib_save_LIBS=$LIBS
12401LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012403/* end confdefs.h. */
12404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405/* Override any GCC internal prototype to avoid an error.
12406 Use char because int might match the return type of a GCC
12407 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012408#ifdef __cplusplus
12409extern "C"
12410#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012411char forkpty ();
12412int
12413main ()
12414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012416 ;
12417 return 0;
12418}
12419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012421 ac_cv_lib_bsd_forkpty=yes
12422else
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012425rm -f core conftest.err conftest.$ac_objext \
12426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012427LIBS=$ac_check_lib_save_LIBS
12428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12430$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012431if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012433 LIBS="$LIBS -lbsd"
12434fi
12435
12436
12437fi
12438
Fred Drake8cef4cf2000-06-28 16:40:38 +000012439
12440fi
12441done
12442
Jack Jansendd19cf82001-12-06 22:36:17 +000012443
Michael W. Hudson54241132001-12-07 15:38:26 +000012444# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012445for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012446do :
12447 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12448ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012449if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012452_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012453
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012454fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012455done
12456
Michael W. Hudson54241132001-12-07 15:38:26 +000012457
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012458ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012459if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012460 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012461
Martin v. Löwis1142de32002-03-29 16:28:31 +000012462else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012464 *" dup2.$ac_objext "* ) ;;
12465 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012467esac
12468
Martin v. Löwis1142de32002-03-29 16:28:31 +000012469fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012470
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012471ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012472if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012473 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12474
12475else
12476 case " $LIBOBJS " in
12477 *" strdup.$ac_objext "* ) ;;
12478 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12479 ;;
12480esac
12481
12482fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012483
12484
12485for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012486do :
12487 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012488if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012490#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012493/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012495int
12496main ()
12497{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012498getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 ;
12500 return 0;
12501}
12502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012503if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
Matthias Kloseb9621712010-04-24 17:59:49 +000012505$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012506
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012509
Guido van Rossum627b2d71993-12-24 10:39:16 +000012510fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012511done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012512
Jack Jansen150753c2003-03-29 22:07:47 +000012513for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012514do :
12515 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012516if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012517 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012518#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012522#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012523int
12524main ()
12525{
12526setpgrp(0,0);
12527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
Matthias Kloseb9621712010-04-24 17:59:49 +000012533$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012534
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012537
12538fi
12539done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012540
Thomas Wouters3a584202000-08-05 23:28:51 +000012541for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012542do :
12543 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012544if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012546#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012550#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 ;
12556 return 0;
12557}
12558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012559if ac_fn_c_try_compile "$LINENO"; then :
12560
Guido van Rossum627b2d71993-12-24 10:39:16 +000012561else
Skip Montanaro6dead952003-09-25 14:50:04 +000012562
Matthias Kloseb9621712010-04-24 17:59:49 +000012563$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012564
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Guido van Rossum627b2d71993-12-24 10:39:16 +000012566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012568
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012570done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012571
Michael W. Hudson54241132001-12-07 15:38:26 +000012572
Victor Stinnere0be4232011-10-25 13:06:09 +020012573for ac_func in clock_gettime
12574do :
12575 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12576if test "x$ac_cv_func_clock_gettime" = xyes; then :
12577 cat >>confdefs.h <<_ACEOF
12578#define HAVE_CLOCK_GETTIME 1
12579_ACEOF
12580
12581else
12582
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12584$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12585if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12586 $as_echo_n "(cached) " >&6
12587else
12588 ac_check_lib_save_LIBS=$LIBS
12589LIBS="-lrt $LIBS"
12590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12591/* end confdefs.h. */
12592
12593/* Override any GCC internal prototype to avoid an error.
12594 Use char because int might match the return type of a GCC
12595 builtin and then its argument prototype would still apply. */
12596#ifdef __cplusplus
12597extern "C"
12598#endif
12599char clock_gettime ();
12600int
12601main ()
12602{
12603return clock_gettime ();
12604 ;
12605 return 0;
12606}
12607_ACEOF
12608if ac_fn_c_try_link "$LINENO"; then :
12609 ac_cv_lib_rt_clock_gettime=yes
12610else
12611 ac_cv_lib_rt_clock_gettime=no
12612fi
12613rm -f core conftest.err conftest.$ac_objext \
12614 conftest$ac_exeext conftest.$ac_ext
12615LIBS=$ac_check_lib_save_LIBS
12616fi
12617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12618$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12619if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12620
Victor Stinner7efb8332014-08-29 15:41:08 +020012621 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012622 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12623
12624
12625$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12626
12627
12628fi
12629
12630
12631fi
12632done
12633
12634
12635for ac_func in clock_getres
12636do :
12637 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12638if test "x$ac_cv_func_clock_getres" = xyes; then :
12639 cat >>confdefs.h <<_ACEOF
12640#define HAVE_CLOCK_GETRES 1
12641_ACEOF
12642
12643else
12644
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12646$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12647if ${ac_cv_lib_rt_clock_getres+:} false; then :
12648 $as_echo_n "(cached) " >&6
12649else
12650 ac_check_lib_save_LIBS=$LIBS
12651LIBS="-lrt $LIBS"
12652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12653/* end confdefs.h. */
12654
12655/* Override any GCC internal prototype to avoid an error.
12656 Use char because int might match the return type of a GCC
12657 builtin and then its argument prototype would still apply. */
12658#ifdef __cplusplus
12659extern "C"
12660#endif
12661char clock_getres ();
12662int
12663main ()
12664{
12665return clock_getres ();
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670if ac_fn_c_try_link "$LINENO"; then :
12671 ac_cv_lib_rt_clock_getres=yes
12672else
12673 ac_cv_lib_rt_clock_getres=no
12674fi
12675rm -f core conftest.err conftest.$ac_objext \
12676 conftest$ac_exeext conftest.$ac_ext
12677LIBS=$ac_check_lib_save_LIBS
12678fi
12679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12680$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12681if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12682
12683 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12684
12685
12686fi
12687
12688
12689fi
12690done
12691
12692
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012693for ac_func in clock_settime
12694do :
12695 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12696if test "x$ac_cv_func_clock_settime" = xyes; then :
12697 cat >>confdefs.h <<_ACEOF
12698#define HAVE_CLOCK_SETTIME 1
12699_ACEOF
12700
12701else
12702
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12704$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12705if ${ac_cv_lib_rt_clock_settime+:} false; then :
12706 $as_echo_n "(cached) " >&6
12707else
12708 ac_check_lib_save_LIBS=$LIBS
12709LIBS="-lrt $LIBS"
12710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12711/* end confdefs.h. */
12712
12713/* Override any GCC internal prototype to avoid an error.
12714 Use char because int might match the return type of a GCC
12715 builtin and then its argument prototype would still apply. */
12716#ifdef __cplusplus
12717extern "C"
12718#endif
12719char clock_settime ();
12720int
12721main ()
12722{
12723return clock_settime ();
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728if ac_fn_c_try_link "$LINENO"; then :
12729 ac_cv_lib_rt_clock_settime=yes
12730else
12731 ac_cv_lib_rt_clock_settime=no
12732fi
12733rm -f core conftest.err conftest.$ac_objext \
12734 conftest$ac_exeext conftest.$ac_ext
12735LIBS=$ac_check_lib_save_LIBS
12736fi
12737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12738$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12739if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12740
12741 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12742
12743
12744fi
12745
12746
12747fi
12748done
12749
12750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12752$as_echo_n "checking for major... " >&6; }
12753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012754/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012755
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012756#if defined(MAJOR_IN_MKDEV)
12757#include <sys/mkdev.h>
12758#elif defined(MAJOR_IN_SYSMACROS)
12759#include <sys/sysmacros.h>
12760#else
12761#include <sys/types.h>
12762#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012763
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012764int
12765main ()
12766{
12767
12768 makedev(major(0),minor(0));
12769
12770 ;
12771 return 0;
12772}
12773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012775
12776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012778
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12780$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012781
12782else
Skip Montanaro6dead952003-09-25 14:50:04 +000012783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012786
12787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012788rm -f core conftest.err conftest.$ac_objext \
12789 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012790
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012791# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012792# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12794$as_echo_n "checking for getaddrinfo... " >&6; }
12795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012796/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012797
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012798#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012799#include <sys/socket.h>
12800#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012801#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012802
Martin v. Löwis11437992002-04-12 09:54:03 +000012803int
12804main ()
12805{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012806getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012812 have_getaddrinfo=yes
12813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012816rm -f core conftest.err conftest.$ac_objext \
12817 conftest$ac_exeext conftest.$ac_ext
12818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12819$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012820if test $have_getaddrinfo = yes
12821then
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12823$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012824 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012826else
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012828
12829if test "${enable_ipv6+set}" = set; then
12830 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12831else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012832 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012833fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012834else
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012836/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012837
Stefan Krah19c21392012-11-22 23:47:32 +010012838#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012839#include <sys/types.h>
12840#include <netdb.h>
12841#include <string.h>
12842#include <sys/socket.h>
12843#include <netinet/in.h>
12844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012845int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012846{
12847 int passive, gaierr, inet4 = 0, inet6 = 0;
12848 struct addrinfo hints, *ai, *aitop;
12849 char straddr[INET6_ADDRSTRLEN], strport[16];
12850
12851 for (passive = 0; passive <= 1; passive++) {
12852 memset(&hints, 0, sizeof(hints));
12853 hints.ai_family = AF_UNSPEC;
12854 hints.ai_flags = passive ? AI_PASSIVE : 0;
12855 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012856 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012857 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12858 (void)gai_strerror(gaierr);
12859 goto bad;
12860 }
12861 for (ai = aitop; ai; ai = ai->ai_next) {
12862 if (ai->ai_addr == NULL ||
12863 ai->ai_addrlen == 0 ||
12864 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12865 straddr, sizeof(straddr), strport, sizeof(strport),
12866 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12867 goto bad;
12868 }
12869 switch (ai->ai_family) {
12870 case AF_INET:
12871 if (strcmp(strport, "54321") != 0) {
12872 goto bad;
12873 }
12874 if (passive) {
12875 if (strcmp(straddr, "0.0.0.0") != 0) {
12876 goto bad;
12877 }
12878 } else {
12879 if (strcmp(straddr, "127.0.0.1") != 0) {
12880 goto bad;
12881 }
12882 }
12883 inet4++;
12884 break;
12885 case AF_INET6:
12886 if (strcmp(strport, "54321") != 0) {
12887 goto bad;
12888 }
12889 if (passive) {
12890 if (strcmp(straddr, "::") != 0) {
12891 goto bad;
12892 }
12893 } else {
12894 if (strcmp(straddr, "::1") != 0) {
12895 goto bad;
12896 }
12897 }
12898 inet6++;
12899 break;
12900 case AF_UNSPEC:
12901 goto bad;
12902 break;
12903 default:
12904 /* another family support? */
12905 break;
12906 }
12907 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012908 freeaddrinfo(aitop);
12909 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012910 }
12911
12912 if (!(inet4 == 0 || inet4 == 2))
12913 goto bad;
12914 if (!(inet6 == 0 || inet6 == 2))
12915 goto bad;
12916
12917 if (aitop)
12918 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012919 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012920
12921 bad:
12922 if (aitop)
12923 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012924 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012925}
12926
Martin v. Löwis11437992002-04-12 09:54:03 +000012927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012929 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012937fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012938
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12942$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12943
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012944if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012945then
12946 if test $ipv6 = yes
12947 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012948 echo 'Fatal: You must get working getaddrinfo() function.'
12949 echo ' or you can specify "--disable-ipv6"'.
12950 exit 1
12951 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012952else
Martin v. Löwis11437992002-04-12 09:54:03 +000012953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012955
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012956fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012957
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012958for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012959do :
12960 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012961if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012963#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012964_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012965
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966fi
12967done
12968
Michael W. Hudson54241132001-12-07 15:38:26 +000012969
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12972$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012973if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978#include <sys/types.h>
12979#include <sys/time.h>
12980#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
12985if ((struct tm *) 0)
12986return 0;
12987 ;
12988 return 0;
12989}
12990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012991if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12999$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013000if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003
13004fi
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13007$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013008if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013012/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013013#include <sys/types.h>
13014#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016int
13017main ()
13018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019struct tm tm;
13020 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 ;
13023 return 0;
13024}
13025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013027 ac_cv_struct_tm=time.h
13028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13034$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013035if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013038
13039fi
13040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013042#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044"
Victor Stinnere0be4232011-10-25 13:06:09 +020013045if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013046
13047cat >>confdefs.h <<_ACEOF
13048#define HAVE_STRUCT_TM_TM_ZONE 1
13049_ACEOF
13050
13051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013052fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013057
13058else
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13060"
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065fi
13066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069_ACEOF
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13072$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013073if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013077/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013078#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079#if !HAVE_DECL_TZNAME
13080extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013082
Martin v. Löwis11437992002-04-12 09:54:03 +000013083int
13084main ()
13085{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 ;
13088 return 0;
13089}
13090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092 ac_cv_var_tzname=yes
13093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013096rm -f core conftest.err conftest.$ac_objext \
13097 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13100$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013101 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013104
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013105 fi
13106fi
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013109if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013110
13111cat >>confdefs.h <<_ACEOF
13112#define HAVE_STRUCT_STAT_ST_RDEV 1
13113_ACEOF
13114
13115
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013116fi
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013119if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121cat >>confdefs.h <<_ACEOF
13122#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13123_ACEOF
13124
13125
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013126fi
13127
Matthias Kloseb9621712010-04-24 17:59:49 +000013128ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013129if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013130
13131cat >>confdefs.h <<_ACEOF
13132#define HAVE_STRUCT_STAT_ST_FLAGS 1
13133_ACEOF
13134
13135
13136fi
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013139if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013140
13141cat >>confdefs.h <<_ACEOF
13142#define HAVE_STRUCT_STAT_ST_GEN 1
13143_ACEOF
13144
13145
13146fi
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013149if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013150
13151cat >>confdefs.h <<_ACEOF
13152#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13153_ACEOF
13154
13155
13156fi
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013159if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013160
Martin v. Löwis11437992002-04-12 09:54:03 +000013161cat >>confdefs.h <<_ACEOF
13162#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13163_ACEOF
13164
13165
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013166fi
13167
Stefan Krah267b6392016-04-26 01:09:18 +020013168ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13169 #include <sys/types.h>
13170 #include <pwd.h>
13171
13172"
13173if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13174
13175cat >>confdefs.h <<_ACEOF
13176#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13177_ACEOF
13178
13179
13180fi
13181ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13182 #include <sys/types.h>
13183 #include <pwd.h>
13184
13185"
13186if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13187
13188cat >>confdefs.h <<_ACEOF
13189#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13190_ACEOF
13191
13192
13193fi
13194
Zachary Ware6a6967e2016-10-01 00:47:27 -050013195# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13196ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13197"
13198if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13199
13200cat >>confdefs.h <<_ACEOF
13201#define HAVE_SIGINFO_T_SI_BAND 1
13202_ACEOF
13203
13204
13205fi
13206
Michael W. Hudson54241132001-12-07 15:38:26 +000013207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13209$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013210if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013212else
Matthias Kloseb159a552010-04-25 21:00:44 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013215/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013216#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013217int
13218main ()
13219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013221 ;
13222 return 0;
13223}
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013226 ac_cv_header_time_altzone=yes
13227else
Matthias Kloseb9621712010-04-24 17:59:49 +000013228 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013232fi
13233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13235$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013236if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013239
13240fi
13241
Guido van Rossumda88dad1995-01-26 00:46:29 +000013242was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13244$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013246/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013247
13248#include <sys/types.h>
13249#include <sys/select.h>
13250#include <sys/time.h>
13251
Martin v. Löwis11437992002-04-12 09:54:03 +000013252int
13253main ()
13254{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255;
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 ;
13257 return 0;
13258}
13259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013261
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013264
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013265 was_it_defined=yes
13266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13270$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13273$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013274if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013278/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013279#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013280int
13281main ()
13282{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013283struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013284 ;
13285 return 0;
13286}
13287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013289 ac_cv_struct_addrinfo=yes
13290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13294fi
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13297$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013301
13302fi
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13305$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013306if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308else
Matthias Kloseb9621712010-04-24 17:59:49 +000013309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013310/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013311
13312# include <sys/types.h>
13313# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013314int
13315main ()
13316{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013317struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ;
13319 return 0;
13320}
13321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013323 ac_cv_struct_sockaddr_storage=yes
13324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13328fi
13329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13331$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013332if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013335
13336fi
13337
Christian Heimesdffa3942016-09-05 23:54:41 +020013338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13339$as_echo_n "checking for sockaddr_alg... " >&6; }
13340if ${ac_cv_struct_sockaddr_alg+:} false; then :
13341 $as_echo_n "(cached) " >&6
13342else
13343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13344/* end confdefs.h. */
13345
13346# include <sys/types.h>
13347# include <sys/socket.h>
13348# include <linux/if_alg.h>
13349int
13350main ()
13351{
13352struct sockaddr_alg s
13353 ;
13354 return 0;
13355}
13356_ACEOF
13357if ac_fn_c_try_compile "$LINENO"; then :
13358 ac_cv_struct_sockaddr_alg=yes
13359else
13360 ac_cv_struct_sockaddr_alg=no
13361fi
13362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13363fi
13364
13365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13366$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13367if test $ac_cv_struct_sockaddr_alg = yes; then
13368
13369$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13370
13371fi
13372
Guido van Rossum627b2d71993-12-24 10:39:16 +000013373# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13376$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013377if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013383int
13384main ()
13385{
13386static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013387test_array [0] = 0;
13388return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
13390 ;
13391 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013392}
Martin v. Löwis11437992002-04-12 09:54:03 +000013393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013394if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013395 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13402$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013403if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013405
13406fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13409$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013410if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416int
13417main ()
13418{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013421 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013423 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425 char const *const *pcpcc;
13426 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 /* NEC SVR4.0.2 mips cc rejects this. */
13428 struct point {int x, y;};
13429 static struct point const zero = {0,0};
13430 /* AIX XL C 1.02.0.0 rejects this.
13431 It does not let you subtract one const X* pointer from another in
13432 an arm of an if-expression whose if-part is not a constant
13433 expression */
13434 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013435 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013437 ++pcpcc;
13438 ppc = (char**) pcpcc;
13439 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013440 { /* SCO 3.2v4 cc rejects this sort of thing. */
13441 char tx;
13442 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 }
13448 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13449 int x[] = {25, 17};
13450 const int *foo = &x[0];
13451 ++foo;
13452 }
13453 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13454 typedef const int *iptr;
13455 iptr p = 0;
13456 ++p;
13457 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013458 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013459 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013460 struct s { int j; const int *ap[3]; } bx;
13461 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 }
13463 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13464 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013465 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013467 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013468#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ;
13471 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472}
Martin v. Löwis11437992002-04-12 09:54:03 +000013473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013474if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013475 ac_cv_c_const=yes
13476else
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13482$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486
13487fi
13488
Michael W. Hudson54241132001-12-07 15:38:26 +000013489
Guido van Rossumda88dad1995-01-26 00:46:29 +000013490works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13492$as_echo_n "checking for working signed char... " >&6; }
13493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013494/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496int
13497main ()
13498{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013499signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013505 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013506else
Skip Montanaro6dead952003-09-25 14:50:04 +000013507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013509
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013510
Guido van Rossum7f43da71994-08-01 12:15:30 +000013511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13514$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013515
Guido van Rossumda88dad1995-01-26 00:46:29 +000013516have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13518$as_echo_n "checking for prototypes... " >&6; }
13519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013520/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013521int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013522int
13523main ()
13524{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013533
Matthias Kloseb159a552010-04-25 21:00:44 +000013534 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13538$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539
Guido van Rossumda88dad1995-01-26 00:46:29 +000013540works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13542$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013544/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013545
13546#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013547int foo(int x, ...) {
13548 va_list va;
13549 va_start(va, x);
13550 va_arg(va, int);
13551 va_arg(va, char *);
13552 va_arg(va, double);
13553 return 0;
13554}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556int
13557main ()
13558{
Guido van Rossum90eea071996-08-30 20:58:57 +000013559return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ;
13561 return 0;
13562}
13563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
13566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013569 works=yes
13570
Guido van Rossum627b2d71993-12-24 10:39:16 +000013571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13574$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575
Martin v. Löwisd6320502004-08-12 13:45:08 +000013576# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13578$as_echo_n "checking for socketpair... " >&6; }
13579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013580/* end confdefs.h. */
13581
13582#include <sys/types.h>
13583#include <sys/socket.h>
13584
13585int
13586main ()
13587{
13588void *x=socketpair
13589 ;
13590 return 0;
13591}
13592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013596
Matthias Kloseb159a552010-04-25 21:00:44 +000013597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013602
13603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013605
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013606# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13608$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013610/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611#include <sys/types.h>
13612#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013613int
13614main ()
13615{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616struct sockaddr x;
13617x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 ;
13619 return 0;
13620}
13621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622if ac_fn_c_try_compile "$LINENO"; then :
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13624$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627
13628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13630$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013631
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013634
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013635# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
13637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13644$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013645 OLD_CFLAGS=$CFLAGS
13646 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013648/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013649
13650# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652int
13653main ()
13654{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013655
13656 char *name;
13657 struct hostent *he, *res;
13658 char buffer[2048];
13659 int buflen = 2048;
13660 int h_errnop;
13661
13662 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
13664 ;
13665 return 0;
13666}
13667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013671
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13676$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678else
Skip Montanaro6dead952003-09-25 14:50:04 +000013679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13681$as_echo "no" >&6; }
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13683$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013685/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013687# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689int
13690main ()
13691{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013692
13693 char *name;
13694 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013695 char buffer[2048];
13696 int buflen = 2048;
13697 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013698
Matthias Kloseb159a552010-04-25 21:00:44 +000013699 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
13701 ;
13702 return 0;
13703}
13704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013708
Martin v. Löwis11437992002-04-12 09:54:03 +000013709
Matthias Kloseb159a552010-04-25 21:00:44 +000013710$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13713$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013714
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013715else
Skip Montanaro6dead952003-09-25 14:50:04 +000013716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13718$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13720$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13722/* end confdefs.h. */
13723
13724# include <netdb.h>
13725
13726int
13727main ()
13728{
13729
13730 char *name;
13731 struct hostent *he;
13732 struct hostent_data data;
13733
13734 (void) gethostbyname_r(name, he, &data);
13735
13736 ;
13737 return 0;
13738}
13739_ACEOF
13740if ac_fn_c_try_compile "$LINENO"; then :
13741
13742 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13743
13744
13745$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13746
13747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13748$as_echo "yes" >&6; }
13749
13750else
13751
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13753$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013754
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013763 CFLAGS=$OLD_CFLAGS
13764
13765else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 for ac_func in gethostbyname
13768do :
13769 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013770if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013772#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013773_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013774
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013775fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013776done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013777
Michael W. Hudson54241132001-12-07 15:38:26 +000013778
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013779fi
13780
Michael W. Hudson54241132001-12-07 15:38:26 +000013781
13782
13783
13784
13785
13786
Guido van Rossum627b2d71993-12-24 10:39:16 +000013787# checks for system services
13788# (none yet)
13789
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013791ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013792if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013793
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013794else
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13796$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013797if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799else
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013801LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805/* Override any GCC internal prototype to avoid an error.
13806 Use char because int might match the return type of a GCC
13807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013808#ifdef __cplusplus
13809extern "C"
13810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013811char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013812int
13813main ()
13814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 ;
13817 return 0;
13818}
13819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013822else
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013825rm -f core conftest.err conftest.$ac_objext \
13826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013827LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13830$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013831if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 cat >>confdefs.h <<_ACEOF
13833#define HAVE_LIBIEEE 1
13834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013836 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013837
Guido van Rossum627b2d71993-12-24 10:39:16 +000013838fi
13839
Michael W. Hudson54241132001-12-07 15:38:26 +000013840
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013841fi
13842
Michael W. Hudson54241132001-12-07 15:38:26 +000013843
Guido van Rossum7f43da71994-08-01 12:15:30 +000013844# check for --with-libm=...
13845
Guido van Rossum563e7081996-09-10 18:20:48 +000013846case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013847Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013848*) LIBM=-lm
13849esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13851$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013854if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013856if test "$withval" = no
13857then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13859$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013860elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013861then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13863$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013864else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013865fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013866else
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13868$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013869fi
13870
Guido van Rossum7f43da71994-08-01 12:15:30 +000013871
13872# check for --with-libc=...
13873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13875$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013880if test "$withval" = no
13881then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13883$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013884elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013885then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13887$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013888else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013889fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013890else
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13892$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893fi
13894
Guido van Rossum7f43da71994-08-01 12:15:30 +000013895
Stefan Krah1919b7e2012-03-21 18:25:23 +010013896# **************************************
13897# * Check for gcc x64 inline assembler *
13898# **************************************
13899
13900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13901$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903/* end confdefs.h. */
13904
13905int
13906main ()
13907{
13908
13909 __asm__ __volatile__ ("movq %rcx, %rax");
13910
13911 ;
13912 return 0;
13913}
13914_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013915if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013916 have_gcc_asm_for_x64=yes
13917else
13918 have_gcc_asm_for_x64=no
13919fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013920rm -f core conftest.err conftest.$ac_objext \
13921 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13923$as_echo "$have_gcc_asm_for_x64" >&6; }
13924if test "$have_gcc_asm_for_x64" = yes
13925then
13926
13927$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13928
13929fi
13930
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013931# **************************************************
13932# * Check for various properties of floating point *
13933# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13936$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013937if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013939else
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013942 ac_cv_little_endian_double=no
13943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945/* end confdefs.h. */
13946
13947#include <string.h>
13948int main() {
13949 double x = 9006104071832581.0;
13950 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13951 return 0;
13952 else
13953 return 1;
13954}
13955
13956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013958 ac_cv_little_endian_double=yes
13959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964fi
13965
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013966fi
13967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13969$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013970if test "$ac_cv_little_endian_double" = yes
13971then
13972
Matthias Kloseb9621712010-04-24 17:59:49 +000013973$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013974
13975fi
13976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13978$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013979if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013981else
13982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984 ac_cv_big_endian_double=no
13985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987/* end confdefs.h. */
13988
13989#include <string.h>
13990int main() {
13991 double x = 9006104071832581.0;
13992 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13993 return 0;
13994 else
13995 return 1;
13996}
13997
13998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013999if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014000 ac_cv_big_endian_double=yes
14001else
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14005 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014006fi
14007
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014008fi
14009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14011$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014012if test "$ac_cv_big_endian_double" = yes
14013then
14014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014016
14017fi
14018
14019# Some ARM platforms use a mixed-endian representation for doubles.
14020# While Python doesn't currently have full support for these platforms
14021# (see e.g., issue 1762561), we can at least make sure that float <-> string
14022# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14024$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014025if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014027else
14028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030 ac_cv_mixed_endian_double=no
14031else
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014033/* end confdefs.h. */
14034
14035#include <string.h>
14036int main() {
14037 double x = 9006104071832581.0;
14038 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14039 return 0;
14040 else
14041 return 1;
14042}
14043
14044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014045if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014046 ac_cv_mixed_endian_double=yes
14047else
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14051 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014052fi
14053
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014054fi
14055
Matthias Kloseb9621712010-04-24 17:59:49 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14057$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014058if test "$ac_cv_mixed_endian_double" = yes
14059then
14060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014062
14063fi
14064
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014065# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014066# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014067# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014068# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014069# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014070# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014071
14072# This inline assembler syntax may also work for suncc and icc,
14073# so we try it on all platforms.
14074
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14076$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014078/* end confdefs.h. */
14079
14080int
14081main ()
14082{
14083
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014084 unsigned short cw;
14085 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14086 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014087
14088 ;
14089 return 0;
14090}
14091_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014092if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014093 have_gcc_asm_for_x87=yes
14094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014096fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014097rm -f core conftest.err conftest.$ac_objext \
14098 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14100$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014101if test "$have_gcc_asm_for_x87" = yes
14102then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014105
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014106fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014107
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14109$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14111/* end confdefs.h. */
14112
14113int
14114main ()
14115{
14116
14117 unsigned int fpcr;
14118 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14119 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14120
14121 ;
14122 return 0;
14123}
14124_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014125if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014126 have_gcc_asm_for_mc68881=yes
14127else
14128 have_gcc_asm_for_mc68881=no
14129fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014130rm -f core conftest.err conftest.$ac_objext \
14131 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14133$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14134if test "$have_gcc_asm_for_mc68881" = yes
14135then
14136
14137$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14138
14139fi
14140
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014141# Detect whether system arithmetic is subject to x87-style double
14142# rounding issues. The result of this test has little meaning on non
14143# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14144# mode is round-to-nearest and double rounding issues are present, and
14145# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14147$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014148# $BASECFLAGS may affect the result
14149ac_save_cc="$CC"
14150CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014151if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014152 ac_cv_x87_double_rounding=no
14153else
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014155/* end confdefs.h. */
14156
14157#include <stdlib.h>
14158#include <math.h>
14159int main() {
14160 volatile double x, y, z;
14161 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14162 x = 0.99999999999999989; /* 1-2**-53 */
14163 y = 1./x;
14164 if (y != 1.)
14165 exit(0);
14166 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14167 x = 1e16;
14168 y = 2.99999;
14169 z = x + y;
14170 if (z != 1e16+4.)
14171 exit(0);
14172 /* both tests show evidence of double rounding */
14173 exit(1);
14174}
14175
14176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014177if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014178 ac_cv_x87_double_rounding=no
14179else
Matthias Kloseb9621712010-04-24 17:59:49 +000014180 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14183 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014184fi
14185
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014186CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14188$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014189if test "$ac_cv_x87_double_rounding" = yes
14190then
14191
Matthias Kloseb9621712010-04-24 17:59:49 +000014192$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014193
14194fi
14195
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014196# ************************************
14197# * Check for mathematical functions *
14198# ************************************
14199
14200LIBS_SAVE=$LIBS
14201LIBS="$LIBS $LIBM"
14202
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014203for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14204do :
14205 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14206ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014207if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014208 cat >>confdefs.h <<_ACEOF
14209#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14210_ACEOF
14211
14212fi
14213done
14214
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014215for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014216do :
14217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014220 cat >>confdefs.h <<_ACEOF
14221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14222_ACEOF
14223
14224fi
14225done
14226
14227ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14228"
Victor Stinnere0be4232011-10-25 13:06:09 +020014229if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014230 ac_have_decl=1
14231else
14232 ac_have_decl=0
14233fi
14234
14235cat >>confdefs.h <<_ACEOF
14236#define HAVE_DECL_ISINF $ac_have_decl
14237_ACEOF
14238ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14239"
Victor Stinnere0be4232011-10-25 13:06:09 +020014240if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014241 ac_have_decl=1
14242else
14243 ac_have_decl=0
14244fi
14245
14246cat >>confdefs.h <<_ACEOF
14247#define HAVE_DECL_ISNAN $ac_have_decl
14248_ACEOF
14249ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14250"
Victor Stinnere0be4232011-10-25 13:06:09 +020014251if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014252 ac_have_decl=1
14253else
14254 ac_have_decl=0
14255fi
14256
14257cat >>confdefs.h <<_ACEOF
14258#define HAVE_DECL_ISFINITE $ac_have_decl
14259_ACEOF
14260
14261
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014262# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14263# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14265$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014268else
14269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014271 ac_cv_tanh_preserves_zero_sign=no
14272else
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014274/* end confdefs.h. */
14275
14276#include <math.h>
14277#include <stdlib.h>
14278int main() {
14279 /* return 0 if either negative zeros don't exist
14280 on this platform or if negative zeros exist
14281 and tanh(-0.) == -0. */
14282 if (atan2(0., -1.) == atan2(-0., -1.) ||
14283 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14284 else exit(1);
14285}
14286
14287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014288if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014289 ac_cv_tanh_preserves_zero_sign=yes
14290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014295fi
14296
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014297fi
14298
Matthias Kloseb9621712010-04-24 17:59:49 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14300$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014301if test "$ac_cv_tanh_preserves_zero_sign" = yes
14302then
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014305
14306fi
14307
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014308if test "$ac_cv_func_log1p" = yes
14309then
14310 # On some versions of AIX, log1p(-0.) returns 0. instead of
14311 # -0. See issue #9920.
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14313$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014314 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014315 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014316else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014317
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014318 if test "$cross_compiling" = yes; then :
14319 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014320else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14322/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014323
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014324 #include <math.h>
14325 #include <stdlib.h>
14326 int main() {
14327 /* Fail if the signs of log1p(-0.) and -0. can be
14328 distinguished. */
14329 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14330 return 0;
14331 else
14332 return 1;
14333 }
14334
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014335_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014336if ac_fn_c_try_run "$LINENO"; then :
14337 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014338else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014339 ac_cv_log1p_drops_zero_sign=yes
14340fi
14341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14342 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014343fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014344
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014345fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014346
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14348$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14349fi
14350if test "$ac_cv_log1p_drops_zero_sign" = yes
14351then
14352
14353$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14354
14355fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014356
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014357LIBS=$LIBS_SAVE
14358
Mark Dickinsona614f042009-11-28 12:48:43 +000014359# For multiprocessing module, check that sem_open
14360# actually works. For FreeBSD versions <= 7.2,
14361# the kernel module that provides POSIX semaphores
14362# isn't loaded by default, so an attempt to call
14363# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14365$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014366if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014370 ac_cv_posix_semaphores_enabled=yes
14371else
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014373/* end confdefs.h. */
14374
14375#include <unistd.h>
14376#include <fcntl.h>
14377#include <stdio.h>
14378#include <semaphore.h>
14379#include <sys/stat.h>
14380
14381int main(void) {
14382 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14383 if (a == SEM_FAILED) {
14384 perror("sem_open");
14385 return 1;
14386 }
14387 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014388 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014389 return 0;
14390}
14391
14392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014393if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014394 ac_cv_posix_semaphores_enabled=yes
14395else
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14399 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014400fi
14401
14402
Mark Dickinsona614f042009-11-28 12:48:43 +000014403fi
14404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14406$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014407if test $ac_cv_posix_semaphores_enabled = no
14408then
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014411
14412fi
14413
Mark Dickinson10683072009-04-18 21:18:19 +000014414# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14416$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014417if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014419else
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014421 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014424/* end confdefs.h. */
14425
14426#include <unistd.h>
14427#include <fcntl.h>
14428#include <stdio.h>
14429#include <semaphore.h>
14430#include <sys/stat.h>
14431
14432int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014433 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014434 int count;
14435 int res;
14436 if(a==SEM_FAILED){
14437 perror("sem_open");
14438 return 1;
14439
14440 }
14441 res = sem_getvalue(a, &count);
14442 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014443 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014444 return res==-1 ? 1 : 0;
14445}
14446
Mark Dickinson10683072009-04-18 21:18:19 +000014447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014448if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014449 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14454 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014455fi
14456
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014458fi
14459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14461$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014462if test $ac_cv_broken_sem_getvalue = yes
14463then
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014466
14467fi
14468
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014469ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14470"
14471if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14472 ac_have_decl=1
14473else
14474 ac_have_decl=0
14475fi
14476
14477cat >>confdefs.h <<_ACEOF
14478#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14479_ACEOF
14480ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14481"
14482if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14483 ac_have_decl=1
14484else
14485 ac_have_decl=0
14486fi
14487
14488cat >>confdefs.h <<_ACEOF
14489#define HAVE_DECL_RTLD_NOW $ac_have_decl
14490_ACEOF
14491ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14492"
14493if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14494 ac_have_decl=1
14495else
14496 ac_have_decl=0
14497fi
14498
14499cat >>confdefs.h <<_ACEOF
14500#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14501_ACEOF
14502ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14503"
14504if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14505 ac_have_decl=1
14506else
14507 ac_have_decl=0
14508fi
14509
14510cat >>confdefs.h <<_ACEOF
14511#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14512_ACEOF
14513ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14514"
14515if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14516 ac_have_decl=1
14517else
14518 ac_have_decl=0
14519fi
14520
14521cat >>confdefs.h <<_ACEOF
14522#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14523_ACEOF
14524ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14525"
14526if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14527 ac_have_decl=1
14528else
14529 ac_have_decl=0
14530fi
14531
14532cat >>confdefs.h <<_ACEOF
14533#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14534_ACEOF
14535ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14536"
14537if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14538 ac_have_decl=1
14539else
14540 ac_have_decl=0
14541fi
14542
14543cat >>confdefs.h <<_ACEOF
14544#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14545_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014546ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14547"
14548if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14549 ac_have_decl=1
14550else
14551 ac_have_decl=0
14552fi
14553
14554cat >>confdefs.h <<_ACEOF
14555#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14556_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014557
14558
Mark Dickinsonbd792642009-03-18 20:06:12 +000014559# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14561$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014562# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014563if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014564 enableval=$enable_big_digits; case $enable_big_digits in
14565yes)
14566 enable_big_digits=30 ;;
14567no)
14568 enable_big_digits=15 ;;
1456915|30)
14570 ;;
14571*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014572 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 +000014573esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14575$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014576
14577cat >>confdefs.h <<_ACEOF
14578#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14579_ACEOF
14580
14581
14582else
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14584$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014585fi
14586
14587
Guido van Rossumef2255b2000-03-10 22:30:29 +000014588# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014589ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014590if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
14592
Matthias Kloseb9621712010-04-24 17:59:49 +000014593$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014595 wchar_h="yes"
14596
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597else
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014599
14600fi
14601
Michael W. Hudson54241132001-12-07 15:38:26 +000014602
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014604# determine wchar_t size
14605if test "$wchar_h" = yes
14606then
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14610# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14612$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014613if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014614 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014615else
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14617"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014618
Martin v. Löwis11437992002-04-12 09:54:03 +000014619else
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 if test "$ac_cv_type_wchar_t" = yes; then
14621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014623as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014624See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 else
14626 ac_cv_sizeof_wchar_t=0
14627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14632$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633
14634
14635
Martin v. Löwis11437992002-04-12 09:54:03 +000014636cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014637#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014638_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014639
Michael W. Hudson54241132001-12-07 15:38:26 +000014640
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014641fi
14642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14644$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014645have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014647/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014648
14649#include <tcl.h>
14650#if TCL_UTF_MAX != 6
14651# error "NOT UCS4_TCL"
14652#endif
14653int
14654main ()
14655{
14656
14657 ;
14658 return 0;
14659}
14660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014662
14663
Matthias Kloseb9621712010-04-24 17:59:49 +000014664$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014665
14666 have_ucs4_tcl=yes
14667
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14671$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014672
Skip Montanaro6dead952003-09-25 14:50:04 +000014673# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014674if test "$wchar_h" = yes
14675then
14676 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14678$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014679 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014681else
14682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014684 ac_cv_wchar_t_signed=yes
14685else
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014687/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014688
14689 #include <wchar.h>
14690 int main()
14691 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014692 /* Success: exit code 0 */
14693 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014694 }
14695
14696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014697if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014698 ac_cv_wchar_t_signed=yes
14699else
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014704fi
14705
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014706fi
14707
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14709$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014710fi
14711
Georg Brandl52d168a2008-01-07 18:10:24 +000014712# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014713if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014714 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014715then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014716 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014717
Matthias Kloseb9621712010-04-24 17:59:49 +000014718$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014719
Georg Brandl52d168a2008-01-07 18:10:24 +000014720else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014721 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014722fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14724$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014725
14726# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14728$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014729if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014731else
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 ac_cv_c_bigendian=unknown
14733 # See if we're dealing with a universal compiler.
14734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14735/* end confdefs.h. */
14736#ifndef __APPLE_CC__
14737 not a universal capable compiler
14738 #endif
14739 typedef int dummy;
14740
Skip Montanaro6dead952003-09-25 14:50:04 +000014741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014742if ac_fn_c_try_compile "$LINENO"; then :
14743
14744 # Check for potential -arch flags. It is not universal unless
14745 # there are at least two -arch flags with different values.
14746 ac_arch=
14747 ac_prev=
14748 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14749 if test -n "$ac_prev"; then
14750 case $ac_word in
14751 i?86 | x86_64 | ppc | ppc64)
14752 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14753 ac_arch=$ac_word
14754 else
14755 ac_cv_c_bigendian=universal
14756 break
14757 fi
14758 ;;
14759 esac
14760 ac_prev=
14761 elif test "x$ac_word" = "x-arch"; then
14762 ac_prev=arch
14763 fi
14764 done
14765fi
14766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14767 if test $ac_cv_c_bigendian = unknown; then
14768 # See if sys/param.h defines the BYTE_ORDER macro.
14769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014770/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014771#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014773
Martin v. Löwis11437992002-04-12 09:54:03 +000014774int
14775main ()
14776{
Matthias Kloseb9621712010-04-24 17:59:49 +000014777#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14778 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14779 && LITTLE_ENDIAN)
14780 bogus endian macros
14781 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014782
14783 ;
14784 return 0;
14785}
14786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014787if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014788 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014790/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014791#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014793
Martin v. Löwis11437992002-04-12 09:54:03 +000014794int
14795main ()
14796{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014797#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 not big endian
14799 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
14801 ;
14802 return 0;
14803}
14804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014806 ac_cv_c_bigendian=yes
14807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014811fi
14812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813 fi
14814 if test $ac_cv_c_bigendian = unknown; then
14815 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014817/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014818#include <limits.h>
14819
Martin v. Löwis11437992002-04-12 09:54:03 +000014820int
14821main ()
14822{
Matthias Kloseb9621712010-04-24 17:59:49 +000014823#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14824 bogus endian macros
14825 #endif
14826
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 ;
14828 return 0;
14829}
14830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014831if ac_fn_c_try_compile "$LINENO"; then :
14832 # It does; now see whether it defined to _BIG_ENDIAN or not.
14833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14834/* end confdefs.h. */
14835#include <limits.h>
14836
14837int
14838main ()
14839{
14840#ifndef _BIG_ENDIAN
14841 not big endian
14842 #endif
14843
14844 ;
14845 return 0;
14846}
14847_ACEOF
14848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014850else
Matthias Kloseb9621712010-04-24 17:59:49 +000014851 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14854fi
14855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14856 fi
14857 if test $ac_cv_c_bigendian = unknown; then
14858 # Compile a test program.
14859 if test "$cross_compiling" = yes; then :
14860 # Try to guess by grepping values from an object file.
14861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14862/* end confdefs.h. */
14863short int ascii_mm[] =
14864 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14865 short int ascii_ii[] =
14866 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14867 int use_ascii (int i) {
14868 return ascii_mm[i] + ascii_ii[i];
14869 }
14870 short int ebcdic_ii[] =
14871 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14872 short int ebcdic_mm[] =
14873 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14874 int use_ebcdic (int i) {
14875 return ebcdic_mm[i] + ebcdic_ii[i];
14876 }
14877 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878
Matthias Kloseb9621712010-04-24 17:59:49 +000014879int
14880main ()
14881{
14882return use_ascii (foo) == use_ebcdic (foo);
14883 ;
14884 return 0;
14885}
14886_ACEOF
14887if ac_fn_c_try_compile "$LINENO"; then :
14888 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14889 ac_cv_c_bigendian=yes
14890 fi
14891 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14892 if test "$ac_cv_c_bigendian" = unknown; then
14893 ac_cv_c_bigendian=no
14894 else
14895 # finding both strings is unlikely to happen, but who knows?
14896 ac_cv_c_bigendian=unknown
14897 fi
14898 fi
14899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014901else
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014903/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014905int
14906main ()
14907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 /* Are we little or big endian? From Harbison&Steele. */
14910 union
14911 {
14912 long int l;
14913 char c[sizeof (long int)];
14914 } u;
14915 u.l = 1;
14916 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917
14918 ;
14919 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014920}
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014922if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923 ac_cv_c_bigendian=no
14924else
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14928 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14934$as_echo "$ac_cv_c_bigendian" >&6; }
14935 case $ac_cv_c_bigendian in #(
14936 yes)
14937 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14938;; #(
14939 no)
14940 ;; #(
14941 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014944
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 ;; #(
14946 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014947 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014948 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014950
Michael W. Hudson54241132001-12-07 15:38:26 +000014951
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014952# ABI version string for Python extension modules. This appears between the
14953# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14954# from the following attributes which affect the ABI of this Python build (in
14955# this order):
14956#
14957# * The Python implementation (always 'cpython-' for us)
14958# * The major and minor version numbers
14959# * --with-pydebug (adds a 'd')
14960# * --with-pymalloc (adds a 'm')
14961# * --with-wide-unicode (adds a 'u')
14962#
14963# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014964# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14965# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014966
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14968$as_echo_n "checking ABIFLAGS... " >&6; }
14969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14970$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14972$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014973SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14975$as_echo "$SOABI" >&6; }
14976
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014977
14978case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014979 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014980 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14981 *)
14982 EXT_SUFFIX=${SHLIB_SUFFIX};;
14983esac
14984
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14986$as_echo_n "checking LDVERSION... " >&6; }
14987LDVERSION='$(VERSION)$(ABIFLAGS)'
14988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14989$as_echo "$LDVERSION" >&6; }
14990
doko@python.org87421192013-01-26 11:39:31 +010014991
doko@ubuntu.com55532312016-06-14 08:55:19 +020014992if test x$PLATFORM_TRIPLET = x; then
14993 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14994else
14995 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14996fi
doko@python.org87421192013-01-26 11:39:31 +010014997
14998
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014999# Check whether right shifting a negative integer extends the sign bit
15000# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15002$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015003if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015005else
Martin v. Löwis11437992002-04-12 09:54:03 +000015006
Matthias Kloseb9621712010-04-24 17:59:49 +000015007if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015008 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015009else
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015012
15013int main()
15014{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015015 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015016}
15017
Martin v. Löwis11437992002-04-12 09:54:03 +000015018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015020 ac_cv_rshift_extends_sign=yes
15021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015026fi
15027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028fi
15029
Matthias Kloseb9621712010-04-24 17:59:49 +000015030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15031$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015032if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015033then
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Matthias Kloseb9621712010-04-24 17:59:49 +000015035$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015036
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015037fi
15038
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015039# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15041$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015042if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015044else
Martin v. Löwis11437992002-04-12 09:54:03 +000015045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015047/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015048#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015049int
15050main ()
15051{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015052
15053 FILE *f = fopen("/dev/null", "r");
15054 flockfile(f);
15055 getc_unlocked(f);
15056 funlockfile(f);
15057
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 ;
15059 return 0;
15060}
15061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015062if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015063 ac_cv_have_getc_unlocked=yes
15064else
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 ac_cv_have_getc_unlocked=no
15066fi
15067rm -f core conftest.err conftest.$ac_objext \
15068 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15072$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015073if test "$ac_cv_have_getc_unlocked" = yes
15074then
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015077
15078fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015079
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015080# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015081# save the value of LIBS so we don't actually link Python with readline
15082LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015083
Gregory P. Smith18820942008-09-07 06:24:49 +000015084# On some systems we need to link readline to a termcap compatible
15085# library. NOTE: Keep the precedence of listed libraries synchronised
15086# with setup.py.
15087py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15089$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015090for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015091 if test -z "$py_libtermcap"; then
15092 READLINE_LIBS="-lreadline"
15093 else
15094 READLINE_LIBS="-lreadline -l$py_libtermcap"
15095 fi
15096 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015098/* end confdefs.h. */
15099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100/* Override any GCC internal prototype to avoid an error.
15101 Use char because int might match the return type of a GCC
15102 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015103#ifdef __cplusplus
15104extern "C"
15105#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015106char readline ();
15107int
15108main ()
15109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015111 ;
15112 return 0;
15113}
15114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015115if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015116 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015118rm -f core conftest.err conftest.$ac_objext \
15119 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015120 if test $py_cv_lib_readline = yes; then
15121 break
15122 fi
15123done
15124# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15125#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015126if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15128$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015129else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15131$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015134
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015135fi
15136
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015137# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015139/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015140#include <readline/readline.h>
15141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015142if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015143 have_readline=yes
15144else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015145 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015146
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015147fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015148rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015149if test $have_readline = yes
15150then
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015152/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015153#include <readline/readline.h>
15154
15155_ACEOF
15156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015160
15161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015162rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015163
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015165/* end confdefs.h. */
15166#include <readline/readline.h>
15167
15168_ACEOF
15169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015173
15174fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015175rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015176
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015177fi
15178
Martin v. Löwis0daad592001-09-30 21:09:59 +000015179# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15181$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015182if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015184else
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015186LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190/* Override any GCC internal prototype to avoid an error.
15191 Use char because int might match the return type of a GCC
15192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193#ifdef __cplusplus
15194extern "C"
15195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015196char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015197int
15198main ()
15199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;
15202 return 0;
15203}
15204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015205if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015207else
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015210rm -f core conftest.err conftest.$ac_objext \
15211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015212LIBS=$ac_check_lib_save_LIBS
15213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15215$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015216if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015217
Matthias Kloseb9621712010-04-24 17:59:49 +000015218$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015219
Martin v. Löwis0daad592001-09-30 21:09:59 +000015220fi
15221
Michael W. Hudson54241132001-12-07 15:38:26 +000015222
Thomas Wouters89d996e2007-09-08 17:39:28 +000015223# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15225$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015226if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015228else
15229 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015230LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015232/* end confdefs.h. */
15233
15234/* Override any GCC internal prototype to avoid an error.
15235 Use char because int might match the return type of a GCC
15236 builtin and then its argument prototype would still apply. */
15237#ifdef __cplusplus
15238extern "C"
15239#endif
15240char rl_completion_display_matches_hook ();
15241int
15242main ()
15243{
15244return rl_completion_display_matches_hook ();
15245 ;
15246 return 0;
15247}
15248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015249if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015250 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15251else
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015254rm -f core conftest.err conftest.$ac_objext \
15255 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015256LIBS=$ac_check_lib_save_LIBS
15257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15259$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015260if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015263
15264fi
15265
15266
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015267# also in 4.0, but not in editline
15268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15269$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15270if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15271 $as_echo_n "(cached) " >&6
15272else
15273 ac_check_lib_save_LIBS=$LIBS
15274LIBS="-lreadline $READLINE_LIBS $LIBS"
15275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15276/* end confdefs.h. */
15277
15278/* Override any GCC internal prototype to avoid an error.
15279 Use char because int might match the return type of a GCC
15280 builtin and then its argument prototype would still apply. */
15281#ifdef __cplusplus
15282extern "C"
15283#endif
15284char rl_resize_terminal ();
15285int
15286main ()
15287{
15288return rl_resize_terminal ();
15289 ;
15290 return 0;
15291}
15292_ACEOF
15293if ac_fn_c_try_link "$LINENO"; then :
15294 ac_cv_lib_readline_rl_resize_terminal=yes
15295else
15296 ac_cv_lib_readline_rl_resize_terminal=no
15297fi
15298rm -f core conftest.err conftest.$ac_objext \
15299 conftest$ac_exeext conftest.$ac_ext
15300LIBS=$ac_check_lib_save_LIBS
15301fi
15302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15303$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15304if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15305
15306$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15307
15308fi
15309
15310
Martin v. Löwis0daad592001-09-30 21:09:59 +000015311# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15313$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015314if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015316else
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015318LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322/* Override any GCC internal prototype to avoid an error.
15323 Use char because int might match the return type of a GCC
15324 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015325#ifdef __cplusplus
15326extern "C"
15327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015328char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015329int
15330main ()
15331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 ;
15334 return 0;
15335}
15336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015339else
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015342rm -f core conftest.err conftest.$ac_objext \
15343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015344LIBS=$ac_check_lib_save_LIBS
15345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15347$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015348if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015351
Guido van Rossum353ae582001-07-10 16:45:32 +000015352fi
15353
Jack Jansendd19cf82001-12-06 22:36:17 +000015354
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015355# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015357/* end confdefs.h. */
15358#include <readline/readline.h>
15359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015360if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015361 have_readline=yes
15362else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015363 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015364
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015365fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015366rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015367if test $have_readline = yes
15368then
Matthias Kloseb9621712010-04-24 17:59:49 +000015369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015370/* end confdefs.h. */
15371#include <readline/readline.h>
15372
15373_ACEOF
15374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015376
Matthias Kloseb9621712010-04-24 17:59:49 +000015377$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015378
15379fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015380rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015381
15382fi
15383
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15385$as_echo_n "checking for append_history in -lreadline... " >&6; }
15386if ${ac_cv_lib_readline_append_history+:} false; then :
15387 $as_echo_n "(cached) " >&6
15388else
15389 ac_check_lib_save_LIBS=$LIBS
15390LIBS="-lreadline $READLINE_LIBS $LIBS"
15391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15392/* end confdefs.h. */
15393
15394/* Override any GCC internal prototype to avoid an error.
15395 Use char because int might match the return type of a GCC
15396 builtin and then its argument prototype would still apply. */
15397#ifdef __cplusplus
15398extern "C"
15399#endif
15400char append_history ();
15401int
15402main ()
15403{
15404return append_history ();
15405 ;
15406 return 0;
15407}
15408_ACEOF
15409if ac_fn_c_try_link "$LINENO"; then :
15410 ac_cv_lib_readline_append_history=yes
15411else
15412 ac_cv_lib_readline_append_history=no
15413fi
15414rm -f core conftest.err conftest.$ac_objext \
15415 conftest$ac_exeext conftest.$ac_ext
15416LIBS=$ac_check_lib_save_LIBS
15417fi
15418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15419$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15420if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15421
15422$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15423
15424fi
15425
15426
Martin v. Löwis82bca632006-02-10 20:49:30 +000015427# End of readline checks: restore LIBS
15428LIBS=$LIBS_no_readline
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15431$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015432if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015434else
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
Matthias Kloseb9621712010-04-24 17:59:49 +000015436if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015437 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015438else
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015440/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015441
15442int main()
15443{
15444 int val1 = nice(1);
15445 if (val1 != -1 && val1 == nice(2))
15446 exit(0);
15447 exit(1);
15448}
15449
Martin v. Löwis11437992002-04-12 09:54:03 +000015450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015451if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015452 ac_cv_broken_nice=yes
15453else
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15457 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015458fi
15459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460fi
15461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15463$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015464if test "$ac_cv_broken_nice" = yes
15465then
Martin v. Löwis11437992002-04-12 09:54:03 +000015466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015468
15469fi
15470
Matthias Kloseb9621712010-04-24 17:59:49 +000015471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15472$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015473if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015474 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015475else
Matthias Kloseb9621712010-04-24 17:59:49 +000015476 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015477 ac_cv_broken_poll=no
15478else
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015480/* end confdefs.h. */
15481
15482#include <poll.h>
15483
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015484int main()
15485{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015486 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015487 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015488
15489 close (42);
15490
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015491 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015492 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015493 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015494 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015495 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015496 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015497 return 1;
15498}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015499
15500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015501if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015502 ac_cv_broken_poll=yes
15503else
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015510fi
15511
Matthias Kloseb9621712010-04-24 17:59:49 +000015512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15513$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015514if test "$ac_cv_broken_poll" = yes
15515then
15516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015518
15519fi
15520
Brett Cannon43802422005-02-10 20:48:03 +000015521# 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 +000015522# (which is not required by ISO C or UNIX spec) and/or if we support
15523# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015524ac_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 +000015525#include <$ac_cv_struct_tm>
15526
Matthias Kloseb9621712010-04-24 17:59:49 +000015527"
Victor Stinnere0be4232011-10-25 13:06:09 +020015528if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015529
15530cat >>confdefs.h <<_ACEOF
15531#define HAVE_STRUCT_TM_TM_ZONE 1
15532_ACEOF
15533
15534
15535fi
15536
15537if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015540
15541else
Matthias Kloseb9621712010-04-24 17:59:49 +000015542 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15543"
Victor Stinnere0be4232011-10-25 13:06:09 +020015544if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546else
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548fi
15549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015551#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015552_ACEOF
15553
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15555$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015556if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558else
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015560/* end confdefs.h. */
15561#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562#if !HAVE_DECL_TZNAME
15563extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015564#endif
15565
15566int
15567main ()
15568{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015570 ;
15571 return 0;
15572}
15573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015574if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015575 ac_cv_var_tzname=yes
15576else
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015579rm -f core conftest.err conftest.$ac_objext \
15580 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15583$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015584 if test $ac_cv_var_tzname = yes; then
15585
Matthias Kloseb9621712010-04-24 17:59:49 +000015586$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015587
15588 fi
15589fi
15590
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015591
Martin v. Löwis1d459062005-03-14 21:23:33 +000015592# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15594$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015595if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015596 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015597else
15598
Matthias Kloseb9621712010-04-24 17:59:49 +000015599if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015600 ac_cv_working_tzset=no
15601else
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015603/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015604
15605#include <stdlib.h>
15606#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015607#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015608
15609#if HAVE_TZNAME
15610extern char *tzname[];
15611#endif
15612
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015613int main()
15614{
Brett Cannon18367812003-09-19 00:59:16 +000015615 /* Note that we need to ensure that not only does tzset(3)
15616 do 'something' with localtime, but it works as documented
15617 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015618 This includes making sure that tzname is set properly if
15619 tm->tm_zone does not exist since it is the alternative way
15620 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015621
15622 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015623 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015624 */
15625
Martin v. Löwis1d459062005-03-14 21:23:33 +000015626 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015627 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15628
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015629 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015630 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015631 if (localtime(&groundhogday)->tm_hour != 0)
15632 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015633#if HAVE_TZNAME
15634 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15635 if (strcmp(tzname[0], "UTC") ||
15636 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15637 exit(1);
15638#endif
Brett Cannon18367812003-09-19 00:59:16 +000015639
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015640 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015641 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015642 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015643 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015644#if HAVE_TZNAME
15645 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15646 exit(1);
15647#endif
Brett Cannon18367812003-09-19 00:59:16 +000015648
15649 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15650 tzset();
15651 if (localtime(&groundhogday)->tm_hour != 11)
15652 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015653#if HAVE_TZNAME
15654 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15655 exit(1);
15656#endif
15657
15658#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015659 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15660 exit(1);
15661 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15662 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015663#endif
Brett Cannon18367812003-09-19 00:59:16 +000015664
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015665 exit(0);
15666}
15667
15668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015669if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015670 ac_cv_working_tzset=yes
15671else
Matthias Kloseb9621712010-04-24 17:59:49 +000015672 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015674rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15675 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015676fi
15677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678fi
15679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15681$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015682if test "$ac_cv_working_tzset" = yes
15683then
15684
Matthias Kloseb9621712010-04-24 17:59:49 +000015685$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015686
15687fi
15688
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015689# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15691$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015692if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +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. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015697#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015698int
15699main ()
15700{
15701
15702struct stat st;
15703st.st_mtim.tv_nsec = 1;
15704
15705 ;
15706 return 0;
15707}
15708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015710 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015711else
Matthias Kloseb9621712010-04-24 17:59:49 +000015712 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15715fi
15716
Matthias Kloseb9621712010-04-24 17:59:49 +000015717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15718$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015719if test "$ac_cv_stat_tv_nsec" = yes
15720then
15721
Matthias Kloseb9621712010-04-24 17:59:49 +000015722$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015723
15724fi
15725
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015726# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15728$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015729if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015733/* end confdefs.h. */
15734#include <sys/stat.h>
15735int
15736main ()
15737{
15738
15739struct stat st;
15740st.st_mtimespec.tv_nsec = 1;
15741
15742 ;
15743 return 0;
15744}
15745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015746if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015747 ac_cv_stat_tv_nsec2=yes
15748else
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15752fi
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15755$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015756if test "$ac_cv_stat_tv_nsec2" = yes
15757then
15758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015760
15761fi
15762
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015763# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015764ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015765if test "$cross_compiling" = no; then
15766 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15767fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015768
15769for ac_header in curses.h ncurses.h
15770do :
15771 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15772ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15773if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15774 cat >>confdefs.h <<_ACEOF
15775#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15776_ACEOF
15777
15778fi
15779
15780done
15781
15782
15783# On Solaris, term.h requires curses.h
15784for ac_header in term.h
15785do :
15786 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15787#ifdef HAVE_CURSES_H
15788#include <curses.h>
15789#endif
15790
15791"
15792if test "x$ac_cv_header_term_h" = xyes; then :
15793 cat >>confdefs.h <<_ACEOF
15794#define HAVE_TERM_H 1
15795_ACEOF
15796
15797fi
15798
15799done
15800
15801
Jack Jansen666b1e72001-10-31 12:11:48 +000015802# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15804$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015805if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015807else
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015809/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015810#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015811int
15812main ()
15813{
Jack Jansen666b1e72001-10-31 12:11:48 +000015814
15815 int rtn;
15816 rtn = mvwdelch(0,0,0);
15817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818 ;
15819 return 0;
15820}
15821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015822if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015823 ac_cv_mvwdelch_is_expression=yes
15824else
Matthias Kloseb9621712010-04-24 17:59:49 +000015825 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15828fi
15829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15831$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015832
15833if test "$ac_cv_mvwdelch_is_expression" = yes
15834then
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
Matthias Kloseb9621712010-04-24 17:59:49 +000015836$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015837
15838fi
15839
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015840# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15841# structs since version 5.7. If the macro is defined as zero before including
15842# [n]curses.h, ncurses will expose fields of the structs regardless of the
15843# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15845$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015846if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015847 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015848else
Matthias Kloseb9621712010-04-24 17:59:49 +000015849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015850/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015851
15852 #define NCURSES_OPAQUE 0
15853 #include <curses.h>
15854
Martin v. Löwis11437992002-04-12 09:54:03 +000015855int
15856main ()
15857{
Jack Jansen666b1e72001-10-31 12:11:48 +000015858
15859 WINDOW *w;
15860 w->_flags = 0;
15861
Martin v. Löwis11437992002-04-12 09:54:03 +000015862 ;
15863 return 0;
15864}
15865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015866if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015867 ac_cv_window_has_flags=yes
15868else
Matthias Kloseb9621712010-04-24 17:59:49 +000015869 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15872fi
15873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15875$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015876
Jack Jansen666b1e72001-10-31 12:11:48 +000015877
15878if test "$ac_cv_window_has_flags" = yes
15879then
Martin v. Löwis11437992002-04-12 09:54:03 +000015880
Matthias Kloseb9621712010-04-24 17:59:49 +000015881$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015882
15883fi
15884
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15886$as_echo_n "checking for is_pad... " >&6; }
15887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15888/* end confdefs.h. */
15889#include <curses.h>
15890int
15891main ()
15892{
15893
15894#ifndef is_pad
15895void *x=is_pad
15896#endif
15897
15898 ;
15899 return 0;
15900}
15901_ACEOF
15902if ac_fn_c_try_compile "$LINENO"; then :
15903
15904$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15905
15906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15907$as_echo "yes" >&6; }
15908else
15909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15910$as_echo "no" >&6; }
15911
15912fi
15913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15916$as_echo_n "checking for is_term_resized... " >&6; }
15917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015918/* end confdefs.h. */
15919#include <curses.h>
15920int
15921main ()
15922{
15923void *x=is_term_resized
15924 ;
15925 return 0;
15926}
15927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015929
Matthias Kloseb9621712010-04-24 17:59:49 +000015930$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015931
Matthias Kloseb159a552010-04-25 21:00:44 +000015932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015933$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015934else
Matthias Kloseb9621712010-04-24 17:59:49 +000015935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15936$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015937
15938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15942$as_echo_n "checking for resize_term... " >&6; }
15943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015944/* end confdefs.h. */
15945#include <curses.h>
15946int
15947main ()
15948{
15949void *x=resize_term
15950 ;
15951 return 0;
15952}
15953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015954if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015955
Matthias Kloseb9621712010-04-24 17:59:49 +000015956$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015957
Matthias Kloseb159a552010-04-25 21:00:44 +000015958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015959$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015960else
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15962$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015963
15964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15968$as_echo_n "checking for resizeterm... " >&6; }
15969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015970/* end confdefs.h. */
15971#include <curses.h>
15972int
15973main ()
15974{
15975void *x=resizeterm
15976 ;
15977 return 0;
15978}
15979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015980if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015983
Matthias Kloseb159a552010-04-25 21:00:44 +000015984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015985$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015986else
Matthias Kloseb9621712010-04-24 17:59:49 +000015987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15988$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015989
15990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015992
15993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15994$as_echo_n "checking for immedok... " >&6; }
15995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15996/* end confdefs.h. */
15997#include <curses.h>
15998int
15999main ()
16000{
16001
16002#ifndef immedok
16003void *x=immedok
16004#endif
16005
16006 ;
16007 return 0;
16008}
16009_ACEOF
16010if ac_fn_c_try_compile "$LINENO"; then :
16011
16012$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16013
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16015$as_echo "yes" >&6; }
16016else
16017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16018$as_echo "no" >&6; }
16019
16020fi
16021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16022
16023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16024$as_echo_n "checking for syncok... " >&6; }
16025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16026/* end confdefs.h. */
16027#include <curses.h>
16028int
16029main ()
16030{
16031
16032#ifndef syncok
16033void *x=syncok
16034#endif
16035
16036 ;
16037 return 0;
16038}
16039_ACEOF
16040if ac_fn_c_try_compile "$LINENO"; then :
16041
16042$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16043
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16045$as_echo "yes" >&6; }
16046else
16047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16048$as_echo "no" >&6; }
16049
16050fi
16051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16052
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16054$as_echo_n "checking for wchgat... " >&6; }
16055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16056/* end confdefs.h. */
16057#include <curses.h>
16058int
16059main ()
16060{
16061
16062#ifndef wchgat
16063void *x=wchgat
16064#endif
16065
16066 ;
16067 return 0;
16068}
16069_ACEOF
16070if ac_fn_c_try_compile "$LINENO"; then :
16071
16072$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16073
16074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16075$as_echo "yes" >&6; }
16076else
16077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16078$as_echo "no" >&6; }
16079
16080fi
16081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16082
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16084$as_echo_n "checking for filter... " >&6; }
16085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16086/* end confdefs.h. */
16087#include <curses.h>
16088int
16089main ()
16090{
16091
16092#ifndef filter
16093void *x=filter
16094#endif
16095
16096 ;
16097 return 0;
16098}
16099_ACEOF
16100if ac_fn_c_try_compile "$LINENO"; then :
16101
16102$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16103
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16105$as_echo "yes" >&6; }
16106else
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16108$as_echo "no" >&6; }
16109
16110fi
16111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16112
16113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16114$as_echo_n "checking for has_key... " >&6; }
16115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16116/* end confdefs.h. */
16117#include <curses.h>
16118int
16119main ()
16120{
16121
16122#ifndef has_key
16123void *x=has_key
16124#endif
16125
16126 ;
16127 return 0;
16128}
16129_ACEOF
16130if ac_fn_c_try_compile "$LINENO"; then :
16131
16132$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16133
16134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16135$as_echo "yes" >&6; }
16136else
16137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16138$as_echo "no" >&6; }
16139
16140fi
16141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16142
16143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16144$as_echo_n "checking for typeahead... " >&6; }
16145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16146/* end confdefs.h. */
16147#include <curses.h>
16148int
16149main ()
16150{
16151
16152#ifndef typeahead
16153void *x=typeahead
16154#endif
16155
16156 ;
16157 return 0;
16158}
16159_ACEOF
16160if ac_fn_c_try_compile "$LINENO"; then :
16161
16162$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16163
16164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16165$as_echo "yes" >&6; }
16166else
16167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16168$as_echo "no" >&6; }
16169
16170fi
16171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16172
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16174$as_echo_n "checking for use_env... " >&6; }
16175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176/* end confdefs.h. */
16177#include <curses.h>
16178int
16179main ()
16180{
16181
16182#ifndef use_env
16183void *x=use_env
16184#endif
16185
16186 ;
16187 return 0;
16188}
16189_ACEOF
16190if ac_fn_c_try_compile "$LINENO"; then :
16191
16192$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16193
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16195$as_echo "yes" >&6; }
16196else
16197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16198$as_echo "no" >&6; }
16199
16200fi
16201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016202# last curses configure check
16203CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16206$as_echo "$as_me: checking for device files" >&6;}
16207
16208if test "x$cross_compiling" = xyes; then
16209 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16211$as_echo_n "checking for /dev/ptmx... " >&6; }
16212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16213$as_echo "not set" >&6; }
16214 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16215 fi
16216 if test "${ac_cv_file__dev_ptc+set}" != set; then
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16218$as_echo_n "checking for /dev/ptc... " >&6; }
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16220$as_echo "not set" >&6; }
16221 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16222 fi
16223fi
16224
Matthias Kloseb9621712010-04-24 17:59:49 +000016225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16226$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016227if ${ac_cv_file__dev_ptmx+:} false; then :
16228 $as_echo_n "(cached) " >&6
16229else
16230 test "$cross_compiling" = yes &&
16231 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16232if test -r "/dev/ptmx"; then
16233 ac_cv_file__dev_ptmx=yes
16234else
16235 ac_cv_file__dev_ptmx=no
16236fi
16237fi
16238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16239$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16240if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016241
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016242fi
16243
16244if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016245
Matthias Kloseb9621712010-04-24 17:59:49 +000016246$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016247
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16250$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016251if ${ac_cv_file__dev_ptc+:} false; then :
16252 $as_echo_n "(cached) " >&6
16253else
16254 test "$cross_compiling" = yes &&
16255 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16256if test -r "/dev/ptc"; then
16257 ac_cv_file__dev_ptc=yes
16258else
16259 ac_cv_file__dev_ptc=no
16260fi
16261fi
16262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16263$as_echo "$ac_cv_file__dev_ptc" >&6; }
16264if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016265
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016266fi
16267
16268if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016269
Matthias Kloseb9621712010-04-24 17:59:49 +000016270$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016271
Neal Norwitz865400f2003-03-21 01:42:58 +000016272fi
16273
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016274if test $ac_sys_system = Darwin
16275then
16276 LIBS="$LIBS -framework CoreFoundation"
16277fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016278
Matthias Kloseb9621712010-04-24 17:59:49 +000016279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16280$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016281if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016282 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016283else
Matthias Kloseb9621712010-04-24 17:59:49 +000016284 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016285 ac_cv_have_size_t_format="cross -- assuming yes"
16286
Thomas Wouters477c8d52006-05-27 19:21:47 +000016287else
Matthias Kloseb9621712010-04-24 17:59:49 +000016288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016289/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016290
Thomas Wouters477c8d52006-05-27 19:21:47 +000016291#include <stdio.h>
16292#include <stddef.h>
16293#include <string.h>
16294
Christian Heimes2c181612007-12-17 20:04:13 +000016295#ifdef HAVE_SYS_TYPES_H
16296#include <sys/types.h>
16297#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016298
16299#ifdef HAVE_SSIZE_T
16300typedef ssize_t Py_ssize_t;
16301#elif SIZEOF_VOID_P == SIZEOF_LONG
16302typedef long Py_ssize_t;
16303#else
16304typedef int Py_ssize_t;
16305#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016306
Christian Heimes2c181612007-12-17 20:04:13 +000016307int main()
16308{
16309 char buffer[256];
16310
Thomas Wouters477c8d52006-05-27 19:21:47 +000016311 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16312 return 1;
16313
Thomas Wouters89f507f2006-12-13 04:49:30 +000016314 if (strcmp(buffer, "123"))
16315 return 1;
16316
16317 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16318 return 1;
16319
16320 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016321 return 1;
16322
16323 return 0;
16324}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016325
Thomas Wouters477c8d52006-05-27 19:21:47 +000016326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016327if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016328 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016329else
Matthias Kloseb9621712010-04-24 17:59:49 +000016330 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16333 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016334fi
16335
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16338$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016339if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016340
Matthias Kloseb9621712010-04-24 17:59:49 +000016341$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016342
16343fi
16344
Matthias Kloseb9621712010-04-24 17:59:49 +000016345ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016346#ifdef HAVE_SYS_TYPES_H
16347#include <sys/types.h>
16348#endif
16349#ifdef HAVE_SYS_SOCKET_H
16350#include <sys/socket.h>
16351#endif
16352
Matthias Kloseb9621712010-04-24 17:59:49 +000016353"
Victor Stinnere0be4232011-10-25 13:06:09 +020016354if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016355
Martin v. Löwis11437992002-04-12 09:54:03 +000016356else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016357
Matthias Kloseb9621712010-04-24 17:59:49 +000016358$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016359
16360fi
16361
Michael W. Hudson54241132001-12-07 15:38:26 +000016362
Matthias Kloseb9621712010-04-24 17:59:49 +000016363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16364$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016365if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016366 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016367else
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016369 ac_cv_broken_mbstowcs=no
16370else
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016372/* end confdefs.h. */
16373
Stefan Krah19c21392012-11-22 23:47:32 +010016374#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016375#include<stdlib.h>
16376int main() {
16377 size_t len = -1;
16378 const char *str = "text";
16379 len = mbstowcs(NULL, str, 0);
16380 return (len != 4);
16381}
16382
16383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016384if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016385 ac_cv_broken_mbstowcs=no
16386else
Matthias Kloseb9621712010-04-24 17:59:49 +000016387 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016391fi
16392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016393fi
16394
Matthias Kloseb9621712010-04-24 17:59:49 +000016395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16396$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016397if test "$ac_cv_broken_mbstowcs" = yes
16398then
16399
Matthias Kloseb9621712010-04-24 17:59:49 +000016400$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016401
16402fi
16403
Antoine Pitroub52ec782009-01-25 16:34:23 +000016404# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16406$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016407
16408# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016409if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016410 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016411if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016412then
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016415
Matthias Kloseb9621712010-04-24 17:59:49 +000016416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16417$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016418fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016419if test "$withval" = no
16420then
16421
16422$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16423
Matthias Kloseb9621712010-04-24 17:59:49 +000016424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16425$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016426fi
16427
Antoine Pitrou042b1282010-08-13 21:15:58 +000016428else
16429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16430$as_echo "no value specified" >&6; }
16431fi
16432
Antoine Pitroub52ec782009-01-25 16:34:23 +000016433
Matthias Kloseb17289e2012-03-15 19:51:34 +010016434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16435$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16436if ${ac_cv_computed_gotos+:} false; then :
16437 $as_echo_n "(cached) " >&6
16438else
16439 if test "$cross_compiling" = yes; then :
16440 if test "${with_computed_gotos+set}" = set; then
16441 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16442 else
16443 ac_cv_computed_gotos=no
16444 fi
16445else
16446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16447/* end confdefs.h. */
16448
16449int main(int argc, char **argv)
16450{
16451 static void *targets[1] = { &&LABEL1 };
16452 goto LABEL2;
16453LABEL1:
16454 return 0;
16455LABEL2:
16456 goto *targets[0];
16457 return 1;
16458}
16459
16460_ACEOF
16461if ac_fn_c_try_run "$LINENO"; then :
16462 ac_cv_computed_gotos=yes
16463else
16464 ac_cv_computed_gotos=no
16465fi
16466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16467 conftest.$ac_objext conftest.beam conftest.$ac_ext
16468fi
16469
16470fi
16471
16472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16473$as_echo "$ac_cv_computed_gotos" >&6; }
16474case "$ac_cv_computed_gotos" in yes*)
16475
16476$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16477
16478esac
16479
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016480case $ac_sys_system in
16481AIX*)
16482
16483$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16484 ;;
16485esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016486
Michael W. Hudson54241132001-12-07 15:38:26 +000016487
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016488
16489
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016490for h in `(cd $srcdir;echo Python/thread_*.h)`
16491do
16492 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16493done
16494
Michael W. Hudson54241132001-12-07 15:38:26 +000016495
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016496SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16498$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016499for dir in $SRCDIRS; do
16500 if test ! -d $dir; then
16501 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016502 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016503done
Matthias Kloseb9621712010-04-24 17:59:49 +000016504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16505$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016506
Stefan Krah1919b7e2012-03-21 18:25:23 +010016507# Availability of -O2:
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16509$as_echo_n "checking for -O2... " >&6; }
16510saved_cflags="$CFLAGS"
16511CFLAGS="-O2"
16512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16513/* end confdefs.h. */
16514
16515int
16516main ()
16517{
16518
16519
16520 ;
16521 return 0;
16522}
16523_ACEOF
16524if ac_fn_c_try_compile "$LINENO"; then :
16525 have_O2=yes
16526else
16527 have_O2=no
16528fi
16529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16531$as_echo "$have_O2" >&6; }
16532CFLAGS="$saved_cflags"
16533
16534# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16535# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16537$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16538saved_cflags="$CFLAGS"
16539CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16540if test "$have_O2" = no; then
16541 CFLAGS=""
16542fi
16543if test "$cross_compiling" = yes; then :
16544 have_glibc_memmove_bug=undefined
16545else
16546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16547/* end confdefs.h. */
16548
16549#include <stdio.h>
16550#include <stdlib.h>
16551#include <string.h>
16552void foo(void *p, void *q) { memmove(p, q, 19); }
16553int main() {
16554 char a[32] = "123456789000000000";
16555 foo(&a[9], a);
16556 if (strcmp(a, "123456789123456789000000000") != 0)
16557 return 1;
16558 foo(a, &a[9]);
16559 if (strcmp(a, "123456789000000000") != 0)
16560 return 1;
16561 return 0;
16562}
16563
16564_ACEOF
16565if ac_fn_c_try_run "$LINENO"; then :
16566 have_glibc_memmove_bug=no
16567else
16568 have_glibc_memmove_bug=yes
16569fi
16570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16571 conftest.$ac_objext conftest.beam conftest.$ac_ext
16572fi
16573
16574CFLAGS="$saved_cflags"
16575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16576$as_echo "$have_glibc_memmove_bug" >&6; }
16577if test "$have_glibc_memmove_bug" = yes; then
16578
16579$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16580
16581fi
16582
16583if test "$have_gcc_asm_for_x87" = yes; then
16584 # Some versions of gcc miscompile inline asm:
16585 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16586 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16587 case $CC in
16588 *gcc*)
16589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16590$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16591 saved_cflags="$CFLAGS"
16592 CFLAGS="-O2"
16593 if test "$cross_compiling" = yes; then :
16594 have_ipa_pure_const_bug=undefined
16595else
16596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16597/* end confdefs.h. */
16598
16599 __attribute__((noinline)) int
16600 foo(int *p) {
16601 int r;
16602 asm ( "movl \$6, (%1)\n\t"
16603 "xorl %0, %0\n\t"
16604 : "=r" (r) : "r" (p) : "memory"
16605 );
16606 return r;
16607 }
16608 int main() {
16609 int p = 8;
16610 if ((foo(&p) ? : p) != 6)
16611 return 1;
16612 return 0;
16613 }
16614
16615_ACEOF
16616if ac_fn_c_try_run "$LINENO"; then :
16617 have_ipa_pure_const_bug=no
16618else
16619 have_ipa_pure_const_bug=yes
16620fi
16621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16622 conftest.$ac_objext conftest.beam conftest.$ac_ext
16623fi
16624
16625 CFLAGS="$saved_cflags"
16626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16627$as_echo "$have_ipa_pure_const_bug" >&6; }
16628 if test "$have_ipa_pure_const_bug" = yes; then
16629
16630$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16631
16632 fi
16633 ;;
16634 esac
16635fi
16636
Victor Stinner4f5366e2015-01-09 02:13:19 +010016637# Check for stdatomic.h
16638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16639$as_echo_n "checking for stdatomic.h... " >&6; }
16640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16641/* end confdefs.h. */
16642
16643
16644 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016645 atomic_int value = ATOMIC_VAR_INIT(1);
16646 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016647 int main() {
16648 int loaded_value = atomic_load(&value);
16649 return 0;
16650 }
16651
16652
16653_ACEOF
16654if ac_fn_c_try_link "$LINENO"; then :
16655 have_stdatomic_h=yes
16656else
16657 have_stdatomic_h=no
16658fi
16659rm -f core conftest.err conftest.$ac_objext \
16660 conftest$ac_exeext conftest.$ac_ext
16661
16662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16663$as_echo "$have_stdatomic_h" >&6; }
16664
16665if test "$have_stdatomic_h" = yes; then
16666
16667$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16668
16669fi
16670
16671# Check for GCC >= 4.7 __atomic builtins
16672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16673$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16675/* end confdefs.h. */
16676
16677
16678 volatile int val = 1;
16679 int main() {
16680 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16681 return 0;
16682 }
16683
16684
16685_ACEOF
16686if ac_fn_c_try_link "$LINENO"; then :
16687 have_builtin_atomic=yes
16688else
16689 have_builtin_atomic=no
16690fi
16691rm -f core conftest.err conftest.$ac_objext \
16692 conftest$ac_exeext conftest.$ac_ext
16693
16694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16695$as_echo "$have_builtin_atomic" >&6; }
16696
16697if test "$have_builtin_atomic" = yes; then
16698
16699$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16700
16701fi
16702
Ned Deily322f5ba2013-11-21 23:01:59 -080016703# ensurepip option
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16705$as_echo_n "checking for ensurepip... " >&6; }
16706
16707# Check whether --with-ensurepip was given.
16708if test "${with_ensurepip+set}" = set; then :
16709 withval=$with_ensurepip;
16710else
16711 with_ensurepip=upgrade
16712fi
16713
16714case $with_ensurepip in #(
16715 yes|upgrade) :
16716 ENSUREPIP=upgrade ;; #(
16717 install) :
16718 ENSUREPIP=install ;; #(
16719 no) :
16720 ENSUREPIP=no ;; #(
16721 *) :
16722 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16723esac
16724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16725$as_echo "$ENSUREPIP" >&6; }
16726
16727
Victor Stinner35a97c02015-03-08 02:59:09 +010016728# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16730$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16732/* end confdefs.h. */
16733
16734
16735 #include <dirent.h>
16736
16737 int main() {
16738 struct dirent entry;
16739 return entry.d_type == DT_UNKNOWN;
16740 }
16741
16742
16743_ACEOF
16744if ac_fn_c_try_link "$LINENO"; then :
16745 have_dirent_d_type=yes
16746else
16747 have_dirent_d_type=no
16748fi
16749rm -f core conftest.err conftest.$ac_objext \
16750 conftest$ac_exeext conftest.$ac_ext
16751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16752$as_echo "$have_dirent_d_type" >&6; }
16753
16754if test "$have_dirent_d_type" = yes; then
16755
16756$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16757
16758fi
16759
Victor Stinner9eb57c52015-03-19 22:21:49 +010016760# check if the Linux getrandom() syscall is available
16761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16762$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16764/* end confdefs.h. */
16765
16766
Victor Stinner1b80b242016-04-12 22:34:58 +020016767 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016768 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016769 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016770
16771 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016772 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016773 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016774 const int flags = GRND_NONBLOCK;
16775 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016776 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016777 return 0;
16778 }
16779
16780
16781_ACEOF
16782if ac_fn_c_try_link "$LINENO"; then :
16783 have_getrandom_syscall=yes
16784else
16785 have_getrandom_syscall=no
16786fi
16787rm -f core conftest.err conftest.$ac_objext \
16788 conftest$ac_exeext conftest.$ac_ext
16789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16790$as_echo "$have_getrandom_syscall" >&6; }
16791
16792if test "$have_getrandom_syscall" = yes; then
16793
16794$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16795
16796fi
16797
Victor Stinner3abf44e2015-09-18 15:38:37 +020016798# check if the getrandom() function is available
16799# the test was written for the Solaris function of <sys/random.h>
16800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16801$as_echo_n "checking for the getrandom() function... " >&6; }
16802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16803/* end confdefs.h. */
16804
16805
16806 #include <sys/random.h>
16807
16808 int main() {
16809 char buffer[1];
16810 const size_t buflen = sizeof(buffer);
16811 const int flags = 0;
16812 /* ignore the result, Python checks for ENOSYS at runtime */
16813 (void)getrandom(buffer, buflen, flags);
16814 return 0;
16815 }
16816
16817
16818_ACEOF
16819if ac_fn_c_try_link "$LINENO"; then :
16820 have_getrandom=yes
16821else
16822 have_getrandom=no
16823fi
16824rm -f core conftest.err conftest.$ac_objext \
16825 conftest$ac_exeext conftest.$ac_ext
16826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16827$as_echo "$have_getrandom" >&6; }
16828
16829if test "$have_getrandom" = yes; then
16830
16831$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16832
16833fi
16834
Christian Heimesff5be6e2018-01-20 13:19:21 +010016835# Check for usable OpenSSL
16836
16837 found=false
16838
16839# Check whether --with-openssl was given.
16840if test "${with_openssl+set}" = set; then :
16841 withval=$with_openssl;
16842 case "$withval" in
16843 "" | y | ye | yes | n | no)
16844 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16845 ;;
16846 *) ssldirs="$withval"
16847 ;;
16848 esac
16849
16850else
16851
16852 # if pkg-config is installed and openssl has installed a .pc file,
16853 # then use that information and don't search ssldirs
16854 if test -n "$ac_tool_prefix"; then
16855 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16856set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16858$as_echo_n "checking for $ac_word... " >&6; }
16859if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16860 $as_echo_n "(cached) " >&6
16861else
16862 if test -n "$PKG_CONFIG"; then
16863 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16864else
16865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16866for as_dir in $PATH
16867do
16868 IFS=$as_save_IFS
16869 test -z "$as_dir" && as_dir=.
16870 for ac_exec_ext in '' $ac_executable_extensions; do
16871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16872 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16874 break 2
16875 fi
16876done
16877 done
16878IFS=$as_save_IFS
16879
16880fi
16881fi
16882PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16883if test -n "$PKG_CONFIG"; then
16884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16885$as_echo "$PKG_CONFIG" >&6; }
16886else
16887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16888$as_echo "no" >&6; }
16889fi
16890
16891
16892fi
16893if test -z "$ac_cv_prog_PKG_CONFIG"; then
16894 ac_ct_PKG_CONFIG=$PKG_CONFIG
16895 # Extract the first word of "pkg-config", so it can be a program name with args.
16896set dummy pkg-config; ac_word=$2
16897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16898$as_echo_n "checking for $ac_word... " >&6; }
16899if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16900 $as_echo_n "(cached) " >&6
16901else
16902 if test -n "$ac_ct_PKG_CONFIG"; then
16903 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16904else
16905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16906for as_dir in $PATH
16907do
16908 IFS=$as_save_IFS
16909 test -z "$as_dir" && as_dir=.
16910 for ac_exec_ext in '' $ac_executable_extensions; do
16911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16912 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16914 break 2
16915 fi
16916done
16917 done
16918IFS=$as_save_IFS
16919
16920fi
16921fi
16922ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16923if test -n "$ac_ct_PKG_CONFIG"; then
16924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16925$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16926else
16927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16928$as_echo "no" >&6; }
16929fi
16930
16931 if test "x$ac_ct_PKG_CONFIG" = x; then
16932 PKG_CONFIG=""
16933 else
16934 case $cross_compiling:$ac_tool_warned in
16935yes:)
16936{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16937$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16938ac_tool_warned=yes ;;
16939esac
16940 PKG_CONFIG=$ac_ct_PKG_CONFIG
16941 fi
16942else
16943 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16944fi
16945
16946 if test x"$PKG_CONFIG" != x""; then
16947 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16948 if test $? = 0; then
16949 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16950 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16951 found=true
16952 fi
16953 fi
16954
16955 # no such luck; use some default ssldirs
16956 if ! $found; then
16957 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16958 fi
16959
16960
16961fi
16962
16963
16964
16965 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16966 # an 'openssl' subdirectory
16967
16968 if ! $found; then
16969 OPENSSL_INCLUDES=
16970 for ssldir in $ssldirs; do
16971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16972$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16973 if test -f "$ssldir/include/openssl/ssl.h"; then
16974 OPENSSL_INCLUDES="-I$ssldir/include"
16975 OPENSSL_LDFLAGS="-L$ssldir/lib"
16976 OPENSSL_LIBS="-lssl -lcrypto"
16977 found=true
16978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16979$as_echo "yes" >&6; }
16980 break
16981 else
16982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16983$as_echo "no" >&6; }
16984 fi
16985 done
16986
16987 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16988 # it will just work!
16989 fi
16990
16991 # try the preprocessor and linker with our new flags,
16992 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16993
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16995$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16996 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16997 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16998
16999 save_LIBS="$LIBS"
17000 save_LDFLAGS="$LDFLAGS"
17001 save_CPPFLAGS="$CPPFLAGS"
17002 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17003 LIBS="$OPENSSL_LIBS $LIBS"
17004 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17006/* end confdefs.h. */
17007#include <openssl/ssl.h>
17008int
17009main ()
17010{
17011SSL_new(NULL)
17012 ;
17013 return 0;
17014}
17015_ACEOF
17016if ac_fn_c_try_link "$LINENO"; then :
17017
17018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17019$as_echo "yes" >&6; }
17020 have_openssl=yes
17021
17022else
17023
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17025$as_echo "no" >&6; }
17026 have_openssl=no
17027
17028fi
17029rm -f core conftest.err conftest.$ac_objext \
17030 conftest$ac_exeext conftest.$ac_ext
17031 CPPFLAGS="$save_CPPFLAGS"
17032 LDFLAGS="$save_LDFLAGS"
17033 LIBS="$save_LIBS"
17034
17035
17036
17037
17038
17039
17040if test "$have_openssl" = yes; then
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17042$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17043
17044 save_LIBS="$LIBS"
17045 save_LDFLAGS="$LDFLAGS"
17046 save_CPPFLAGS="$CPPFLAGS"
17047 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17048 LIBS="$OPENSSL_LIBS $LIBS"
17049 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17050
17051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17052/* end confdefs.h. */
17053
17054 #include <openssl/x509_vfy.h>
17055
17056int
17057main ()
17058{
17059
17060 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17061 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17062 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17063 X509_VERIFY_PARAM_set_hostflags(p, 0);
17064
17065 ;
17066 return 0;
17067}
17068
17069_ACEOF
17070if ac_fn_c_try_link "$LINENO"; then :
17071
17072 ac_cv_has_x509_verify_param_set1_host=yes
17073
17074else
17075
17076 ac_cv_has_x509_verify_param_set1_host=no
17077
17078fi
17079rm -f core conftest.err conftest.$ac_objext \
17080 conftest$ac_exeext conftest.$ac_ext
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17082$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17083 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17084
17085$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17086
17087 fi
17088
17089 CPPFLAGS="$save_CPPFLAGS"
17090 LDFLAGS="$save_LDFLAGS"
17091 LIBS="$save_LIBS"
17092fi
17093
Christian Heimes892d66e2018-01-29 14:10:18 +010017094# ssl module default cipher suite string
17095
17096
17097
17098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17099$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17100
17101# Check whether --with-ssl-default-suites was given.
17102if test "${with_ssl_default_suites+set}" = set; then :
17103 withval=$with_ssl_default_suites;
17104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17105$as_echo "$withval" >&6; }
17106case "$withval" in
17107 python)
17108 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17109
17110 ;;
17111 openssl)
17112 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17113
17114 ;;
17115 *)
17116 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17117
17118 cat >>confdefs.h <<_ACEOF
17119#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17120_ACEOF
17121
17122 ;;
17123esac
17124
17125else
17126
17127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17128$as_echo "python" >&6; }
17129$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17130
17131
17132fi
17133
17134
17135
Guido van Rossum627b2d71993-12-24 10:39:16 +000017136# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017137ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017138
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017139ac_config_files="$ac_config_files Modules/ld_so_aix"
17140
Martin v. Löwis11437992002-04-12 09:54:03 +000017141cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017142# This file is a shell script that caches the results of configure
17143# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017144# scripts and configure runs, see configure's option --config-cache.
17145# It is not useful on other systems. If it contains results you don't
17146# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017147#
Martin v. Löwis11437992002-04-12 09:54:03 +000017148# config.status only pays attention to the cache file if you give it
17149# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017150#
Skip Montanaro6dead952003-09-25 14:50:04 +000017151# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017152# loading this file, other *unset* `ac_cv_foo' will be assigned the
17153# following values.
17154
17155_ACEOF
17156
Guido van Rossumf78abae1997-01-21 22:02:36 +000017157# The following way of writing the cache mishandles newlines in values,
17158# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017159# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017160# Ultrix sh set writes to stderr and can't be redirected directly,
17161# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162(
17163 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17164 eval ac_val=\$$ac_var
17165 case $ac_val in #(
17166 *${as_nl}*)
17167 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017168 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17169$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017170 esac
17171 case $ac_var in #(
17172 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017173 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17174 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175 esac ;;
17176 esac
17177 done
17178
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017180 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17181 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017182 # `set' does not quote correctly, so add quotes: double-quote
17183 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017185 "s/'/'\\\\''/g;
17186 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 *)
17189 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017191 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192 esac |
17193 sort
17194) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017197 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17200 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17202 :end' >>confcache
17203if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17204 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017205 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017206 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17207$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017208 if test ! -f "$cache_file" || test -h "$cache_file"; then
17209 cat confcache >"$cache_file"
17210 else
17211 case $cache_file in #(
17212 */* | ?:*)
17213 mv -f confcache "$cache_file"$$ &&
17214 mv -f "$cache_file"$$ "$cache_file" ;; #(
17215 *)
17216 mv -f confcache "$cache_file" ;;
17217 esac
17218 fi
17219 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017220 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017221 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17222$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017223 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017224fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017225rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017227test "x$prefix" = xNONE && prefix=$ac_default_prefix
17228# Let make expand exec_prefix.
17229test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017231DEFS=-DHAVE_CONFIG_H
17232
Skip Montanaro6dead952003-09-25 14:50:04 +000017233ac_libobjs=
17234ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017235U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017236for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17237 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017238 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017239 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17241 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017242 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17243 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017244done
17245LIBOBJS=$ac_libobjs
17246
17247LTLIBOBJS=$ac_ltlibobjs
17248
17249
Martin v. Löwis11437992002-04-12 09:54:03 +000017250
Matthias Kloseb9621712010-04-24 17:59:49 +000017251
Victor Stinnere0be4232011-10-25 13:06:09 +020017252: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017253ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017254ac_clean_files_save=$ac_clean_files
17255ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017256{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17257$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17258as_write_fail=0
17259cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017260#! $SHELL
17261# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017262# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017263# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017264# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017265
Martin v. Löwis11437992002-04-12 09:54:03 +000017266debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017267ac_cs_recheck=false
17268ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017269
Matthias Kloseb9621712010-04-24 17:59:49 +000017270SHELL=\${CONFIG_SHELL-$SHELL}
17271export SHELL
17272_ASEOF
17273cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17274## -------------------- ##
17275## M4sh Initialization. ##
17276## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017278# Be more Bourne compatible
17279DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017280if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017281 emulate sh
17282 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017284 # is contrary to our usage. Disable this feature.
17285 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017286 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017287else
Matthias Kloseb9621712010-04-24 17:59:49 +000017288 case `(set -o) 2>/dev/null` in #(
17289 *posix*) :
17290 set -o posix ;; #(
17291 *) :
17292 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017294fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017295
17296
Matthias Kloseb9621712010-04-24 17:59:49 +000017297as_nl='
17298'
17299export as_nl
17300# Printing a long string crashes Solaris 7 /usr/bin/printf.
17301as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17302as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17303as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17304# Prefer a ksh shell builtin over an external printf program on Solaris,
17305# but without wasting forks for bash or zsh.
17306if test -z "$BASH_VERSION$ZSH_VERSION" \
17307 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17308 as_echo='print -r --'
17309 as_echo_n='print -rn --'
17310elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17311 as_echo='printf %s\n'
17312 as_echo_n='printf %s'
17313else
17314 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17315 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17316 as_echo_n='/usr/ucb/echo -n'
17317 else
17318 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17319 as_echo_n_body='eval
17320 arg=$1;
17321 case $arg in #(
17322 *"$as_nl"*)
17323 expr "X$arg" : "X\\(.*\\)$as_nl";
17324 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17325 esac;
17326 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17327 '
17328 export as_echo_n_body
17329 as_echo_n='sh -c $as_echo_n_body as_echo'
17330 fi
17331 export as_echo_body
17332 as_echo='sh -c $as_echo_body as_echo'
17333fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017334
17335# The user is always right.
17336if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017337 PATH_SEPARATOR=:
17338 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17339 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17340 PATH_SEPARATOR=';'
17341 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344
17345# IFS
17346# We need space, tab and new line, in precisely that order. Quoting is
17347# there to prevent editors from complaining about space-tab.
17348# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17349# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350IFS=" "" $as_nl"
17351
17352# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017353as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017354case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355 *[\\/]* ) as_myself=$0 ;;
17356 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017357for as_dir in $PATH
17358do
17359 IFS=$as_save_IFS
17360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017361 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17362 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 ;;
17366esac
17367# We did not find ourselves, most probably we were run as `sh COMMAND'
17368# in which case we are not to be found in the path.
17369if test "x$as_myself" = x; then
17370 as_myself=$0
17371fi
17372if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017373 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17374 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375fi
17376
Matthias Kloseb9621712010-04-24 17:59:49 +000017377# Unset variables that we do not need and which cause bugs (e.g. in
17378# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17379# suppresses any "Segmentation fault" message there. '((' could
17380# trigger a bug in pdksh 5.2.14.
17381for as_var in BASH_ENV ENV MAIL MAILPATH
17382do eval test x\${$as_var+set} = xset \
17383 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384done
17385PS1='$ '
17386PS2='> '
17387PS4='+ '
17388
17389# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017390LC_ALL=C
17391export LC_ALL
17392LANGUAGE=C
17393export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394
Matthias Kloseb9621712010-04-24 17:59:49 +000017395# CDPATH.
17396(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17397
17398
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017399# as_fn_error STATUS ERROR [LINENO LOG_FD]
17400# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017401# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17402# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017403# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017404as_fn_error ()
17405{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017406 as_status=$1; test $as_status -eq 0 && as_status=1
17407 if test "$4"; then
17408 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17409 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017411 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017412 as_fn_exit $as_status
17413} # as_fn_error
17414
17415
17416# as_fn_set_status STATUS
17417# -----------------------
17418# Set $? to STATUS, without forking.
17419as_fn_set_status ()
17420{
17421 return $1
17422} # as_fn_set_status
17423
17424# as_fn_exit STATUS
17425# -----------------
17426# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17427as_fn_exit ()
17428{
17429 set +e
17430 as_fn_set_status $1
17431 exit $1
17432} # as_fn_exit
17433
17434# as_fn_unset VAR
17435# ---------------
17436# Portably unset VAR.
17437as_fn_unset ()
17438{
17439 { eval $1=; unset $1;}
17440}
17441as_unset=as_fn_unset
17442# as_fn_append VAR VALUE
17443# ----------------------
17444# Append the text in VALUE to the end of the definition contained in VAR. Take
17445# advantage of any shell optimizations that allow amortized linear growth over
17446# repeated appends, instead of the typical quadratic growth present in naive
17447# implementations.
17448if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17449 eval 'as_fn_append ()
17450 {
17451 eval $1+=\$2
17452 }'
17453else
17454 as_fn_append ()
17455 {
17456 eval $1=\$$1\$2
17457 }
17458fi # as_fn_append
17459
17460# as_fn_arith ARG...
17461# ------------------
17462# Perform arithmetic evaluation on the ARGs, and store the result in the
17463# global $as_val. Take advantage of shells that can avoid forks. The arguments
17464# must be portable across $(()) and expr.
17465if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17466 eval 'as_fn_arith ()
17467 {
17468 as_val=$(( $* ))
17469 }'
17470else
17471 as_fn_arith ()
17472 {
17473 as_val=`expr "$@" || test $? -eq 1`
17474 }
17475fi # as_fn_arith
17476
17477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478if expr a : '\(a\)' >/dev/null 2>&1 &&
17479 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17480 as_expr=expr
17481else
17482 as_expr=false
17483fi
17484
17485if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17486 as_basename=basename
17487else
17488 as_basename=false
17489fi
17490
Matthias Kloseb9621712010-04-24 17:59:49 +000017491if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17492 as_dirname=dirname
17493else
17494 as_dirname=false
17495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497as_me=`$as_basename -- "$0" ||
17498$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17499 X"$0" : 'X\(//\)$' \| \
17500 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017501$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502 sed '/^.*\/\([^/][^/]*\)\/*$/{
17503 s//\1/
17504 q
17505 }
17506 /^X\/\(\/\/\)$/{
17507 s//\1/
17508 q
17509 }
17510 /^X\/\(\/\).*/{
17511 s//\1/
17512 q
17513 }
17514 s/.*/./; q'`
17515
Matthias Kloseb9621712010-04-24 17:59:49 +000017516# Avoid depending upon Character Ranges.
17517as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17518as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17519as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17520as_cr_digits='0123456789'
17521as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522
17523ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017524case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017526 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 xy) ECHO_C='\c';;
17529 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17530 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531 esac;;
17532*)
17533 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017534esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017535
Martin v. Löwis11437992002-04-12 09:54:03 +000017536rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537if test -d conf$$.dir; then
17538 rm -f conf$$.dir/conf$$.file
17539else
17540 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017541 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017543if (echo >conf$$.file) 2>/dev/null; then
17544 if ln -s conf$$.file conf$$ 2>/dev/null; then
17545 as_ln_s='ln -s'
17546 # ... but there are two gotchas:
17547 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17548 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017549 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017550 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017551 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017552 elif ln conf$$.file conf$$ 2>/dev/null; then
17553 as_ln_s=ln
17554 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017555 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017557else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017558 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17561rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017562
Matthias Kloseb9621712010-04-24 17:59:49 +000017563
17564# as_fn_mkdir_p
17565# -------------
17566# Create "$as_dir" as a directory, including parents if necessary.
17567as_fn_mkdir_p ()
17568{
17569
17570 case $as_dir in #(
17571 -*) as_dir=./$as_dir;;
17572 esac
17573 test -d "$as_dir" || eval $as_mkdir_p || {
17574 as_dirs=
17575 while :; do
17576 case $as_dir in #(
17577 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17578 *) as_qdir=$as_dir;;
17579 esac
17580 as_dirs="'$as_qdir' $as_dirs"
17581 as_dir=`$as_dirname -- "$as_dir" ||
17582$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17583 X"$as_dir" : 'X\(//\)[^/]' \| \
17584 X"$as_dir" : 'X\(//\)$' \| \
17585 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17586$as_echo X"$as_dir" |
17587 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17588 s//\1/
17589 q
17590 }
17591 /^X\(\/\/\)[^/].*/{
17592 s//\1/
17593 q
17594 }
17595 /^X\(\/\/\)$/{
17596 s//\1/
17597 q
17598 }
17599 /^X\(\/\).*/{
17600 s//\1/
17601 q
17602 }
17603 s/.*/./; q'`
17604 test -d "$as_dir" && break
17605 done
17606 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017607 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017608
17609
17610} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017611if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017612 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017613else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017614 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017615 as_mkdir_p=false
17616fi
17617
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017618
17619# as_fn_executable_p FILE
17620# -----------------------
17621# Test if FILE is an executable regular file.
17622as_fn_executable_p ()
17623{
17624 test -f "$1" && test -x "$1"
17625} # as_fn_executable_p
17626as_test_x='test -x'
17627as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017628
17629# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017630as_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 +000017631
17632# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017633as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017634
17635
Martin v. Löwis11437992002-04-12 09:54:03 +000017636exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017637## ----------------------------------- ##
17638## Main body of $CONFIG_STATUS script. ##
17639## ----------------------------------- ##
17640_ASEOF
17641test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017642
Matthias Kloseb9621712010-04-24 17:59:49 +000017643cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17644# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017645# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646# values after options handling.
17647ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017648This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017649generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017650
17651 CONFIG_FILES = $CONFIG_FILES
17652 CONFIG_HEADERS = $CONFIG_HEADERS
17653 CONFIG_LINKS = $CONFIG_LINKS
17654 CONFIG_COMMANDS = $CONFIG_COMMANDS
17655 $ $0 $@
17656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017657on `(hostname || uname -n) 2>/dev/null | sed 1q`
17658"
17659
Martin v. Löwis11437992002-04-12 09:54:03 +000017660_ACEOF
17661
Matthias Kloseb9621712010-04-24 17:59:49 +000017662case $ac_config_files in *"
17663"*) set x $ac_config_files; shift; ac_config_files=$*;;
17664esac
17665
17666case $ac_config_headers in *"
17667"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17668esac
17669
17670
17671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017672# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017673config_files="$ac_config_files"
17674config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017677
Matthias Kloseb9621712010-04-24 17:59:49 +000017678cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017679ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017680\`$as_me' instantiates files and other configuration actions
17681from templates according to the current configuration. Unless the files
17682and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017683
Matthias Kloseb9621712010-04-24 17:59:49 +000017684Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017685
17686 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017688 --config print configuration, then exit
17689 -q, --quiet, --silent
17690 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017691 -d, --debug don't remove temporary files
17692 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017693 --file=FILE[:TEMPLATE]
17694 instantiate the configuration file FILE
17695 --header=FILE[:TEMPLATE]
17696 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017697
17698Configuration files:
17699$config_files
17700
17701Configuration headers:
17702$config_headers
17703
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017704Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17708ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017709ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017710python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017711configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017712 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017713
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017714Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017715This config.status script is free software; the Free Software Foundation
17716gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717
17718ac_pwd='$ac_pwd'
17719srcdir='$srcdir'
17720INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017721MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017722test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017723_ACEOF
17724
Matthias Kloseb9621712010-04-24 17:59:49 +000017725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17726# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017727ac_need_defaults=:
17728while test $# != 0
17729do
17730 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017731 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17733 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017734 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017736 --*=)
17737 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17738 ac_optarg=
17739 ac_shift=:
17740 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017742 ac_option=$1
17743 ac_optarg=$2
17744 ac_shift=shift
17745 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 esac
17747
Skip Montanaro6dead952003-09-25 14:50:04 +000017748 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017749 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017750 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17751 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 $as_echo "$ac_cs_version"; exit ;;
17754 --config | --confi | --conf | --con | --co | --c )
17755 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 debug=: ;;
17758 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017759 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017760 case $ac_optarg in
17761 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017762 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017763 esac
17764 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 ac_need_defaults=false;;
17766 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017767 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017768 case $ac_optarg in
17769 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17770 esac
17771 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017772 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773 --he | --h)
17774 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017775 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017776Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017778 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017779 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17780 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17781 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017782
17783 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017784 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017785Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017786
Matthias Kloseb9621712010-04-24 17:59:49 +000017787 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017789
17790 esac
17791 shift
17792done
17793
Skip Montanaro6dead952003-09-25 14:50:04 +000017794ac_configure_extra_args=
17795
17796if $ac_cs_silent; then
17797 exec 6>/dev/null
17798 ac_configure_extra_args="$ac_configure_extra_args --silent"
17799fi
17800
17801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017802cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017803if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017804 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017805 shift
17806 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17807 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017809 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017810fi
17811
Martin v. Löwis11437992002-04-12 09:54:03 +000017812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017813cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814exec 5>>config.log
17815{
17816 echo
17817 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17818## Running $as_me. ##
17819_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017820 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017824cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017825_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017826
Matthias Kloseb9621712010-04-24 17:59:49 +000017827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828
17829# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017830for ac_config_target in $ac_config_targets
17831do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832 case $ac_config_target in
17833 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17834 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17835 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017836 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17837 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017839 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017840 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017841 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842
Victor Stinnere0be4232011-10-25 13:06:09 +020017843 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017844 esac
17845done
17846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847
Martin v. Löwis11437992002-04-12 09:54:03 +000017848# If the user did not use the arguments to specify the items to instantiate,
17849# then the envvar interface is used. Set only those that are not.
17850# We use the long form for the default assignment because of an extremely
17851# bizarre bug on SunOS 4.1.3.
17852if $ac_need_defaults; then
17853 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17854 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17855fi
17856
Skip Montanaro6dead952003-09-25 14:50:04 +000017857# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017859# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860# Hook for its removal unless debugging.
17861# Note that there is a small window in which the directory will not be cleaned:
17862# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017863$debug ||
17864{
Victor Stinnere0be4232011-10-25 13:06:09 +020017865 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017867 : "${ac_tmp:=$tmp}"
17868 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017870 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017871}
Martin v. Löwis11437992002-04-12 09:54:03 +000017872# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017873
Martin v. Löwis11437992002-04-12 09:54:03 +000017874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017875 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017876 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017877} ||
17878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017879 tmp=./conf$$-$RANDOM
17880 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017881} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017882ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017883
Matthias Kloseb9621712010-04-24 17:59:49 +000017884# Set up the scripts for CONFIG_FILES section.
17885# No need to generate them if there are no CONFIG_FILES.
17886# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017888
Matthias Kloseb9621712010-04-24 17:59:49 +000017889
17890ac_cr=`echo X | tr X '\015'`
17891# On cygwin, bash can eat \r inside `` if the user requested igncr.
17892# But we know of no other shell where ac_cr would be empty at this
17893# point, so we can use a bashism as a fallback.
17894if test "x$ac_cr" = x; then
17895 eval ac_cr=\$\'\\r\'
17896fi
17897ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17898if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017899 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017900else
17901 ac_cs_awk_cr=$ac_cr
17902fi
17903
Victor Stinnere0be4232011-10-25 13:06:09 +020017904echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017905_ACEOF
17906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907
Matthias Kloseb9621712010-04-24 17:59:49 +000017908{
17909 echo "cat >conf$$subs.awk <<_ACEOF" &&
17910 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17911 echo "_ACEOF"
17912} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017913 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17914ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017915ac_delim='%!_!# '
17916for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017917 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017918 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017919
Matthias Kloseb9621712010-04-24 17:59:49 +000017920 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17921 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922 break
17923 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017924 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925 else
17926 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017927 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017928done
Matthias Kloseb9621712010-04-24 17:59:49 +000017929rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017930
Matthias Kloseb9621712010-04-24 17:59:49 +000017931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017932cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017934sed -n '
17935h
17936s/^/S["/; s/!.*/"]=/
17937p
17938g
17939s/^[^!]*!//
17940:repl
17941t repl
17942s/'"$ac_delim"'$//
17943t delim
17944:nl
17945h
17946s/\(.\{148\}\)..*/\1/
17947t more1
17948s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17949p
17950n
17951b repl
17952:more1
17953s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17954p
17955g
17956s/.\{148\}//
17957t nl
17958:delim
17959h
17960s/\(.\{148\}\)..*/\1/
17961t more2
17962s/["\\]/\\&/g; s/^/"/; s/$/"/
17963p
17964b
17965:more2
17966s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17967p
17968g
17969s/.\{148\}//
17970t delim
17971' <conf$$subs.awk | sed '
17972/^[^""]/{
17973 N
17974 s/\n//
17975}
17976' >>$CONFIG_STATUS || ac_write_fail=1
17977rm -f conf$$subs.awk
17978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17979_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017980cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017981 for (key in S) S_is_set[key] = 1
17982 FS = ""
17983
17984}
17985{
17986 line = $ 0
17987 nfields = split(line, field, "@")
17988 substed = 0
17989 len = length(field[1])
17990 for (i = 2; i < nfields; i++) {
17991 key = field[i]
17992 keylen = length(key)
17993 if (S_is_set[key]) {
17994 value = S[key]
17995 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17996 len += length(value) + length(field[++i])
17997 substed = 1
17998 } else
17999 len += 1 + keylen
18000 }
18001
18002 print line
18003}
18004
18005_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018007cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18008if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18009 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18010else
18011 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018012fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018013 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018014_ACEOF
18015
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018016# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18017# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018# trailing colons and then remove the whole line if VPATH becomes empty
18019# (actually we leave an empty line to preserve line numbers).
18020if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018021 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18022h
18023s///
18024s/^/:/
18025s/[ ]*$/:/
18026s/:\$(srcdir):/:/g
18027s/:\${srcdir}:/:/g
18028s/:@srcdir@:/:/g
18029s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018031x
18032s/\(=[ ]*\).*/\1/
18033G
18034s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035s/^[^=]*=[ ]*$//
18036}'
18037fi
18038
Matthias Kloseb9621712010-04-24 17:59:49 +000018039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018040fi # test -n "$CONFIG_FILES"
18041
Matthias Kloseb9621712010-04-24 17:59:49 +000018042# Set up the scripts for CONFIG_HEADERS section.
18043# No need to generate them if there are no CONFIG_HEADERS.
18044# This happens for instance with `./config.status Makefile'.
18045if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018046cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018047BEGIN {
18048_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049
Matthias Kloseb9621712010-04-24 17:59:49 +000018050# Transform confdefs.h into an awk script `defines.awk', embedded as
18051# here-document in config.status, that substitutes the proper values into
18052# config.h.in to produce config.h.
18053
18054# Create a delimiter string that does not exist in confdefs.h, to ease
18055# handling of long lines.
18056ac_delim='%!_!# '
18057for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018058 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18059 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018060 break
18061 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018062 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018063 else
18064 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18065 fi
18066done
18067
18068# For the awk script, D is an array of macro values keyed by name,
18069# likewise P contains macro parameters if any. Preserve backslash
18070# newline sequences.
18071
18072ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18073sed -n '
18074s/.\{148\}/&'"$ac_delim"'/g
18075t rset
18076:rset
18077s/^[ ]*#[ ]*define[ ][ ]*/ /
18078t def
18079d
18080:def
18081s/\\$//
18082t bsnl
18083s/["\\]/\\&/g
18084s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18085D["\1"]=" \3"/p
18086s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18087d
18088:bsnl
18089s/["\\]/\\&/g
18090s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18091D["\1"]=" \3\\\\\\n"\\/p
18092t cont
18093s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18094t cont
18095d
18096:cont
18097n
18098s/.\{148\}/&'"$ac_delim"'/g
18099t clear
18100:clear
18101s/\\$//
18102t bsnlc
18103s/["\\]/\\&/g; s/^/"/; s/$/"/p
18104d
18105:bsnlc
18106s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18107b cont
18108' <confdefs.h | sed '
18109s/'"$ac_delim"'/"\\\
18110"/g' >>$CONFIG_STATUS || ac_write_fail=1
18111
18112cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18113 for (key in D) D_is_set[key] = 1
18114 FS = ""
18115}
18116/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18117 line = \$ 0
18118 split(line, arg, " ")
18119 if (arg[1] == "#") {
18120 defundef = arg[2]
18121 mac1 = arg[3]
18122 } else {
18123 defundef = substr(arg[1], 2)
18124 mac1 = arg[2]
18125 }
18126 split(mac1, mac2, "(") #)
18127 macro = mac2[1]
18128 prefix = substr(line, 1, index(line, defundef) - 1)
18129 if (D_is_set[macro]) {
18130 # Preserve the white space surrounding the "#".
18131 print prefix "define", macro P[macro] D[macro]
18132 next
18133 } else {
18134 # Replace #undef with comments. This is necessary, for example,
18135 # in the case of _POSIX_SOURCE, which is predefined and required
18136 # on some systems where configure will not decide to define it.
18137 if (defundef == "undef") {
18138 print "/*", prefix defundef, macro, "*/"
18139 next
18140 }
18141 }
18142}
18143{ print }
18144_ACAWK
18145_ACEOF
18146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018147 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018148fi # test -n "$CONFIG_HEADERS"
18149
18150
18151eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18152shift
18153for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154do
18155 case $ac_tag in
18156 :[FHLC]) ac_mode=$ac_tag; continue;;
18157 esac
18158 case $ac_mode$ac_tag in
18159 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018160 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018161 :[FH]-) ac_tag=-:-;;
18162 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18163 esac
18164 ac_save_IFS=$IFS
18165 IFS=:
18166 set x $ac_tag
18167 IFS=$ac_save_IFS
18168 shift
18169 ac_file=$1
18170 shift
18171
18172 case $ac_mode in
18173 :L) ac_source=$1;;
18174 :[FH])
18175 ac_file_inputs=
18176 for ac_f
18177 do
18178 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018179 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018180 *) # Look for the file first in the build tree, then in the source tree
18181 # (if the path is not absolute). The absolute path cannot be DOS-style,
18182 # because $ac_f cannot contain `:'.
18183 test -f "$ac_f" ||
18184 case $ac_f in
18185 [\\/$]*) false;;
18186 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18187 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018188 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018190 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18191 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018192 done
18193
18194 # Let's still pretend it is `configure' which instantiates (i.e., don't
18195 # use $as_me), people would be surprised to read:
18196 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018197 configure_input='Generated from '`
18198 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18199 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200 if test x"$ac_file" != x-; then
18201 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018202 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18203$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018205 # Neutralize special characters interpreted by sed in replacement strings.
18206 case $configure_input in #(
18207 *\&* | *\|* | *\\* )
18208 ac_sed_conf_input=`$as_echo "$configure_input" |
18209 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18210 *) ac_sed_conf_input=$configure_input;;
18211 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212
18213 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018214 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18215 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018216 esac
18217 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018218 esac
18219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018221$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018222 X"$ac_file" : 'X\(//\)[^/]' \| \
18223 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018224 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018225$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018226 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18227 s//\1/
18228 q
18229 }
18230 /^X\(\/\/\)[^/].*/{
18231 s//\1/
18232 q
18233 }
18234 /^X\(\/\/\)$/{
18235 s//\1/
18236 q
18237 }
18238 /^X\(\/\).*/{
18239 s//\1/
18240 q
18241 }
18242 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018243 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018244 ac_builddir=.
18245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246case "$ac_dir" in
18247.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18248*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018249 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018251 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018252 case $ac_top_builddir_sub in
18253 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18254 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18255 esac ;;
18256esac
18257ac_abs_top_builddir=$ac_pwd
18258ac_abs_builddir=$ac_pwd$ac_dir_suffix
18259# for backward compatibility:
18260ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018261
18262case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018263 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018265 ac_top_srcdir=$ac_top_builddir_sub
18266 ac_abs_top_srcdir=$ac_pwd ;;
18267 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018269 ac_top_srcdir=$srcdir
18270 ac_abs_top_srcdir=$srcdir ;;
18271 *) # Relative name.
18272 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18273 ac_top_srcdir=$ac_top_build_prefix$srcdir
18274 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018275esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018276ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018277
Martin v. Löwis11437992002-04-12 09:54:03 +000018278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279 case $ac_mode in
18280 :F)
18281 #
18282 # CONFIG_FILE
18283 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018284
18285 case $INSTALL in
18286 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018289 ac_MKDIR_P=$MKDIR_P
18290 case $MKDIR_P in
18291 [\\/$]* | ?:[\\/]* ) ;;
18292 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18293 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018294_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295
Matthias Kloseb9621712010-04-24 17:59:49 +000018296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018297# If the template does not know about datarootdir, expand it.
18298# FIXME: This hack should be removed a few years after 2.60.
18299ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018300ac_sed_dataroot='
18301/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018302 p
18303 q
18304}
18305/@datadir@/p
18306/@docdir@/p
18307/@infodir@/p
18308/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018309/@mandir@/p'
18310case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311*datarootdir*) ac_datarootdir_seen=yes;;
18312*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18314$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317 ac_datarootdir_hack='
18318 s&@datadir@&$datadir&g
18319 s&@docdir@&$docdir&g
18320 s&@infodir@&$infodir&g
18321 s&@localedir@&$localedir&g
18322 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018323 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018324esac
18325_ACEOF
18326
18327# Neutralize VPATH when `$srcdir' = `.'.
18328# Shell code in configure.ac might set extrasub.
18329# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18331ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018332$extrasub
18333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018334cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018335:t
18336/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018337s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018338s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018339s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340s&@srcdir@&$ac_srcdir&;t t
18341s&@abs_srcdir@&$ac_abs_srcdir&;t t
18342s&@top_srcdir@&$ac_top_srcdir&;t t
18343s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18344s&@builddir@&$ac_builddir&;t t
18345s&@abs_builddir@&$ac_abs_builddir&;t t
18346s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18347s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018348s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018350"
Victor Stinnere0be4232011-10-25 13:06:09 +020018351eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18352 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018355 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18356 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18357 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018359which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018360$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018361which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018362
Victor Stinnere0be4232011-10-25 13:06:09 +020018363 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018364 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018365 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18366 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018367 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018368 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018369 ;;
18370 :H)
18371 #
18372 # CONFIG_HEADER
18373 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018374 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018375 {
18376 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018377 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18378 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018379 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018380 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018381 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18382$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018383 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018384 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018385 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018386 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018387 fi
18388 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018389 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018390 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018391 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018393 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395
18396 esac
18397
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018398
18399 case $ac_file$ac_mode in
18400 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18401
18402 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018403done # for ac_tag
18404
Guido van Rossum627b2d71993-12-24 10:39:16 +000018405
Matthias Kloseb9621712010-04-24 17:59:49 +000018406as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018407_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018408ac_clean_files=$ac_clean_files_save
18409
Matthias Kloseb9621712010-04-24 17:59:49 +000018410test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018411 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018412
Martin v. Löwis11437992002-04-12 09:54:03 +000018413
18414# configure is writing to config.log, and then calls config.status.
18415# config.status does its own redirection, appending to config.log.
18416# Unfortunately, on DOS this fails, as config.log is still kept open
18417# by configure, so config.status won't be able to write to it; its
18418# output is simply discarded. So we exec the FD to /dev/null,
18419# effectively closing config.log, so it can be properly (re)opened and
18420# appended to by config.status. When coming back to configure, we
18421# need to make the FD available again.
18422if test "$no_create" != yes; then
18423 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018424 ac_config_status_args=
18425 test "$silent" = yes &&
18426 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018427 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018428 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 exec 5>>config.log
18430 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18431 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018432 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018433fi
18434if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18435 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18436$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018437fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018438
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018439
Christian Heimes75ed8902013-11-20 01:11:18 +010018440echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018441if test ! -f Modules/Setup
18442then
18443 cp $srcdir/Modules/Setup.dist Modules/Setup
18444fi
18445
Christian Heimes75ed8902013-11-20 01:11:18 +010018446echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018447if test ! -f Modules/Setup.local
18448then
18449 echo "# Edit this file for local setup changes" >Modules/Setup.local
18450fi
18451
Christian Heimes75ed8902013-11-20 01:11:18 +010018452echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018453$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018454 -s Modules \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000018455 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018456mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018457
18458if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18459 echo "" >&6
18460 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018461 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 +000018462 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018463 echo "" >&6
18464 echo "" >&6
18465fi
18466