blob: 3998a32d377c1ae06185013b82bc22b200c2b202 [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.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
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'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000650LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
653PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700665CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000666BASECFLAGS
667OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700668LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700669target_os
670target_vendor
671target_cpu
672target
673LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_ERR
675LLVM_PROF_FILE
676LLVM_PROF_MERGER
677PGO_PROF_USE_FLAG
678PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700679LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700680DEF_MAKE_RULE
681DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000682ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000683LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100684MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000685INSTALL_DATA
686INSTALL_SCRIPT
687INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200688ac_ct_READELF
689READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000690ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200691ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000692AR
693RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000694USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000695GNULD
696LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000697LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000698RUNSHARED
699INSTSONAME
700LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000701PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000702BLDLIBRARY
703DLLLIBRARY
704LDLIBRARY
705LIBRARY
706BUILDEXEEXT
707EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200708NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200709MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200711PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200712MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200713ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MAINCC
715CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716GREP
717CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000718OBJEXT
719EXEEXT
720ac_ct_CC
721CPPFLAGS
722LDFLAGS
723CFLAGS
724CC
725EXPORT_MACOSX_DEPLOYMENT_TARGET
726CONFIGURE_MACOSX_DEPLOYMENT_TARGET
727SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000729MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000730FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000731FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800732FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKALTINSTALLLAST
734FRAMEWORKALTINSTALLFIRST
735FRAMEWORKINSTALLLAST
736FRAMEWORKINSTALLFIRST
737PYTHONFRAMEWORKINSTALLDIR
738PYTHONFRAMEWORKPREFIX
739PYTHONFRAMEWORKDIR
740PYTHONFRAMEWORKIDENTIFIER
741PYTHONFRAMEWORK
742LIPO_32BIT_FLAGS
743ARCH_RUN_32BIT
744UNIVERSALSDK
745CONFIG_ARGS
746SOVERSION
747VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000748GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200749PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200750PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100751host_os
752host_vendor
753host_cpu
754host
755build_os
756build_vendor
757build_cpu
758build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500759HAS_HG
760HGBRANCH
761HGTAG
762HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400763BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000764target_alias
765host_alias
766build_alias
767LIBS
768ECHO_T
769ECHO_N
770ECHO_C
771DEFS
772mandir
773localedir
774libdir
775psdir
776pdfdir
777dvidir
778htmldir
779infodir
780docdir
781oldincludedir
782includedir
Benjamin Petersona9296e72016-09-07 11:06:17 -0700783runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000784localstatedir
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
Brett Cannon63d98bc2016-09-06 17:12:40 -0700817with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700818with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100819with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100820with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_libs
822with_system_expat
823with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100824with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000825enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700826with_tcltk_includes
827with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_threads
830with_thread
831enable_ipv6
832with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_pymalloc
834with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_fpectl
836with_libm
837with_libc
838enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800840with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000841'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 ac_precious_vars='build_alias
843host_alias
844target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100845MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846CC
847CFLAGS
848LDFLAGS
849LIBS
850CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100851CPP
852PKG_CONFIG
853PKG_CONFIG_PATH
854PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000858ac_init_help=
859ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000860ac_unrecognized_opts=
861ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# The variables have the same names as the options, with
863# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867no_recursion=
868prefix=NONE
869program_prefix=NONE
870program_suffix=NONE
871program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876x_includes=NONE
877x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879# Installation directory options.
880# These are left unexpanded so users can "make install exec_prefix=/foo"
881# and all the variables that are supposed to be based on exec_prefix
882# by default will actually change.
883# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885bindir='${exec_prefix}/bin'
886sbindir='${exec_prefix}/sbin'
887libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888datarootdir='${prefix}/share'
889datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890sysconfdir='${prefix}/etc'
891sharedstatedir='${prefix}/com'
892localstatedir='${prefix}/var'
Benjamin Petersona9296e72016-09-07 11:06:17 -0700893runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894includedir='${prefix}/include'
895oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 ac_prev=
914 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
934 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200965 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200991 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 no_create=yes ;;
1082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
Benjamin Petersona9296e72016-09-07 11:06:17 -07001146 -runstatedir | --runstatedir | --runstatedi | --runstated \
1147 | --runstate | --runstat | --runsta | --runst | --runs \
1148 | --run | --ru | --r)
1149 ac_prev=runstatedir ;;
1150 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1151 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1152 | --run=* | --ru=* | --r=*)
1153 runstatedir=$ac_optarg ;;
1154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1156 ac_prev=sbindir ;;
1157 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1158 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
1161 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1162 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1163 | --sharedst | --shareds | --shared | --share | --shar \
1164 | --sha | --sh)
1165 ac_prev=sharedstatedir ;;
1166 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1167 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1168 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1169 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 -site | --site | --sit)
1173 ac_prev=site ;;
1174 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1178 ac_prev=srcdir ;;
1179 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1183 | --syscon | --sysco | --sysc | --sys | --sy)
1184 ac_prev=sysconfdir ;;
1185 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1186 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1195 verbose=yes ;;
1196
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 -version | --version | --versio | --versi | --vers | -V)
1198 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"with_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
1213 esac
1214 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 --x)
1233 # Obsolete; use --with-x.
1234 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237 | --x-incl | --x-inc | --x-in | --x-i)
1238 ac_prev=x_includes ;;
1239 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245 ac_prev=x_libraries ;;
1246 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1251Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ;;
1253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 *=*)
1255 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 case $ac_envvar in #(
1258 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 export $ac_envvar ;;
1263
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001264 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001269 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 ;;
1271
1272 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273done
1274
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278fi
1279
Matthias Kloseb9621712010-04-24 17:59:49 +00001280if test -n "$ac_unrecognized_opts"; then
1281 case $enable_option_checking in
1282 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001284 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285 esac
1286fi
1287
1288# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290 datadir sysconfdir sharedstatedir localstatedir includedir \
1291 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersona9296e72016-09-07 11:06:17 -07001292 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001295 # Remove trailing slashes.
1296 case $ac_val in
1297 */ )
1298 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299 eval $ac_var=\$ac_val;;
1300 esac
1301 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001302 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 [\\/$]* | ?:[\\/]* ) continue;;
1304 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# There might be people who depend on the old broken behavior: `$host'
1310# used to hold the argument of --host etc.
1311# FIXME: To remove some day.
1312build=$build_alias
1313host=$host_alias
1314target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# FIXME: To remove some day.
1317if test "x$host_alias" != x; then
1318 if test "x$build_alias" = x; then
1319 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001320 elif test "x$build_alias" != "x$host_alias"; then
1321 cross_compiling=yes
1322 fi
1323fi
1324
1325ac_tool_prefix=
1326test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328test "$silent" = yes && exec 6>/dev/null
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332ac_ls_di=`ls -di .` &&
1333ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337
1338
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339# Find the source files, if location was not specified.
1340if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 ac_confdir=`$as_dirname -- "$as_myself" ||
1344$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345 X"$as_myself" : 'X\(//\)[^/]' \| \
1346 X"$as_myself" : 'X\(//\)$' \| \
1347 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)[^/].*/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\).*/{
1362 s//\1/
1363 q
1364 }
1365 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001366 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368 srcdir=..
1369 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370else
1371 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373if test ! -r "$srcdir/$ac_unique_file"; then
1374 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1378ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380 pwd)`
1381# When building in place, set srcdir=.
1382if test "$ac_abs_confdir" = "$ac_pwd"; then
1383 srcdir=.
1384fi
1385# Remove unnecessary trailing slashes from srcdir.
1386# Double slashes in file names in object file debugging info
1387# mess up M-x gdb in Emacs.
1388case $srcdir in
1389*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1390esac
1391for ac_var in $ac_precious_vars; do
1392 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_env_${ac_var}_value=\$${ac_var}
1394 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1396done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398#
1399# Report the --help message.
1400#
1401if test "$ac_init_help" = "long"; then
1402 # Omit some internal or obsolete options to make the list less imposing.
1403 # This message is too long to be a string in the A/UX 3.1 sh.
1404 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001405\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Usage: $0 [OPTION]... [VAR=VALUE]...
1408
1409To assign environment variables (e.g., CC, CFLAGS...), specify them as
1410VAR=VALUE. See below for descriptions of some of the useful variables.
1411
1412Defaults for the options are specified in brackets.
1413
1414Configuration:
1415 -h, --help display this help and exit
1416 --help=short display options specific to this package
1417 --help=recursive display the short help of all the included packages
1418 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001419 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --cache-file=FILE cache test results in FILE [disabled]
1421 -C, --config-cache alias for \`--cache-file=config.cache'
1422 -n, --no-create do not create output files
1423 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425Installation directories:
1426 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431By default, \`make install' will install all the files in
1432\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1433an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1434for instance \`--prefix=\$HOME'.
1435
1436For better control, use the options below.
1437
1438Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 --bindir=DIR user executables [EPREFIX/bin]
1440 --sbindir=DIR system admin executables [EPREFIX/sbin]
1441 --libexecdir=DIR program executables [EPREFIX/libexec]
1442 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1443 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1444 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersona9296e72016-09-07 11:06:17 -07001445 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --libdir=DIR object code libraries [EPREFIX/lib]
1447 --includedir=DIR C header files [PREFIX/include]
1448 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1449 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1450 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1451 --infodir=DIR info documentation [DATAROOTDIR/info]
1452 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1453 --mandir=DIR man documentation [DATAROOTDIR/man]
1454 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1455 --htmldir=DIR html documentation [DOCDIR]
1456 --dvidir=DIR dvi documentation [DOCDIR]
1457 --pdfdir=DIR pdf documentation [DOCDIR]
1458 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460
1461 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001462
1463System types:
1464 --build=BUILD configure for building on BUILD [guessed]
1465 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001466 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468fi
1469
1470if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001472 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 cat <<\_ACEOF
1475
1476Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1479 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001480 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001481 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-framework[=INSTALLDIR]
1483 Build (MacOSX|Darwin) framework
1484 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001485 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001486 --enable-loadable-sqlite-extensions
1487 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --enable-ipv6 Enable ipv6 (with ipv4) support
1489 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001490 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
1493Optional Packages:
1494 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1495 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001496 --with-universal-archs=ARCH
1497 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001498 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001499 --with-framework-name=FRAMEWORK
1500 specify an alternate name of the framework built
1501 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001503 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001504 --with-cxx-main=<compiler>
1505 compile main() and link python executable with C++
1506 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-suffix=.exe set executable suffix
1508 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00001509 --with-optimizations Enable expensive optimizations (PGO, maybe LTO,
Brett Cannon63d98bc2016-09-06 17:12:40 -07001510 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001511 --with-lto Enable Link Time Optimization in PGO builds.
1512 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001513 --with-hash-algorithm=[fnv|siphash24]
1514 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001515 --with-address-sanitizer
1516 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001518 --with-system-expat build pyexpat module using an installed expat
1519 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001520 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001521 --with-system-libmpdec build _decimal module using an installed libmpdec
1522 library
Ned Deilyd819b932013-09-06 01:07:05 -07001523 --with-tcltk-includes='-I...'
1524 override search for Tcl and Tk include files
1525 --with-tcltk-libs='-L...'
1526 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001527 --with-dbmliborder=db1:db2:...
1528 order to check db backends for dbm. Valid value is a
1529 colon separated string with the backend names
1530 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-threads[=DIRECTORY]
1532 disable/enable thread support
1533 --with(out)-thread[=DIRECTORY]
1534 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001535 --with(out)-doc-strings disable/enable documentation strings
1536 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001537 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-fpectl enable SIGFPE catching
1539 --with-libm=STRING math library
1540 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001541 --with(out)-computed-gotos
1542 Use computed gotos in evaluation loop (enabled by
1543 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001544 --with(out)-ensurepip=[=upgrade]
1545 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001548 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CC C compiler command
1550 CFLAGS C compiler flags
1551 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1552 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001554 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001557 PKG_CONFIG path to pkg-config utility
1558 PKG_CONFIG_PATH
1559 directories to add to pkg-config's search path
1560 PKG_CONFIG_LIBDIR
1561 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001562
1563Use these variables to override the choices made by `configure' or to help
1564it to find libraries and programs with nonstandard names/locations.
1565
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001566Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
1570
1571if test "$ac_init_help" = "recursive"; then
1572 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 test -d "$ac_dir" ||
1575 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1576 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_builddir=.
1578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579case "$ac_dir" in
1580.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 case $ac_top_builddir_sub in
1586 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1588 esac ;;
1589esac
1590ac_abs_top_builddir=$ac_pwd
1591ac_abs_builddir=$ac_pwd$ac_dir_suffix
1592# for backward compatibility:
1593ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 ac_top_srcdir=$ac_top_builddir_sub
1599 ac_abs_top_srcdir=$ac_pwd ;;
1600 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$srcdir
1603 ac_abs_top_srcdir=$srcdir ;;
1604 *) # Relative name.
1605 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1606 ac_top_srcdir=$ac_top_build_prefix$srcdir
1607 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001608esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 cd "$ac_dir" || { ac_status=$?; continue; }
1612 # Check for guested configure.
1613 if test -f "$ac_srcdir/configure.gnu"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1616 elif test -f "$ac_srcdir/configure"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 fi || ac_status=$?
1622 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 done
1624fi
1625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001627if $ac_init_version; then
1628 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001629python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001633This configure script is free software; the Free Software Foundation
1634gives unlimited permission to copy, distribute and modify it.
1635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001638
1639## ------------------------ ##
1640## Autoconf initialization. ##
1641## ------------------------ ##
1642
1643# ac_fn_c_try_compile LINENO
1644# --------------------------
1645# Try to compile conftest.$ac_ext, and return whether this succeeded.
1646ac_fn_c_try_compile ()
1647{
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 rm -f conftest.$ac_objext
1650 if { { ac_try="$ac_compile"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_compile") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665 test $ac_status = 0; } && {
1666 test -z "$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 } && test -s conftest.$ac_objext; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_compile
1680
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } > conftest.i && {
1703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
1713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
Matthias Kloseb9621712010-04-24 17:59:49 +00001718# ac_fn_c_try_link LINENO
1719# -----------------------
1720# Try to link conftest.$ac_ext, and return whether this succeeded.
1721ac_fn_c_try_link ()
1722{
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 rm -f conftest.$ac_objext conftest$ac_exeext
1725 if { { ac_try="$ac_link"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_link") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } && {
1741 test -z "$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 } && test -s conftest$ac_exeext && {
1744 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001745 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 }; then :
1747 ac_retval=0
1748else
1749 $as_echo "$as_me: failed program was:" >&5
1750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752 ac_retval=1
1753fi
1754 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1755 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1756 # interfere with the next link command; also delete a directory that is
1757 # left behind by Apple's compiler. We do this before executing the actions.
1758 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_link
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1765# -------------------------------------------------------
1766# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1767# the include files in INCLUDES and setting the cache variable VAR
1768# accordingly.
1769ac_fn_c_check_header_mongrel ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777fi
1778eval ac_res=\$$3
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1780$as_echo "$ac_res" >&6; }
1781else
1782 # Is the header compilable?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1784$as_echo_n "checking $2 usability... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787$4
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_compile "$LINENO"; then :
1791 ac_header_compiler=yes
1792else
1793 ac_header_compiler=no
1794fi
1795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1797$as_echo "$ac_header_compiler" >&6; }
1798
1799# Is the header present?
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1801$as_echo_n "checking $2 presence... " >&6; }
1802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_cpp "$LINENO"; then :
1807 ac_header_preproc=yes
1808else
1809 ac_header_preproc=no
1810fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001811rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1813$as_echo "$ac_header_preproc" >&6; }
1814
1815# So? What about this header?
1816case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1817 yes:no: )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1819$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1821$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1822 ;;
1823 no:yes:* )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1825$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1827$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1829$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1831$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1833$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001834( $as_echo "## --------------------------------------- ##
1835## Report this to https://bugs.python.org/ ##
1836## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 ) | sed "s/^/$as_me: WARNING: /" >&2
1838 ;;
1839esac
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 eval "$3=\$ac_header_compiler"
1846fi
1847eval ac_res=\$$3
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1849$as_echo "$ac_res" >&6; }
1850fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852
1853} # ac_fn_c_check_header_mongrel
1854
1855# ac_fn_c_try_run LINENO
1856# ----------------------
1857# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1858# that executables *can* be run.
1859ac_fn_c_try_run ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 if { { ac_try="$ac_link"
1863case "(($ac_try" in
1864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865 *) ac_try_echo=$ac_try;;
1866esac
1867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868$as_echo "$ac_try_echo"; } >&5
1869 (eval "$ac_link") 2>&5
1870 ac_status=$?
1871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1873 { { case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_try") 2>&5
1880 ac_status=$?
1881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1882 test $ac_status = 0; }; }; then :
1883 ac_retval=0
1884else
1885 $as_echo "$as_me: program exited with status $ac_status" >&5
1886 $as_echo "$as_me: failed program was:" >&5
1887sed 's/^/| /' conftest.$ac_ext >&5
1888
1889 ac_retval=$ac_status
1890fi
1891 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 as_fn_set_status $ac_retval
1894
1895} # ac_fn_c_try_run
1896
1897# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898# -------------------------------------------------------
1899# Tests whether HEADER exists and can be compiled using the include files in
1900# INCLUDES, setting the cache variable VAR accordingly.
1901ac_fn_c_check_header_compile ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912#include <$2>
1913_ACEOF
1914if ac_fn_c_try_compile "$LINENO"; then :
1915 eval "$3=yes"
1916else
1917 eval "$3=no"
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_header_compile
1927
Matthias Kloseb9621712010-04-24 17:59:49 +00001928# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929# -------------------------------------------
1930# Tests whether TYPE exists after having included INCLUDES, setting cache
1931# variable VAR accordingly.
1932ac_fn_c_check_type ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof ($2))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof (($2)))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 eval "$3=yes"
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_check_type
1981
Matthias Kloseb9621712010-04-24 17:59:49 +00001982# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1983# --------------------------------------------
1984# Tries to find the compile-time value of EXPR in a program that includes
1985# INCLUDES, setting VAR accordingly. Returns whether the value could be
1986# computed
1987ac_fn_c_compute_int ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 if test "$cross_compiling" = yes; then
1991 # Depending upon the size, compute the lo and hi bounds.
1992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_lo=0 ac_mid=0
2008 while :; do
2009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_hi=$ac_mid; break
2025else
2026 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2027 if test $ac_lo -le $ac_mid; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_hi=-1 ac_mid=-1
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002173if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002229
2230} # ac_fn_c_check_func
2231
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002232# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2233# ---------------------------------------------
2234# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2235# accordingly.
2236ac_fn_c_check_decl ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 as_decl_name=`echo $2|sed 's/ *(.*//'`
2240 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2242$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2243if eval \${$3+:} false; then :
2244 $as_echo_n "(cached) " >&6
2245else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252#ifndef $as_decl_name
2253#ifdef __cplusplus
2254 (void) $as_decl_use;
2255#else
2256 (void) $as_decl_name;
2257#endif
2258#endif
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
2274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275
2276} # ac_fn_c_check_decl
2277
Matthias Kloseb9621712010-04-24 17:59:49 +00002278# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2279# ----------------------------------------------------
2280# Tries to find if the field MEMBER exists in type AGGR, after including
2281# INCLUDES, setting cache variable VAR accordingly.
2282ac_fn_c_check_member ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2286$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$5
2293int
2294main ()
2295{
2296static $2 ac_aggr;
2297if (ac_aggr.$3)
2298return 0;
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303if ac_fn_c_try_compile "$LINENO"; then :
2304 eval "$4=yes"
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (sizeof ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 eval "$4=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$4
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002331 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002338It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002339generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002597See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Trent Nelson4d4ec652012-10-16 08:51:24 -04002687
Trent Nelson5595ab52012-10-17 04:47:31 -04002688if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689 # If we're building out-of-tree, we need to make sure the following
2690 # resources get picked up before their $srcdir counterparts.
2691 # Objects/ -> typeslots.inc
2692 # Include/ -> Python-ast.h, graminit.h
2693 # Python/ -> importlib.h
2694 # (A side effect of this is that these resources will automatically be
2695 # regenerated when building out-of-tree, regardless of whether or not
2696 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2697 # off.)
2698 BASECPPFLAGS="-IObjects -IInclude -IPython"
2699else
2700 BASECPPFLAGS=""
2701fi
2702
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703
2704
2705
2706
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002707if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708then
2709# Extract the first word of "hg", so it can be a program name with args.
2710set dummy hg; ac_word=$2
2711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002713if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714 $as_echo_n "(cached) " >&6
2715else
2716 if test -n "$HAS_HG"; then
2717 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2718else
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726 ac_cv_prog_HAS_HG="found"
2727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
2731 done
2732IFS=$as_save_IFS
2733
2734 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2735fi
2736fi
2737HAS_HG=$ac_cv_prog_HAS_HG
2738if test -n "$HAS_HG"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2740$as_echo "$HAS_HG" >&6; }
2741else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743$as_echo "no" >&6; }
2744fi
2745
2746
2747else
2748HAS_HG=no-repository
2749fi
2750if test $HAS_HG = found
2751then
2752 HGVERSION="hg id -i \$(srcdir)"
2753 HGTAG="hg id -t \$(srcdir)"
2754 HGBRANCH="hg id -b \$(srcdir)"
2755else
2756 HGVERSION=""
2757 HGTAG=""
2758 HGBRANCH=""
2759fi
2760
2761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
2764
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002765ac_aux_dir=
2766for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2767 if test -f "$ac_dir/install-sh"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/install-sh -c"
2770 break
2771 elif 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/shtool"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/shtool install -c"
2778 break
2779 fi
2780done
2781if test -z "$ac_aux_dir"; then
2782 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2783fi
2784
2785# These three variables are undocumented and unsupported,
2786# and are intended to be withdrawn in a future Autoconf release.
2787# They can cause serious problems if a builder's source tree is in a directory
2788# whose full name contains unusual characters.
2789ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2790ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2791ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2792
2793
2794# Make sure we can run config.sub.
2795$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2796 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2797
2798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2799$as_echo_n "checking build system type... " >&6; }
2800if ${ac_cv_build+:} false; then :
2801 $as_echo_n "(cached) " >&6
2802else
2803 ac_build_alias=$build_alias
2804test "x$ac_build_alias" = x &&
2805 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2806test "x$ac_build_alias" = x &&
2807 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2808ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2809 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2810
2811fi
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2813$as_echo "$ac_cv_build" >&6; }
2814case $ac_cv_build in
2815*-*-*) ;;
2816*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2817esac
2818build=$ac_cv_build
2819ac_save_IFS=$IFS; IFS='-'
2820set x $ac_cv_build
2821shift
2822build_cpu=$1
2823build_vendor=$2
2824shift; shift
2825# Remember, the first character of IFS is used to create $*,
2826# except with old shells:
2827build_os=$*
2828IFS=$ac_save_IFS
2829case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2830
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2833$as_echo_n "checking host system type... " >&6; }
2834if ${ac_cv_host+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 if test "x$host_alias" = x; then
2838 ac_cv_host=$ac_cv_build
2839else
2840 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2841 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2842fi
2843
2844fi
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2846$as_echo "$ac_cv_host" >&6; }
2847case $ac_cv_host in
2848*-*-*) ;;
2849*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2850esac
2851host=$ac_cv_host
2852ac_save_IFS=$IFS; IFS='-'
2853set x $ac_cv_host
2854shift
2855host_cpu=$1
2856host_vendor=$2
2857shift; shift
2858# Remember, the first character of IFS is used to create $*,
2859# except with old shells:
2860host_os=$*
2861IFS=$ac_save_IFS
2862case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2863
2864
2865
doko@python.orga10e4a92013-01-25 18:45:12 +01002866
2867
Ned Deilyfcbc2462014-08-22 13:32:49 -07002868# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2869rm -f pybuilddir.txt
2870
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002871for ac_prog in python$PACKAGE_VERSION python3 python
2872do
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874set dummy $ac_prog; ac_word=$2
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2876$as_echo_n "checking for $ac_word... " >&6; }
2877if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2878 $as_echo_n "(cached) " >&6
2879else
2880 if test -n "$PYTHON_FOR_GEN"; then
2881 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2882else
2883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2884for as_dir in $PATH
2885do
2886 IFS=$as_save_IFS
2887 test -z "$as_dir" && as_dir=.
2888 for ac_exec_ext in '' $ac_executable_extensions; do
2889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2890 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2892 break 2
2893 fi
2894done
2895 done
2896IFS=$as_save_IFS
2897
2898fi
2899fi
2900PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2901if test -n "$PYTHON_FOR_GEN"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2903$as_echo "$PYTHON_FOR_GEN" >&6; }
2904else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2906$as_echo "no" >&6; }
2907fi
2908
2909
2910 test -n "$PYTHON_FOR_GEN" && break
2911done
2912test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2913
2914if test "$PYTHON_FOR_GEN" = not-found; then
2915 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2916 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2917 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2918fi
2919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002937 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:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002938 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002939 # Used to comment out stuff for rebuilding generated files
2940 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002945 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Martin Pantereac67be2016-07-28 01:28:27 +00002950
Benjamin Petersond23f8222009-04-05 19:13:16 +00002951if test "$prefix" != "/"; then
2952 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
2957
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002958# We don't use PACKAGE_ variables, and they cause conflicts
2959# with other autoconf-based packages that include Python.h
2960grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2961rm confdefs.h
2962mv confdefs.h.new confdefs.h
2963
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002964
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002965VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002966
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002967# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002968
2969SOVERSION=1.0
2970
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971# The later defininition of _XOPEN_SOURCE disables certain features
2972# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002975
2976
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982
2983
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2985# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989
2990
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002995
2996
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2999# them.
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002
3003
3004
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003005define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003007# Arguments passed to configure.
3008
3009CONFIG_ARGS="$ac_configure_args"
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3012$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003013# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003014if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003015 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 case $enableval in
3017 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 # Locate the best usable SDK, see Mac/README.txt for more
3019 # information
3020 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003021 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3024 if test ! -d "${enableval}"
3025 then
3026 enableval=/
3027 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
3031 case $enableval in
3032 no)
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035 ;;
3036 *)
3037 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 if test ! -d "${UNIVERSALSDK}"
3039 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003040 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ;;
3043 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046else
3047
3048 UNIVERSALSDK=
3049 enable_universalsdk=
3050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053if test -n "${UNIVERSALSDK}"
3054then
Matthias Kloseb9621712010-04-24 17:59:49 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3056$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057else
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003063
Ned Deily87adb6e2013-10-18 21:09:56 -07003064ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003073 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087 UNIVERSAL_ARCHS="$withval"
3088
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089fi
3090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091if test -n "${UNIVERSALSDK}"
3092then
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3095else
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097$as_echo "no" >&6; }
3098fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003100
3101# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103 withval=$with_framework_name;
3104 PYTHONFRAMEWORK=${withval}
3105 PYTHONFRAMEWORKDIR=${withval}.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3107
3108else
3109
3110 PYTHONFRAMEWORK=Python
3111 PYTHONFRAMEWORKDIR=Python.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3113
3114fi
3115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003117if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003119 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003120 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003121 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003122 esac
3123 case $enableval in
3124 no)
3125 PYTHONFRAMEWORK=
3126 PYTHONFRAMEWORKDIR=no-framework
3127 PYTHONFRAMEWORKPREFIX=
3128 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST=
3130 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 FRAMEWORKALTINSTALLFIRST=
3132 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003148 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003151 if test "x${prefix}" = "xNONE" ; then
3152 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
3158 case "${enableval}" in
3159 /System*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 if test "${prefix}" = "NONE" ; then
3162 # See below
3163 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3164 fi
3165 ;;
3166
3167 /Library*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 ;;
3170
3171 */Library/Frameworks)
3172 MDIR="`dirname "${enableval}"`"
3173 MDIR="`dirname "${MDIR}"`"
3174 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3175
3176 if test "${prefix}" = "NONE"; then
3177 # User hasn't specified the
3178 # --prefix option, but wants to install
3179 # the framework in a non-default location,
3180 # ensure that the compatibility links get
3181 # installed relative to that prefix as well
3182 # instead of in /usr/local.
3183 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3184 fi
3185 ;;
3186
3187 *)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 ;;
3190 esac
3191
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3201
3202 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3203
Jack Jansene578a632001-08-15 01:27:14 +00003204 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Guido van Rossum563e7081996-09-10 18:20:48 +00003206else
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Jack Jansene578a632001-08-15 01:27:14 +00003208 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORKPREFIX=
3211 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 FRAMEWORKINSTALLFIRST=
3213 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 FRAMEWORKALTINSTALLFIRST=
3215 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003216 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Ned Deilyb8f944f2013-11-21 22:42:25 -08003239
Jack Jansene578a632001-08-15 01:27:14 +00003240##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003241## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003242## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003243##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244# Set name for machine-dependent library files
3245
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3247$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248if test -z "$MACHDEP"
3249then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 # avoid using uname for cross builds
3251 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003252 # ac_sys_system and ac_sys_release are used for setting
3253 # a lot of different things including 'define_xopen_source'
3254 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 case "$host" in
3256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
3262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003284 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003285 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003286 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003287 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3313fi
3314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3316# disable features if it is defined, without any means to access these
3317# features as extensions. For these systems, we skip the definition of
3318# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3319# some feature, make sure there is no alternative way to access this
3320# feature. Also, when using wildcards, make sure you have verified the
3321# need for not defining _XOPEN_SOURCE on all systems matching the
3322# wildcard, and that the wildcard does not include future systems
3323# (which may remove their limitations).
3324case $ac_sys_system/$ac_sys_release in
3325 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3326 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003327 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003328 # In addition, Stefan Krah confirms that issue #1244610 exists through
3329 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003330 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331 define_xopen_source=no
3332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3333 # also defined. This can be overridden by defining _BSD_SOURCE
3334 # As this has a different meaning on Linux, only define it on OpenBSD
3335
Matthias Kloseb9621712010-04-24 17:59:49 +00003336$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337
3338 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345
3346 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003347 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3348 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3349 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003350 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 +00003351 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003352 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3353 # request to enable features supported by the standard as a request
3354 # to disable features not supported by the standard. The best way
3355 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3356 # entirely and define __EXTENSIONS__ instead.
3357 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003358 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3360 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003361 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003362 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 define_xopen_source=no;;
3364 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003368 # On FreeBSD 4, the math functions C89 does not cover are never defined
3369 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3370 FreeBSD/4.*)
3371 define_xopen_source=no;;
3372 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3373 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3374 # identifies itself as Darwin/7.*
3375 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # disables platform specific features beyond repair.
3377 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # has no effect, don't bother defining them
3379 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003380 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003381 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3384 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3385 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003386 AIX/4)
3387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 AIX/5)
3389 if test `uname -r` -eq 1; then
3390 define_xopen_source=no
3391 fi
3392 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003393 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3394 # defining NI_NUMERICHOST.
3395 QNX/6.3.2)
3396 define_xopen_source=no
3397 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003398
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399esac
3400
3401if test $define_xopen_source = yes
3402then
Victor Stinner14d098d2011-09-07 22:29:43 +02003403 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Victor Stinner14d098d2011-09-07 22:29:43 +02003405$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3409 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3410 # several APIs are not declared. Since this is also needed in some
3411 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Matthias Kloseb9621712010-04-24 17:59:49 +00003413$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003416
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003417$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003419fi
3420
Christian Heimes647cd872013-12-07 23:39:33 +01003421# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3422case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003423 hp*|HP*)
3424 define_stdc_a1=yes;;
3425 *)
3426 define_stdc_a1=no;;
3427esac
3428
3429if test $define_stdc_a1 = yes
3430then
Christian Heimes647cd872013-12-07 23:39:33 +01003431
3432$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3433
Christian Heimesb02bcae2013-12-08 15:21:08 +01003434fi
Christian Heimes647cd872013-12-07 23:39:33 +01003435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003439# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3456# it may influence the way we can build extensions, so distutils
3457# needs to check it
3458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459
Jack Jansen6b08a402004-06-03 12:41:45 +00003460CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003462
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003464
3465# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3466# for debug/optimization stuff. BASECFLAGS is for flags that are required
3467# just to get things to compile and link. Users are free to override OPT
3468# when running configure or make. The build should not break if they do.
3469# BASECFLAGS should generally not be messed with, however.
3470
3471# XXX shouldn't some/most/all of this code be merged with the stuff later
3472# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3474$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003480 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481 without_gcc=yes;;
3482 yes) CC=gcc
3483 without_gcc=no;;
3484 *) CC=$withval
3485 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003490 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003491 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003492 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003493 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494fi
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3497$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003498
Zachary Ware5af85642015-12-21 12:09:17 -06003499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3500$as_echo_n "checking for --with-icc... " >&6; }
3501
3502# Check whether --with-icc was given.
3503if test "${with_icc+set}" = set; then :
3504 withval=$with_icc;
3505 case $withval in
3506 no) CC=${CC:-cc}
3507 with_icc=no;;
3508 yes) CC=icc
3509 CXX=icpc
3510 with_icc=yes;;
3511 *) CC=$withval
3512 with_icc=$withval;;
3513 esac
3514else
3515
3516 with_icc=no
3517fi
3518
3519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3520$as_echo "$with_icc" >&6; }
3521
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522# If the user switches compilers, we can't believe the cache
3523if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3524then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003525 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003526(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527fi
3528
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003529# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3530# when the compiler supports them, but we don't always want -O2, and
3531# we set -g later.
3532if test -z "$CFLAGS"; then
3533 CFLAGS=
3534fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535
3536if test "$ac_sys_system" = "Darwin"
3537then
3538 # Compiler selection on MacOSX is more complicated than
3539 # AC_PROG_CC can handle, see Mac/README.txt for more
3540 # information
3541 if test -z "${CC}"
3542 then
3543 found_gcc=
3544 found_clang=
3545 as_save_IFS=$IFS; IFS=:
3546 for as_dir in $PATH
3547 do
3548 IFS=$as_save_IFS
3549 if test -x $as_dir/gcc; then
3550 if test -z "${found_gcc}"; then
3551 found_gcc=$as_dir/gcc
3552 fi
3553 fi
3554 if test -x $as_dir/clang; then
3555 if test -z "${found_clang}"; then
3556 found_clang=$as_dir/clang
3557 fi
3558 fi
3559 done
3560 IFS=$as_save_IFS
3561
3562 if test -n "$found_gcc" -a -n "$found_clang"
3563 then
3564 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3565 then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3567$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3568 CC="$found_clang"
3569 CXX="$found_clang++"
3570 fi
3571
3572
3573 elif test -z "$found_gcc" -a -n "$found_clang"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3576$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3577 CC="$found_clang"
3578 CXX="$found_clang++"
3579
3580 elif test -z "$found_gcc" -a -z "$found_clang"
3581 then
3582 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3583 if test -n "${found_clang}"
3584 then
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3586$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3587 CC="${found_clang}"
3588 CXX="`/usr/bin/xcrun -find clang++`"
3589
3590 # else: use default behaviour
3591 fi
3592 fi
3593 fi
3594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595ac_ext=c
3596ac_cpp='$CPP $CPPFLAGS'
3597ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3598ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3599ac_compiler_gnu=$ac_cv_c_compiler_gnu
3600if test -n "$ac_tool_prefix"; then
3601 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3602set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3604$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003605if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003607else
3608 if test -n "$CC"; then
3609 ac_cv_prog_CC="$CC" # Let the user override the test.
3610else
Martin v. Löwis11437992002-04-12 09:54:03 +00003611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $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 +00003620 break 2
3621 fi
3622done
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003625
Jack Jansendd19cf82001-12-06 22:36:17 +00003626fi
3627fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003628CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003629if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3631$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003632else
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3634$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637
Martin v. Löwis11437992002-04-12 09:54:03 +00003638fi
3639if test -z "$ac_cv_prog_CC"; then
3640 ac_ct_CC=$CC
3641 # Extract the first word of "gcc", so it can be a program name with args.
3642set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3644$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003645if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
3648 if test -n "$ac_ct_CC"; then
3649 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3650else
3651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652for as_dir in $PATH
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 $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 +00003660 break 2
3661 fi
3662done
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003665
3666fi
3667fi
3668ac_ct_CC=$ac_cv_prog_ac_ct_CC
3669if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3671$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672else
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677 if test "x$ac_ct_CC" = x; then
3678 CC=""
3679 else
3680 case $cross_compiling:$ac_tool_warned in
3681yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003682{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3683$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684ac_tool_warned=yes ;;
3685esac
3686 CC=$ac_ct_CC
3687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688else
3689 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003690fi
3691
Jack Jansendd19cf82001-12-06 22:36:17 +00003692if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 if test -n "$ac_tool_prefix"; then
3694 # 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 +00003695set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003698if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003700else
3701 if test -n "$CC"; then
3702 ac_cv_prog_CC="$CC" # Let the user override the test.
3703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705for as_dir in $PATH
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $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 +00003713 break 2
3714 fi
3715done
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003718
3719fi
3720fi
3721CC=$ac_cv_prog_CC
3722if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3724$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725else
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3727$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003728fi
3729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003732fi
3733if test -z "$CC"; then
3734 # Extract the first word of "cc", so it can be a program name with args.
3735set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003738if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
3741 if test -n "$CC"; then
3742 ac_cv_prog_CC="$CC" # Let the user override the test.
3743else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746for as_dir in $PATH
3747do
3748 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3753 ac_prog_rejected=yes
3754 continue
3755 fi
3756 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $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 +00003758 break 2
3759 fi
3760done
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764if test $ac_prog_rejected = yes; then
3765 # We found a bogon in the path, so make sure we never use it.
3766 set dummy $ac_cv_prog_CC
3767 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 # We chose a different compiler from the bogus one.
3770 # However, it has the same basename, so the bogon will be chosen
3771 # first if we set CC to just the basename; use the full file name.
3772 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003773 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 fi
3775fi
3776fi
3777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3781$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782else
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3784$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785fi
3786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789if test -z "$CC"; then
3790 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 do
3793 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3794set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003797if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003799else
3800 if test -n "$CC"; then
3801 ac_cv_prog_CC="$CC" # Let the user override the test.
3802else
Martin v. Löwis11437992002-04-12 09:54:03 +00003803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3804for as_dir in $PATH
3805do
3806 IFS=$as_save_IFS
3807 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $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 +00003812 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814done
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
3818fi
3819fi
3820CC=$ac_cv_prog_CC
3821if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3823$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003827fi
3828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 test -n "$CC" && break
3831 done
3832fi
3833if test -z "$CC"; then
3834 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003836do
3837 # Extract the first word of "$ac_prog", so it can be a program name with args.
3838set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3840$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003841if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
3844 if test -n "$ac_ct_CC"; then
3845 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3846else
3847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848for as_dir in $PATH
3849do
3850 IFS=$as_save_IFS
3851 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 $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 +00003856 break 2
3857 fi
3858done
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863fi
3864ac_ct_CC=$ac_cv_prog_ac_ct_CC
3865if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3867$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868else
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 test -n "$ac_ct_CC" && break
3875done
Michael W. Hudson54241132001-12-07 15:38:26 +00003876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877 if test "x$ac_ct_CC" = x; then
3878 CC=""
3879 else
3880 case $cross_compiling:$ac_tool_warned in
3881yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3883$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884ac_tool_warned=yes ;;
3885esac
3886 CC=$ac_ct_CC
3887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003888fi
3889
3890fi
3891
3892
Matthias Kloseb9621712010-04-24 17:59:49 +00003893test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003895as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003896See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
3898# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003899$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3900set X $ac_compile
3901ac_compiler=$2
3902for ac_option in --version -v -V -qversion; do
3903 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904case "(($ac_try" in
3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906 *) ac_try_echo=$ac_try;;
3907esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3909$as_echo "$ac_try_echo"; } >&5
3910 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 if test -s conftest.err; then
3913 sed '10a\
3914... rest of stderr output deleted ...
3915 10q' conftest.err >conftest.er1
3916 cat conftest.er1 >&5
3917 fi
3918 rm -f conftest.er1 conftest.err
3919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3920 test $ac_status = 0; }
3921done
Martin v. Löwis11437992002-04-12 09:54:03 +00003922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003924/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003925
Martin v. Löwis11437992002-04-12 09:54:03 +00003926int
3927main ()
3928{
3929
3930 ;
3931 return 0;
3932}
3933_ACEOF
3934ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003935ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003936# Try to create an executable without -o first, disregard a.out.
3937# It will help us diagnose broken compilers, and finding out an intuition
3938# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3940$as_echo_n "checking whether the C compiler works... " >&6; }
3941ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3942
3943# The possible output files:
3944ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946ac_rmfiles=
3947for ac_file in $ac_files
3948do
3949 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 Wouters47b49bf2007-08-30 22:15:33 +00003951 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3952 esac
3953done
3954rm -f $ac_rmfiles
3955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957case "(($ac_try" in
3958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3959 *) ac_try_echo=$ac_try;;
3960esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3962$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3966 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3968# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3969# in a Makefile. We should not override ac_cv_exeext if it was cached,
3970# so that the user can short-circuit this test for compilers unknown to
3971# Autoconf.
3972for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003973do
3974 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977 ;;
3978 [ab].out )
3979 # We found the default executable, but exeext='' is most
3980 # certainly right.
3981 break;;
3982 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 then :; else
3985 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3986 fi
3987 # We set ac_cv_exeext here because the later test for it is not
3988 # safe: cross compilers may not add the suffix if given an `-o'
3989 # argument, so we may need to know it at that point already.
3990 # Even if this section looks crufty: it has the advantage of
3991 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992 break;;
3993 * )
3994 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 esac
3996done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997test "$ac_cv_exeext" = no && ac_cv_exeext=
3998
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003999else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 ac_file=''
4001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004002if test -z "$ac_file"; then :
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4004$as_echo "no" >&6; }
4005$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004006sed 's/^/| /' conftest.$ac_ext >&5
4007
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004010as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004011See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004012else
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4014$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4017$as_echo_n "checking for C compiler default output file name... " >&6; }
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4019$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021
Matthias Kloseb9621712010-04-24 17:59:49 +00004022rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4025$as_echo_n "checking for suffix of executables... " >&6; }
4026if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4038# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4039# work properly (i.e., refer to `conftest.exe'), while it won't with
4040# `rm'.
4041for ac_file in conftest.exe conftest conftest.*; do
4042 test -f "$ac_file" || continue
4043 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4046 break;;
4047 * ) break;;
4048 esac
4049done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050else
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004053as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004054See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004056rm -f conftest conftest$ac_cv_exeext
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4058$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059
4060rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004061EXEEXT=$ac_cv_exeext
4062ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4064/* end confdefs.h. */
4065#include <stdio.h>
4066int
4067main ()
4068{
4069FILE *f = fopen ("conftest.out", "w");
4070 return ferror (f) || fclose (f) != 0;
4071
4072 ;
4073 return 0;
4074}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004076ac_clean_files="$ac_clean_files conftest.out"
4077# Check that the compiler produces executables we can run. If not, either
4078# the compiler is broken, or we cross compile.
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4080$as_echo_n "checking whether we are cross compiling... " >&6; }
4081if test "$cross_compiling" != yes; then
4082 { { ac_try="$ac_link"
4083case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086esac
4087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088$as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_link") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }
4093 if { ac_try='./conftest$ac_cv_exeext'
4094 { { case "(($ac_try" in
4095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4096 *) ac_try_echo=$ac_try;;
4097esac
4098eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4099$as_echo "$ac_try_echo"; } >&5
4100 (eval "$ac_try") 2>&5
4101 ac_status=$?
4102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4103 test $ac_status = 0; }; }; then
4104 cross_compiling=no
4105 else
4106 if test "$cross_compiling" = maybe; then
4107 cross_compiling=yes
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004111as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004112If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004113See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 fi
4115 fi
4116fi
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4118$as_echo "$cross_compiling" >&6; }
4119
4120rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4121ac_clean_files=$ac_clean_files_save
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4123$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004124if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo_n "(cached) " >&6
4126else
4127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128/* end confdefs.h. */
4129
4130int
4131main ()
4132{
4133
4134 ;
4135 return 0;
4136}
4137_ACEOF
4138rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004139if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150 for ac_file in conftest.o conftest.obj conftest.*; do
4151 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4155 break;;
4156 esac
4157done
4158else
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004160sed 's/^/| /' conftest.$ac_ext >&5
4161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004164as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004165See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004167rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4170$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171OBJEXT=$ac_cv_objext
4172ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4174$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004175if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Martin v. Löwis11437992002-04-12 09:54:03 +00004181int
4182main ()
4183{
4184#ifndef __GNUC__
4185 choke me
4186#endif
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004193 ac_compiler_gnu=yes
4194else
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004198ac_cv_c_compiler_gnu=$ac_compiler_gnu
4199
4200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4202$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4203if test $ac_compiler_gnu = yes; then
4204 GCC=yes
4205else
4206 GCC=
4207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208ac_test_CFLAGS=${CFLAGS+set}
4209ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4211$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004212if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004214else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 ac_save_c_werror_flag=$ac_c_werror_flag
4216 ac_c_werror_flag=yes
4217 ac_cv_prog_cc_g=no
4218 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
Martin v. Löwis11437992002-04-12 09:54:03 +00004222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004231 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 CFLAGS=""
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246
Matthias Kloseb9621712010-04-24 17:59:49 +00004247else
4248 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251/* end confdefs.h. */
4252
4253int
4254main ()
4255{
4256
4257 ;
4258 return 0;
4259}
4260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004261if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4269 ac_c_werror_flag=$ac_save_c_werror_flag
4270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4272$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004275elif test $ac_cv_prog_cc_g = yes; then
4276 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004277 CFLAGS="-g -O2"
4278 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280 fi
4281else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004282 if test "$GCC" = yes; then
4283 CFLAGS="-O2"
4284 else
4285 CFLAGS=
4286 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4289$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004290if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004292else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004294ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296/* end confdefs.h. */
4297#include <stdarg.h>
4298#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004299struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4301struct buf { int x; };
4302FILE * (*rcsopen) (struct buf *, struct stat *, int);
4303static char *e (p, i)
4304 char **p;
4305 int i;
4306{
4307 return p[i];
4308}
4309static char *f (char * (*g) (char **, int), char **p, ...)
4310{
4311 char *s;
4312 va_list v;
4313 va_start (v,p);
4314 s = g (p, va_arg (v,int));
4315 va_end (v);
4316 return s;
4317}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318
4319/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4320 function prototypes and stuff, but not '\xHH' hex character constants.
4321 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4324 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4329 inside strings and character constants. */
4330#define FOO(x) 'x'
4331int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4332
Skip Montanaro6dead952003-09-25 14:50:04 +00004333int test (int i, double x);
4334struct s1 {int (*f) (int a);};
4335struct s2 {int (*f) (double a);};
4336int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4337int argc;
4338char **argv;
4339int
4340main ()
4341{
4342return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4343 ;
4344 return 0;
4345}
4346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4348 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004349do
4350 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f core conftest.err conftest.$ac_objext
4355 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004356done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004358CC=$ac_save_CC
4359
4360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361# AC_CACHE_VAL
4362case "x$ac_cv_prog_cc_c89" in
4363 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4365$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4368$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004369 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4372$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004373esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004374if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004375
Matthias Kloseb9621712010-04-24 17:59:49 +00004376fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004377
Martin v. Löwis11437992002-04-12 09:54:03 +00004378ac_ext=c
4379ac_cpp='$CPP $CPPFLAGS'
4380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4382ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4390$as_echo_n "checking how to run the C preprocessor... " >&6; }
4391# On Suns, sometimes $CPP names a directory.
4392if test -n "$CPP" && test -d "$CPP"; then
4393 CPP=
4394fi
4395if test -z "$CPP"; then
4396 if ${ac_cv_prog_CPP+:} false; then :
4397 $as_echo_n "(cached) " >&6
4398else
4399 # Double quotes because CPP needs to be expanded
4400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4401 do
4402 ac_preproc_ok=false
4403for ac_c_preproc_warn_flag in '' yes
4404do
4405 # Use a header file that comes with gcc, so configuring glibc
4406 # with a fresh cross-compiler works.
4407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4408 # <limits.h> exists even on freestanding compilers.
4409 # On the NeXT, cc -E runs the code through the compiler's parser,
4410 # not just through cpp. "Syntax error" is here to catch this case.
4411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412/* end confdefs.h. */
4413#ifdef __STDC__
4414# include <limits.h>
4415#else
4416# include <assert.h>
4417#endif
4418 Syntax error
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421
4422else
4423 # Broken: fails on valid input.
4424continue
4425fi
4426rm -f conftest.err conftest.i conftest.$ac_ext
4427
4428 # OK, works on sane cases. Now check whether nonexistent headers
4429 # can be detected and how.
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431/* end confdefs.h. */
4432#include <ac_nonexistent.h>
4433_ACEOF
4434if ac_fn_c_try_cpp "$LINENO"; then :
4435 # Broken: success on invalid input.
4436continue
4437else
4438 # Passes both tests.
4439ac_preproc_ok=:
4440break
4441fi
4442rm -f conftest.err conftest.i conftest.$ac_ext
4443
4444done
4445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4446rm -f conftest.i conftest.err conftest.$ac_ext
4447if $ac_preproc_ok; then :
4448 break
4449fi
4450
4451 done
4452 ac_cv_prog_CPP=$CPP
4453
4454fi
4455 CPP=$ac_cv_prog_CPP
4456else
4457 ac_cv_prog_CPP=$CPP
4458fi
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4460$as_echo "$CPP" >&6; }
4461ac_preproc_ok=false
4462for ac_c_preproc_warn_flag in '' yes
4463do
4464 # Use a header file that comes with gcc, so configuring glibc
4465 # with a fresh cross-compiler works.
4466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4467 # <limits.h> exists even on freestanding compilers.
4468 # On the NeXT, cc -E runs the code through the compiler's parser,
4469 # not just through cpp. "Syntax error" is here to catch this case.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#ifdef __STDC__
4473# include <limits.h>
4474#else
4475# include <assert.h>
4476#endif
4477 Syntax error
4478_ACEOF
4479if ac_fn_c_try_cpp "$LINENO"; then :
4480
4481else
4482 # Broken: fails on valid input.
4483continue
4484fi
4485rm -f conftest.err conftest.i conftest.$ac_ext
4486
4487 # OK, works on sane cases. Now check whether nonexistent headers
4488 # can be detected and how.
4489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490/* end confdefs.h. */
4491#include <ac_nonexistent.h>
4492_ACEOF
4493if ac_fn_c_try_cpp "$LINENO"; then :
4494 # Broken: success on invalid input.
4495continue
4496else
4497 # Passes both tests.
4498ac_preproc_ok=:
4499break
4500fi
4501rm -f conftest.err conftest.i conftest.$ac_ext
4502
4503done
4504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4505rm -f conftest.i conftest.err conftest.$ac_ext
4506if $ac_preproc_ok; then :
4507
4508else
4509 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4511as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4512See \`config.log' for more details" "$LINENO" 5; }
4513fi
4514
4515ac_ext=c
4516ac_cpp='$CPP $CPPFLAGS'
4517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4519ac_compiler_gnu=$ac_cv_c_compiler_gnu
4520
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4522$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4523if ${ac_cv_path_GREP+:} false; then :
4524 $as_echo_n "(cached) " >&6
4525else
4526 if test -z "$GREP"; then
4527 ac_path_GREP_found=false
4528 # Loop through the user's path and test for each of PROGNAME-LIST
4529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4530for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4531do
4532 IFS=$as_save_IFS
4533 test -z "$as_dir" && as_dir=.
4534 for ac_prog in grep ggrep; do
4535 for ac_exec_ext in '' $ac_executable_extensions; do
4536 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4537 as_fn_executable_p "$ac_path_GREP" || continue
4538# Check for GNU ac_path_GREP and select it if it is found.
4539 # Check for GNU $ac_path_GREP
4540case `"$ac_path_GREP" --version 2>&1` in
4541*GNU*)
4542 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4543*)
4544 ac_count=0
4545 $as_echo_n 0123456789 >"conftest.in"
4546 while :
4547 do
4548 cat "conftest.in" "conftest.in" >"conftest.tmp"
4549 mv "conftest.tmp" "conftest.in"
4550 cp "conftest.in" "conftest.nl"
4551 $as_echo 'GREP' >> "conftest.nl"
4552 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4553 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4554 as_fn_arith $ac_count + 1 && ac_count=$as_val
4555 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4556 # Best one so far, save it but keep looking for a better one
4557 ac_cv_path_GREP="$ac_path_GREP"
4558 ac_path_GREP_max=$ac_count
4559 fi
4560 # 10*(2^10) chars as input seems more than enough
4561 test $ac_count -gt 10 && break
4562 done
4563 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4564esac
4565
4566 $ac_path_GREP_found && break 3
4567 done
4568 done
4569 done
4570IFS=$as_save_IFS
4571 if test -z "$ac_cv_path_GREP"; then
4572 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4573 fi
4574else
4575 ac_cv_path_GREP=$GREP
4576fi
4577
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4580$as_echo "$ac_cv_path_GREP" >&6; }
4581 GREP="$ac_cv_path_GREP"
4582
4583
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004584
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585
4586
Matthias Kloseb9621712010-04-24 17:59:49 +00004587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4588$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004590# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
4594 case $withval in
4595 no) with_cxx_main=no
4596 MAINCC='$(CC)';;
4597 yes) with_cxx_main=yes
4598 MAINCC='$(CXX)';;
4599 *) with_cxx_main=yes
4600 MAINCC=$withval
4601 if test -z "$CXX"
4602 then
4603 CXX=$withval
4604 fi;;
4605 esac
4606else
4607
4608 with_cxx_main=no
4609 MAINCC='$(CC)'
4610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004611fi
4612
Matthias Kloseb9621712010-04-24 17:59:49 +00004613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4614$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615
4616preset_cxx="$CXX"
4617if test -z "$CXX"
4618then
4619 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004620 gcc) if test -n "$ac_tool_prefix"; then
4621 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4622set dummy ${ac_tool_prefix}g++; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_CXX+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 case $CXX in
4629 [\\/]* | ?:[\\/]*)
4630 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4631 ;;
4632 *)
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in notfound
4635do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642 break 2
4643 fi
4644done
4645 done
4646IFS=$as_save_IFS
4647
4648 ;;
4649esac
4650fi
4651CXX=$ac_cv_path_CXX
4652if test -n "$CXX"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4654$as_echo "$CXX" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661fi
4662if test -z "$ac_cv_path_CXX"; then
4663 ac_pt_CXX=$CXX
4664 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004665set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668if ${ac_cv_path_ac_pt_CXX+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 case $ac_pt_CXX in
4672 [\\/]* | ?:[\\/]*)
4673 ac_cv_path_ac_pt_CXX="$ac_pt_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 Lagerwall1b863eb2012-10-29 17:31:54 +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_ac_pt_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
4694ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4695if test -n "$ac_pt_CXX"; then
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4697$as_echo "$ac_pt_CXX" >&6; }
4698else
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703 if test "x$ac_pt_CXX" = x; then
4704 CXX="g++"
4705 else
4706 case $cross_compiling:$ac_tool_warned in
4707yes:)
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4710ac_tool_warned=yes ;;
4711esac
4712 CXX=$ac_pt_CXX
4713 fi
4714else
4715 CXX="$ac_cv_path_CXX"
4716fi
4717 ;;
4718 cc) if test -n "$ac_tool_prefix"; then
4719 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4720set dummy ${ac_tool_prefix}c++; ac_word=$2
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004723if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725else
4726 case $CXX in
4727 [\\/]* | ?:[\\/]*)
4728 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4729 ;;
4730 *)
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in notfound
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 break 2
4741 fi
4742done
Matthias Kloseb9621712010-04-24 17:59:49 +00004743 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004744IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 ;;
4747esac
4748fi
4749CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004750if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4752$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753else
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004757
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758
4759fi
4760if test -z "$ac_cv_path_CXX"; then
4761 ac_pt_CXX=$CXX
4762 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 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 +00004772 ;;
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 Lagerwall646eb1e2012-10-29 17:35:57 +00004780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004781 ac_cv_path_ac_pt_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
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004792ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4793if test -n "$ac_pt_CXX"; then
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4795$as_echo "$ac_pt_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 if test "x$ac_pt_CXX" = x; then
4802 CXX="c++"
4803 else
4804 case $cross_compiling:$ac_tool_warned in
4805yes:)
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4807$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4808ac_tool_warned=yes ;;
4809esac
4810 CXX=$ac_pt_CXX
4811 fi
4812else
4813 CXX="$ac_cv_path_CXX"
4814fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 clang|*/clang) if test -n "$ac_tool_prefix"; then
4817 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4818set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4820$as_echo_n "checking for $ac_word... " >&6; }
4821if ${ac_cv_path_CXX+:} false; then :
4822 $as_echo_n "(cached) " >&6
4823else
4824 case $CXX in
4825 [\\/]* | ?:[\\/]*)
4826 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4827 ;;
4828 *)
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in notfound
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
4834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004836 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4838 break 2
4839 fi
4840done
4841 done
4842IFS=$as_save_IFS
4843
Ned Deilycbfb9a52012-06-23 16:02:19 -07004844 ;;
4845esac
4846fi
4847CXX=$ac_cv_path_CXX
4848if test -n "$CXX"; then
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4850$as_echo "$CXX" >&6; }
4851else
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4853$as_echo "no" >&6; }
4854fi
4855
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856
4857fi
4858if test -z "$ac_cv_path_CXX"; then
4859 ac_pt_CXX=$CXX
4860 # Extract the first word of "clang++", so it can be a program name with args.
4861set dummy clang++; ac_word=$2
4862{ $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_ac_pt_CXX+:} false; then :
4865 $as_echo_n "(cached) " >&6
4866else
4867 case $ac_pt_CXX in
4868 [\\/]* | ?:[\\/]*)
4869 ac_cv_path_ac_pt_CXX="$ac_pt_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
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 ac_cv_path_ac_pt_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
4887 ;;
4888esac
4889fi
4890ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4891if test -n "$ac_pt_CXX"; then
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4893$as_echo "$ac_pt_CXX" >&6; }
4894else
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899 if test "x$ac_pt_CXX" = x; then
4900 CXX="clang++"
4901 else
4902 case $cross_compiling:$ac_tool_warned in
4903yes:)
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4906ac_tool_warned=yes ;;
4907esac
4908 CXX=$ac_pt_CXX
4909 fi
4910else
4911 CXX="$ac_cv_path_CXX"
4912fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004914 icc|*/icc) if test -n "$ac_tool_prefix"; then
4915 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4916set dummy ${ac_tool_prefix}icpc; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_CXX+:} false; then :
4920 $as_echo_n "(cached) " >&6
4921else
4922 case $CXX in
4923 [\\/]* | ?:[\\/]*)
4924 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4925 ;;
4926 *)
4927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in notfound
4929do
4930 IFS=$as_save_IFS
4931 test -z "$as_dir" && as_dir=.
4932 for ac_exec_ext in '' $ac_executable_extensions; do
4933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4934 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936 break 2
4937 fi
4938done
4939 done
4940IFS=$as_save_IFS
4941
4942 ;;
4943esac
4944fi
4945CXX=$ac_cv_path_CXX
4946if test -n "$CXX"; then
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4948$as_echo "$CXX" >&6; }
4949else
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954
4955fi
4956if test -z "$ac_cv_path_CXX"; then
4957 ac_pt_CXX=$CXX
4958 # Extract the first word of "icpc", so it can be a program name with args.
4959set dummy 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_ac_pt_CXX+:} false; then :
4963 $as_echo_n "(cached) " >&6
4964else
4965 case $ac_pt_CXX in
4966 [\\/]* | ?:[\\/]*)
4967 ac_cv_path_ac_pt_CXX="$ac_pt_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_ac_pt_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
4988ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4989if test -n "$ac_pt_CXX"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4991$as_echo "$ac_pt_CXX" >&6; }
4992else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997 if test "x$ac_pt_CXX" = x; then
4998 CXX="icpc"
4999 else
5000 case $cross_compiling:$ac_tool_warned in
5001yes:)
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5004ac_tool_warned=yes ;;
5005esac
5006 CXX=$ac_pt_CXX
5007 fi
5008else
5009 CXX="$ac_cv_path_CXX"
5010fi
5011 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005012 esac
5013 if test "$CXX" = "notfound"
5014 then
5015 CXX=""
5016 fi
5017fi
5018if test -z "$CXX"
5019then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005020 if test -n "$ac_tool_prefix"; then
5021 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5022 do
5023 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5024set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005027if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005029else
5030 if test -n "$CXX"; then
5031 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5032else
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042 break 2
5043 fi
5044done
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005047
5048fi
5049fi
5050CXX=$ac_cv_prog_CXX
5051if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5053$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054else
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057fi
5058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 test -n "$CXX" && break
5061 done
5062fi
5063if test -z "$CXX"; then
5064 ac_ct_CXX=$CXX
5065 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5066do
5067 # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5072 $as_echo_n "(cached) " >&6
5073else
5074 if test -n "$ac_ct_CXX"; then
5075 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
5082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 ac_cv_prog_ac_ct_CXX="$ac_prog"
5085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086 break 2
5087 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005088done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005089 done
5090IFS=$as_save_IFS
5091
5092fi
5093fi
5094ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5095if test -n "$ac_ct_CXX"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5097$as_echo "$ac_ct_CXX" >&6; }
5098else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104 test -n "$ac_ct_CXX" && break
5105done
5106
5107 if test "x$ac_ct_CXX" = x; then
5108 CXX="notfound"
5109 else
5110 case $cross_compiling:$ac_tool_warned in
5111yes:)
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5114ac_tool_warned=yes ;;
5115esac
5116 CXX=$ac_ct_CXX
5117 fi
5118fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119
5120 if test "$CXX" = "notfound"
5121 then
5122 CXX=""
5123 fi
5124fi
5125if test "$preset_cxx" != "$CXX"
5126then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 By default, distutils will build C++ extension modules with \"$CXX\".
5130 If this is not intended, then set CXX on the configure command line.
5131 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133
5134 By default, distutils will build C++ extension modules with \"$CXX\".
5135 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005136 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137fi
5138
5139
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005140MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5141
5142
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5144$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5145cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005146#undef bfin
5147#undef cris
5148#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005149#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef hppa
5151#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005154#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005157#if defined(__ANDROID__)
5158# if defined(__x86_64__) && defined(__LP64__)
5159 x86_64-linux-android
5160# elif defined(__i386__)
5161 i686-linux-android
5162# elif defined(__aarch64__) && defined(__AARCH64EL__)
5163# if defined(__ILP32__)
5164 aarch64_ilp32-linux-android
5165# else
5166 aarch64-linux-android
5167# endif
5168# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5169 arm-linux-androideabi
5170# elif defined(__mips_hard_float) && defined(_MIPSEL)
5171# if _MIPS_SIM == _ABIO32
5172 mipsel-linux-android
5173# elif _MIPS_SIM == _ABI64
5174 mips64el-linux-android
5175# else
5176# error unknown platform triplet
5177# endif
5178# else
5179# error unknown platform triplet
5180# endif
5181#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182# if defined(__x86_64__) && defined(__LP64__)
5183 x86_64-linux-gnu
5184# elif defined(__x86_64__) && defined(__ILP32__)
5185 x86_64-linux-gnux32
5186# elif defined(__i386__)
5187 i386-linux-gnu
5188# elif defined(__aarch64__) && defined(__AARCH64EL__)
5189# if defined(__ILP32__)
5190 aarch64_ilp32-linux-gnu
5191# else
5192 aarch64-linux-gnu
5193# endif
5194# elif defined(__aarch64__) && defined(__AARCH64EB__)
5195# if defined(__ILP32__)
5196 aarch64_be_ilp32-linux-gnu
5197# else
5198 aarch64_be-linux-gnu
5199# endif
5200# elif defined(__alpha__)
5201 alpha-linux-gnu
5202# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5203# if defined(__ARMEL__)
5204 arm-linux-gnueabihf
5205# else
5206 armeb-linux-gnueabihf
5207# endif
5208# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5209# if defined(__ARMEL__)
5210 arm-linux-gnueabi
5211# else
5212 armeb-linux-gnueabi
5213# endif
5214# elif defined(__hppa__)
5215 hppa-linux-gnu
5216# elif defined(__ia64__)
5217 ia64-linux-gnu
5218# elif defined(__m68k__) && !defined(__mcoldfire__)
5219 m68k-linux-gnu
5220# elif defined(__mips_hard_float) && defined(_MIPSEL)
5221# if _MIPS_SIM == _ABIO32
5222 mipsel-linux-gnu
5223# elif _MIPS_SIM == _ABIN32
5224 mips64el-linux-gnuabin32
5225# elif _MIPS_SIM == _ABI64
5226 mips64el-linux-gnuabi64
5227# else
5228# error unknown platform triplet
5229# endif
5230# elif defined(__mips_hard_float)
5231# if _MIPS_SIM == _ABIO32
5232 mips-linux-gnu
5233# elif _MIPS_SIM == _ABIN32
5234 mips64-linux-gnuabin32
5235# elif _MIPS_SIM == _ABI64
5236 mips64-linux-gnuabi64
5237# else
5238# error unknown platform triplet
5239# endif
5240# elif defined(__or1k__)
5241 or1k-linux-gnu
5242# elif defined(__powerpc__) && defined(__SPE__)
5243 powerpc-linux-gnuspe
5244# elif defined(__powerpc64__)
5245# if defined(__LITTLE_ENDIAN__)
5246 powerpc64le-linux-gnu
5247# else
5248 powerpc64-linux-gnu
5249# endif
5250# elif defined(__powerpc__)
5251 powerpc-linux-gnu
5252# elif defined(__s390x__)
5253 s390x-linux-gnu
5254# elif defined(__s390__)
5255 s390-linux-gnu
5256# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5257 sh4-linux-gnu
5258# elif defined(__sparc__) && defined(__arch64__)
5259 sparc64-linux-gnu
5260# elif defined(__sparc__)
5261 sparc-linux-gnu
5262# else
5263# error unknown platform triplet
5264# endif
5265#elif defined(__FreeBSD_kernel__)
5266# if defined(__LP64__)
5267 x86_64-kfreebsd-gnu
5268# elif defined(__i386__)
5269 i386-kfreebsd-gnu
5270# else
5271# error unknown platform triplet
5272# endif
5273#elif defined(__gnu_hurd__)
5274 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005275#elif defined(__APPLE__)
5276 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#else
5278# error unknown platform triplet
5279#endif
5280
5281EOF
5282
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005283if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005284 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5286$as_echo "$PLATFORM_TRIPLET" >&6; }
5287else
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5289$as_echo "none" >&6; }
5290fi
5291rm -f conftest.c conftest.out
5292
5293if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5294 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5295 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5296 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005297elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5298 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005300if test x$PLATFORM_TRIPLET = x; then
5301 PLATDIR=plat-$MACHDEP
5302else
5303 PLATDIR=plat-$PLATFORM_TRIPLET
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
doko@ubuntu.com55532312016-06-14 08:55:19 +02005307if test x$MULTIARCH != x; then
5308 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5309fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310
5311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5313$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5314save_LDFLAGS="$LDFLAGS"
5315LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5318/* end confdefs.h. */
5319
5320int
5321main ()
5322{
5323
5324 ;
5325 return 0;
5326}
5327_ACEOF
5328if ac_fn_c_try_link "$LINENO"; then :
5329 NO_AS_NEEDED="-Wl,--no-as-needed"
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5331$as_echo "yes" >&6; }
5332else
5333 NO_AS_NEEDED=""
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337rm -f core conftest.err conftest.$ac_objext \
5338 conftest$ac_exeext conftest.$ac_ext
5339LDFLAGS="$save_LDFLAGS"
5340
5341
5342
5343# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344
Matthias Kloseb9621712010-04-24 17:59:49 +00005345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5346$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005347if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349else
5350 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5351 then ac_cv_path_EGREP="$GREP -E"
5352 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005353 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 # Loop through the user's path and test for each of PROGNAME-LIST
5356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5358do
5359 IFS=$as_save_IFS
5360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 for ac_prog in egrep; do
5362 for ac_exec_ext in '' $ac_executable_extensions; do
5363 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005364 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005365# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366 # Check for GNU $ac_path_EGREP
5367case `"$ac_path_EGREP" --version 2>&1` in
5368*GNU*)
5369 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5370*)
5371 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 while :
5374 do
5375 cat "conftest.in" "conftest.in" >"conftest.tmp"
5376 mv "conftest.tmp" "conftest.in"
5377 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5380 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5383 # Best one so far, save it but keep looking for a better one
5384 ac_cv_path_EGREP="$ac_path_EGREP"
5385 ac_path_EGREP_max=$ac_count
5386 fi
5387 # 10*(2^10) chars as input seems more than enough
5388 test $ac_count -gt 10 && break
5389 done
5390 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5391esac
5392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $ac_path_EGREP_found && break 3
5394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005399 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 +00005400 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401else
5402 ac_cv_path_EGREP=$EGREP
5403fi
5404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 fi
5406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5408$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005410
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5413$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005414if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $as_echo_n "(cached) " >&6
5416else
5417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005418/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005419#include <stdlib.h>
5420#include <stdarg.h>
5421#include <string.h>
5422#include <float.h>
5423
5424int
5425main ()
5426{
5427
5428 ;
5429 return 0;
5430}
5431_ACEOF
5432if ac_fn_c_try_compile "$LINENO"; then :
5433 ac_cv_header_stdc=yes
5434else
5435 ac_cv_header_stdc=no
5436fi
5437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5438
5439if test $ac_cv_header_stdc = yes; then
5440 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5442/* end confdefs.h. */
5443#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005444
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005445_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005449else
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005452rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454fi
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#include <stdlib.h>
5461
5462_ACEOF
5463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5464 $EGREP "free" >/dev/null 2>&1; then :
5465
5466else
5467 ac_cv_header_stdc=no
5468fi
5469rm -f conftest*
5470
5471fi
5472
5473if test $ac_cv_header_stdc = yes; then
5474 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5475 if test "$cross_compiling" = yes; then :
5476 :
5477else
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h. */
5480#include <ctype.h>
5481#include <stdlib.h>
5482#if ((' ' & 0x0FF) == 0x020)
5483# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5484# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5485#else
5486# define ISLOWER(c) \
5487 (('a' <= (c) && (c) <= 'i') \
5488 || ('j' <= (c) && (c) <= 'r') \
5489 || ('s' <= (c) && (c) <= 'z'))
5490# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5491#endif
5492
5493#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5494int
5495main ()
5496{
5497 int i;
5498 for (i = 0; i < 256; i++)
5499 if (XOR (islower (i), ISLOWER (i))
5500 || toupper (i) != TOUPPER (i))
5501 return 2;
5502 return 0;
5503}
5504_ACEOF
5505if ac_fn_c_try_run "$LINENO"; then :
5506
5507else
5508 ac_cv_header_stdc=no
5509fi
5510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5511 conftest.$ac_objext conftest.beam conftest.$ac_ext
5512fi
5513
5514fi
5515fi
5516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5517$as_echo "$ac_cv_header_stdc" >&6; }
5518if test $ac_cv_header_stdc = yes; then
5519
5520$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5521
5522fi
5523
5524# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5525for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5526 inttypes.h stdint.h unistd.h
5527do :
5528 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5529ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5530"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005531if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 cat >>confdefs.h <<_ACEOF
5533#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5534_ACEOF
5535
5536fi
5537
5538done
5539
5540
5541
5542 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 +02005543if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 MINIX=yes
5545else
5546 MINIX=
5547fi
5548
5549
5550 if test "$MINIX" = yes; then
5551
5552$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5553
5554
5555$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5556
5557
5558$as_echo "#define _MINIX 1" >>confdefs.h
5559
5560 fi
5561
5562
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5564$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005565if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 $as_echo_n "(cached) " >&6
5567else
5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5569/* end confdefs.h. */
5570
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005571# define __EXTENSIONS__ 1
5572 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005573int
5574main ()
5575{
5576
5577 ;
5578 return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_compile "$LINENO"; then :
5582 ac_cv_safe_to_define___extensions__=yes
5583else
5584 ac_cv_safe_to_define___extensions__=no
5585fi
5586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5587fi
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5589$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5590 test $ac_cv_safe_to_define___extensions__ = yes &&
5591 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5592
5593 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5594
5595 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5596
5597 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5598
5599 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5600
5601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
Xavier de Gaye95750b12016-07-09 11:05:42 +02005603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5604$as_echo_n "checking for the Android API level... " >&6; }
5605cat >> conftest.c <<EOF
5606#ifdef __ANDROID__
5607#include <android/api-level.h>
5608__ANDROID_API__
5609#else
5610#error not Android
5611#endif
5612EOF
5613
5614if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5615 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5617$as_echo "$ANDROID_API_LEVEL" >&6; }
5618
5619cat >>confdefs.h <<_ACEOF
5620#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5621_ACEOF
5622
5623else
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5625$as_echo "not Android" >&6; }
5626fi
5627rm -f conftest.c conftest.out
5628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629# Check for unsupported systems
5630case $ac_sys_system/$ac_sys_release in
5631atheos*|Linux*/1*)
5632 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5633 echo See README for details.
5634 exit 1;;
5635esac
5636
5637
Matthias Kloseb9621712010-04-24 17:59:49 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5639$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
5641# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005642if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 withval=$with_suffix;
5644 case $withval in
5645 no) EXEEXT=;;
5646 yes) EXEEXT=.exe;;
5647 *) EXEEXT=$withval;;
5648 esac
5649fi
5650
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5652$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
5654# Test whether we're running on a non-case-sensitive system, in which
5655# case we give a warning if no ext is given
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5658$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659if test ! -d CaseSensitiveTestDir; then
5660mkdir CaseSensitiveTestDir
5661fi
5662
5663if test -d casesensitivetestdir
5664then
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5666$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 BUILDEXEEXT=.exe
5668else
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 BUILDEXEEXT=$EXEEXT
5672fi
5673rmdir CaseSensitiveTestDir
5674
5675case $MACHDEP in
5676bsdos*)
5677 case $CC in
5678 gcc) CC="$CC -D_HAVE_BSDI";;
5679 esac;;
5680esac
5681
5682case $ac_sys_system in
5683hp*|HP*)
5684 case $CC in
5685 cc|*/cc) CC="$CC -Ae";;
5686 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687esac
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb9621712010-04-24 17:59:49 +00005690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692if test -z "$LIBRARY"
5693then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005694 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699# LDLIBRARY is the name of the library to link against (as opposed to the
5700# name of the library into which to insert object files). BLDLIBRARY is also
5701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5702# is blank as the main program is not linked directly against LDLIBRARY.
5703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5706# DLLLIBRARY is the shared (i.e., DLL) library.
5707#
5708# RUNSHARED is used to run shared python without installed libraries
5709#
5710# INSTSONAME is the name of the shared library that will be use to install
5711# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005712#
5713# LDVERSION is the shared library version number, normally the Python version
5714# with the ABI build flags appended.
5715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717
5718
5719
5720
5721
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723LDLIBRARY="$LIBRARY"
5724BLDLIBRARY='$(LDLIBRARY)'
5725INSTSONAME='$(LDLIBRARY)'
5726DLLLIBRARY=''
5727LDLIBRARYDIR=''
5728RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005729LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# LINKCC is the command that links the python executable -- default is $(CC).
5732# If CXX is set, and if it is needed to link a main function that was
5733# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5734# python might then depend on the C++ runtime
5735# This is altered for AIX in order to build the export list before
5736# linking.
5737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5739$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740if test -z "$LINKCC"
5741then
5742 LINKCC='$(PURIFY) $(MAINCC)'
5743 case $ac_sys_system in
5744 AIX*)
5745 exp_extra="\"\""
5746 if test $ac_sys_release -ge 5 -o \
5747 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5748 exp_extra="."
5749 fi
5750 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 QNX*)
5752 # qcc must be used because the other compilers do not
5753 # support -N.
5754 LINKCC=qcc;;
5755 esac
5756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5758$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5761# make sure we default having it set to "no": this is used by
5762# distutils.unixccompiler to know if it should add --enable-new-dtags
5763# to linker command lines, and failing to detect GNU ld simply results
5764# in the same bahaviour as before.
5765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5767$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768ac_prog=ld
5769if test "$GCC" = yes; then
5770 ac_prog=`$CC -print-prog-name=ld`
5771fi
5772case `"$ac_prog" -V 2>&1 < /dev/null` in
5773 *GNU*)
5774 GNULD=yes;;
5775 *)
5776 GNULD=no;;
5777esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5779$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5782$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005783if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005784 $as_echo_n "(cached) " >&6
5785else
5786 ac_cv_c_inline=no
5787for ac_kw in inline __inline__ __inline; do
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h. */
5790#ifndef __cplusplus
5791typedef int foo_t;
5792static $ac_kw foo_t static_foo () {return 0; }
5793$ac_kw foo_t foo () {return 0; }
5794#endif
5795
5796_ACEOF
5797if ac_fn_c_try_compile "$LINENO"; then :
5798 ac_cv_c_inline=$ac_kw
5799fi
5800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5801 test "$ac_cv_c_inline" != no && break
5802done
5803
5804fi
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5806$as_echo "$ac_cv_c_inline" >&6; }
5807
5808case $ac_cv_c_inline in
5809 inline | yes) ;;
5810 *)
5811 case $ac_cv_c_inline in
5812 no) ac_val=;;
5813 *) ac_val=$ac_cv_c_inline;;
5814 esac
5815 cat >>confdefs.h <<_ACEOF
5816#ifndef __cplusplus
5817#define inline $ac_val
5818#endif
5819_ACEOF
5820 ;;
5821esac
5822
5823if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005824
5825$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005826
5827
5828fi
5829
5830
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
5973if test -n "$ac_tool_prefix"; then
5974 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5975set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005978if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
5981 if test -n "$RANLIB"; then
5982 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 break 2
5994 fi
5995done
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997IFS=$as_save_IFS
5998
5999fi
6000fi
6001RANLIB=$ac_cv_prog_RANLIB
6002if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6004$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005else
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008fi
6009
6010
6011fi
6012if test -z "$ac_cv_prog_RANLIB"; then
6013 ac_ct_RANLIB=$RANLIB
6014 # Extract the first word of "ranlib", so it can be a program name with args.
6015set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006018if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020else
6021 if test -n "$ac_ct_RANLIB"; then
6022 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6023else
6024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027 IFS=$as_save_IFS
6028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 break 2
6034 fi
6035done
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037IFS=$as_save_IFS
6038
6039fi
6040fi
6041ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6042if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6044$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048fi
6049
6050 if test "x$ac_ct_RANLIB" = x; then
6051 RANLIB=":"
6052 else
6053 case $cross_compiling:$ac_tool_warned in
6054yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057ac_tool_warned=yes ;;
6058esac
6059 RANLIB=$ac_ct_RANLIB
6060 fi
6061else
6062 RANLIB="$ac_cv_prog_RANLIB"
6063fi
6064
6065
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006066if test -n "$ac_tool_prefix"; then
6067 for ac_prog in ar aal
6068 do
6069 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6072$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006073if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
6076 if test -n "$AR"; then
6077 ac_cv_prog_AR="$AR" # Let the user override the test.
6078else
6079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082 IFS=$as_save_IFS
6083 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006086 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 break 2
6089 fi
6090done
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092IFS=$as_save_IFS
6093
6094fi
6095fi
6096AR=$ac_cv_prog_AR
6097if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6099$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100else
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103fi
6104
6105
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006106 test -n "$AR" && break
6107 done
6108fi
6109if test -z "$AR"; then
6110 ac_ct_AR=$AR
6111 for ac_prog in ar aal
6112do
6113 # Extract the first word of "$ac_prog", so it can be a program name with args.
6114set dummy $ac_prog; ac_word=$2
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
6117if ${ac_cv_prog_ac_ct_AR+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 if test -n "$ac_ct_AR"; then
6121 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6122else
6123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 ac_cv_prog_ac_ct_AR="$ac_prog"
6131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132 break 2
6133 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 done
6136IFS=$as_save_IFS
6137
6138fi
6139fi
6140ac_ct_AR=$ac_cv_prog_ac_ct_AR
6141if test -n "$ac_ct_AR"; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6143$as_echo "$ac_ct_AR" >&6; }
6144else
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
6147fi
6148
6149
6150 test -n "$ac_ct_AR" && break
6151done
6152
6153 if test "x$ac_ct_AR" = x; then
6154 AR="ar"
6155 else
6156 case $cross_compiling:$ac_tool_warned in
6157yes:)
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160ac_tool_warned=yes ;;
6161esac
6162 AR=$ac_ct_AR
6163 fi
6164fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165
6166
6167# tweak ARFLAGS only if the user didn't set it on the command line
6168
6169if test -z "$ARFLAGS"
6170then
6171 ARFLAGS="rc"
6172fi
6173
doko@ubuntu.com58844492012-06-30 18:25:32 +02006174if test -n "$ac_tool_prefix"; then
6175 for ac_prog in readelf
6176 do
6177 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_prog_READELF+:} false; then :
6182 $as_echo_n "(cached) " >&6
6183else
6184 if test -n "$READELF"; then
6185 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6186else
6187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
6192 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006194 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196 break 2
6197 fi
6198done
6199 done
6200IFS=$as_save_IFS
6201
6202fi
6203fi
6204READELF=$ac_cv_prog_READELF
6205if test -n "$READELF"; then
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6207$as_echo "$READELF" >&6; }
6208else
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210$as_echo "no" >&6; }
6211fi
6212
6213
6214 test -n "$READELF" && break
6215 done
6216fi
6217if test -z "$READELF"; then
6218 ac_ct_READELF=$READELF
6219 for ac_prog in readelf
6220do
6221 # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6226 $as_echo_n "(cached) " >&6
6227else
6228 if test -n "$ac_ct_READELF"; then
6229 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6230else
6231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234 IFS=$as_save_IFS
6235 test -z "$as_dir" && as_dir=.
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_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006238 ac_cv_prog_ac_ct_READELF="$ac_prog"
6239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240 break 2
6241 fi
6242done
6243 done
6244IFS=$as_save_IFS
6245
6246fi
6247fi
6248ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6249if test -n "$ac_ct_READELF"; then
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6251$as_echo "$ac_ct_READELF" >&6; }
6252else
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258 test -n "$ac_ct_READELF" && break
6259done
6260
6261 if test "x$ac_ct_READELF" = x; then
6262 READELF=":"
6263 else
6264 case $cross_compiling:$ac_tool_warned in
6265yes:)
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268ac_tool_warned=yes ;;
6269esac
6270 READELF=$ac_ct_READELF
6271 fi
6272fi
6273
6274if test "$cross_compiling" = yes; then
6275 case "$READELF" in
6276 readelf|:)
6277 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6278 ;;
6279 esac
6280fi
6281
6282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284case $MACHDEP in
6285bsdos*|hp*|HP*)
6286 # install -d does not work on BSDI or HP-UX
6287 if test -z "$INSTALL"
6288 then
6289 INSTALL="${srcdir}/install-sh -c"
6290 fi
6291esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292# Find a good install program. We prefer a C program (faster),
6293# so one script is as good as another. But avoid the broken or
6294# incompatible versions:
6295# SysV /etc/install, /usr/sbin/install
6296# SunOS /usr/etc/install
6297# IRIX /sbin/install
6298# AIX /bin/install
6299# AmigaOS /C/install, which installs bootblocks on floppy discs
6300# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6301# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6302# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6303# OS/2's system install, which has a completely different semantic
6304# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006305# Reject install programs that cannot install multiple files.
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6307$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006309if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006310 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311else
6312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 # Account for people who put trailing slashes in PATH elements.
6318case $as_dir/ in #((
6319 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 /usr/ucb/* ) ;;
6323 *)
6324 # OSF1 and SCO ODT 3.0 have their own names for install.
6325 # Don't use installbsd from OSF since it installs stuff as root
6326 # by default.
6327 for ac_prog in ginstall scoinst install; do
6328 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006329 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 if test $ac_prog = install &&
6331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6332 # AIX install. It has an incompatible calling convention.
6333 :
6334 elif test $ac_prog = install &&
6335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6336 # program-specific install script used by HP pwplus--don't use.
6337 :
6338 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006339 rm -rf conftest.one conftest.two conftest.dir
6340 echo one > conftest.one
6341 echo two > conftest.two
6342 mkdir conftest.dir
6343 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6344 test -s conftest.one && test -s conftest.two &&
6345 test -s conftest.dir/conftest.one &&
6346 test -s conftest.dir/conftest.two
6347 then
6348 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6349 break 3
6350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351 fi
6352 fi
6353 done
6354 done
6355 ;;
6356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006357
6358 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359IFS=$as_save_IFS
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362
6363fi
6364 if test "${ac_cv_path_install+set}" = set; then
6365 INSTALL=$ac_cv_path_install
6366 else
6367 # As a last resort, use the slow shell script. Don't cache a
6368 # value for INSTALL within a source directory, because that will
6369 # break other packages using the cache if that directory is
6370 # removed, or if the value is a relative name.
6371 INSTALL=$ac_install_sh
6372 fi
6373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6375$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6378# It thinks the first close brace ends the variable substitution.
6379test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6380
6381test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6382
6383test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6384
Matthias Klose93a0ef12012-03-15 18:08:34 +01006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6386$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6387if test -z "$MKDIR_P"; then
6388 if ${ac_cv_path_mkdir+:} false; then :
6389 $as_echo_n "(cached) " >&6
6390else
6391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6393do
6394 IFS=$as_save_IFS
6395 test -z "$as_dir" && as_dir=.
6396 for ac_prog in mkdir gmkdir; do
6397 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006398 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006399 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6400 'mkdir (GNU coreutils) '* | \
6401 'mkdir (coreutils) '* | \
6402 'mkdir (fileutils) '4.1*)
6403 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6404 break 3;;
6405 esac
6406 done
6407 done
6408 done
6409IFS=$as_save_IFS
6410
6411fi
6412
6413 test -d ./--version && rmdir ./--version
6414 if test "${ac_cv_path_mkdir+set}" = set; then
6415 MKDIR_P="$ac_cv_path_mkdir -p"
6416 else
6417 # As a last resort, use the slow shell script. Don't cache a
6418 # value for MKDIR_P within a source directory, because that will
6419 # break other packages using the cache if that directory is
6420 # removed, or if the value is a relative name.
6421 MKDIR_P="$ac_install_sh -d"
6422 fi
6423fi
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6425$as_echo "$MKDIR_P" >&6; }
6426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
6428# Not every filesystem supports hard links
6429
6430if test -z "$LN" ; then
6431 case $ac_sys_system in
6432 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 *) LN=ln;;
6434 esac
6435fi
6436
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006437# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006438
6439ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006440
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6443$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444
6445# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006446if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447 withval=$with_pydebug;
6448if test "$withval" != no
6449then
6450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452
Matthias Kloseb9621712010-04-24 17:59:49 +00006453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6454$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006456 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006457else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459fi
6460else
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463fi
6464
6465
Brett Cannon63d98bc2016-09-06 17:12:40 -07006466# Enable optimization flags
6467
6468
6469Py_OPT='false'
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6471$as_echo_n "checking for --with-optimizations... " >&6; }
6472
6473# Check whether --with-optimizations was given.
6474if test "${with_optimizations+set}" = set; then :
6475 withval=$with_optimizations;
6476if test "$withval" != no
6477then
6478 Py_OPT='true'
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
6481else
6482 Py_OPT='false'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
6485fi
6486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
6489fi
6490
6491if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006492 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6493 # compile working code using it and both test_distutils and test_gdb are
6494 # broken when you do managed to get a toolchain that works with it. People
6495 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006496 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006497 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006498 DEF_MAKE_RULE="build_all"
6499else
6500 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006501 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006502 DEF_MAKE_RULE="all"
6503fi
6504
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006505# Enable LTO flags
6506
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6508$as_echo_n "checking for --with-lto... " >&6; }
6509
6510# Check whether --with-lto was given.
6511if test "${with_lto+set}" = set; then :
6512 withval=$with_lto;
6513if test "$withval" != no
6514then
6515 Py_LTO='true'
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6517$as_echo "yes" >&6; };
6518else
6519 Py_LTO='false'
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; };
6522fi
6523else
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6525$as_echo "no" >&6; }
6526fi
6527
6528if test "$Py_LTO" = 'true' ; then
6529 case $CC in
6530 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006531 case $ac_sys_system in
6532 Darwin*)
6533 # Any changes made here should be reflected in the GCC+Darwin case below
6534 LTOFLAGS="-flto -Wl,-export_dynamic"
6535 ;;
6536 *)
6537 LTOFLAGS="-flto"
6538 ;;
6539 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006540 ;;
6541 *gcc*)
6542 case $ac_sys_system in
6543 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006544 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006545 ;;
6546 *)
6547 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6548 ;;
6549 esac
6550 ;;
6551 esac
6552fi
6553
Brett Cannon7188a3e2015-09-18 15:13:44 -07006554# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006555
6556
6557
6558
6559
Gregory P. Smith799520c2016-09-07 16:10:00 -07006560# Make this work on systems where llvm tools are not installed with their
6561# normal names in the default $PATH (ie: Ubuntu). They exist under the
6562# non-suffixed name in their versioned llvm directory.
6563llvm_bin_dir=''
6564llvm_path="${PATH}"
6565if test "${CC}" = "clang"
6566then
6567 clang_bin=`which clang`
6568 # Some systems install clang elsewhere as a symlink to the real path
6569 # which is where the related llvm tools are located.
6570 if test -L "${clang_bin}"
6571 then
6572 clang_dir=`dirname "${clang_bin}"`
6573 clang_bin=`readlink "${clang_bin}"`
6574 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6575 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6576 fi
6577fi
Zachary Ware5af85642015-12-21 12:09:17 -06006578
Gregory P. Smith799520c2016-09-07 16:10:00 -07006579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6580$as_echo_n "checking target system type... " >&6; }
6581if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006582 $as_echo_n "(cached) " >&6
6583else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006584 if test "x$target_alias" = x; then
6585 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006586else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006587 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6588 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6589fi
6590
6591fi
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6593$as_echo "$ac_cv_target" >&6; }
6594case $ac_cv_target in
6595*-*-*) ;;
6596*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6597esac
6598target=$ac_cv_target
6599ac_save_IFS=$IFS; IFS='-'
6600set x $ac_cv_target
6601shift
6602target_cpu=$1
6603target_vendor=$2
6604shift; shift
6605# Remember, the first character of IFS is used to create $*,
6606# except with old shells:
6607target_os=$*
6608IFS=$ac_save_IFS
6609case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6610
6611
6612# The aliases save the names the user supplied, while $host etc.
6613# will get canonicalized.
6614test -n "$target_alias" &&
6615 test "$program_prefix$program_suffix$program_transform_name" = \
6616 NONENONEs,x,x, &&
6617 program_prefix=${target_alias}-
6618# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6619set dummy $target_alias-llvm-profdata; ac_word=$2
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6621$as_echo_n "checking for $ac_word... " >&6; }
6622if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6623 $as_echo_n "(cached) " >&6
6624else
6625 case $LLVM_PROFDATA in
6626 [\\/]* | ?:[\\/]*)
6627 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6628 ;;
6629 *)
6630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6631for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632do
6633 IFS=$as_save_IFS
6634 test -z "$as_dir" && as_dir=.
6635 for ac_exec_ext in '' $ac_executable_extensions; do
6636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006637 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6639 break 2
6640 fi
6641done
6642 done
6643IFS=$as_save_IFS
6644
Gregory P. Smith799520c2016-09-07 16:10:00 -07006645 ;;
6646esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6649if test -n "$LLVM_PROFDATA"; then
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6651$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006652else
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654$as_echo "no" >&6; }
6655fi
6656
6657
Gregory P. Smith799520c2016-09-07 16:10:00 -07006658if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6659 if test "$build" = "$target"; then
6660 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6661 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6662set dummy llvm-profdata; ac_word=$2
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6664$as_echo_n "checking for $ac_word... " >&6; }
6665if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6666 $as_echo_n "(cached) " >&6
6667else
6668 case $ac_pt_LLVM_PROFDATA in
6669 [\\/]* | ?:[\\/]*)
6670 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6671 ;;
6672 *)
6673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6674for as_dir in ${llvm_path}
6675do
6676 IFS=$as_save_IFS
6677 test -z "$as_dir" && as_dir=.
6678 for ac_exec_ext in '' $ac_executable_extensions; do
6679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6680 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6682 break 2
6683 fi
6684done
6685 done
6686IFS=$as_save_IFS
6687
6688 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6689 ;;
6690esac
6691fi
6692ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6693if test -n "$ac_pt_LLVM_PROFDATA"; then
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6695$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6696else
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6698$as_echo "no" >&6; }
6699fi
6700
6701 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6702 else
6703 LLVM_PROFDATA="''"
6704 fi
6705else
6706 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6707fi
6708
6709
6710if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6711then
6712 LLVM_PROF_FOUND="found"
6713else
6714 LLVM_PROF_FOUND="not-found"
6715fi
6716if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6717then
6718 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6719 if test -n "${found_llvm_profdata}"
6720 then
6721 # llvm-profdata isn't directly in $PATH in some cases.
6722 # https://apple.stackexchange.com/questions/197053/
6723 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6724 LLVM_PROF_FOUND=found
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6726$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6727 fi
6728fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006729LLVM_PROF_ERR=no
6730case $CC in
6731 *clang*)
6732 # Any changes made here should be reflected in the GCC+Darwin case below
6733 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6734 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006735 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006736 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6737 if test $LLVM_PROF_FOUND = not-found
6738 then
6739 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006740 if test "${REQUIRE_PGO}" = "yes"
6741 then
6742 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6743 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006744 fi
6745 ;;
6746 *gcc*)
6747 case $ac_sys_system in
6748 Darwin*)
6749 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6750 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006751 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754 then
6755 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006756 if test "${REQUIRE_PGO}" = "yes"
6757 then
6758 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6759 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006760 fi
6761 ;;
6762 *)
6763 PGO_PROF_GEN_FLAG="-fprofile-generate"
6764 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6765 LLVM_PROF_MERGER="true"
6766 LLVM_PROF_FILE=""
6767 ;;
6768 esac
6769 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006770 *icc*)
6771 PGO_PROF_GEN_FLAG="-prof-gen"
6772 PGO_PROF_USE_FLAG="-prof-use"
6773 LLVM_PROF_MERGER="true"
6774 LLVM_PROF_FILE=""
6775 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006776esac
6777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6779# merged with this chunk of code?
6780
6781# Optimizer/debugger flags
6782# ------------------------
6783# (The following bit of code is complicated enough - please keep things
6784# indented properly. Just pretend you're editing Python code. ;-)
6785
6786# There are two parallel sets of case statements below, one that checks to
6787# see if OPT was set and one that does BASECFLAGS setting based upon
6788# compiler and platform. BASECFLAGS tweaks need to be made even if the
6789# user set OPT.
6790
6791# tweak OPT based on compiler and platform, only if the user didn't set
6792# it on the command line
6793
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006794if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795then
6796 case $GCC in
6797 yes)
6798 if test "$CC" != 'g++' ; then
6799 STRICT_PROTO="-Wstrict-prototypes"
6800 fi
6801 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6802 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6803 WRAP="-fwrapv"
6804 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006805
6806 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006807 case $CC in
6808 *clang*) WRAP="-fwrapv"
6809 ;;
6810 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812 case $ac_cv_prog_cc_g in
6813 yes)
6814 if test "$Py_DEBUG" = 'true' ; then
6815 # Optimization messes up debuggers, so turn it off for
6816 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006817 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6818 OPT="-g -Og -Wall $STRICT_PROTO"
6819 else
6820 OPT="-g -O0 -Wall $STRICT_PROTO"
6821 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822 else
6823 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6824 fi
6825 ;;
6826 *)
6827 OPT="-O3 -Wall $STRICT_PROTO"
6828 ;;
6829 esac
6830 case $ac_sys_system in
6831 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6832 ;;
6833 esac
6834 ;;
6835
6836 *)
6837 OPT="-O"
6838 ;;
6839 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840fi
6841
6842
6843
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845# The -arch flags for universal builds on OSX
6846UNIVERSAL_ARCH_FLAGS=
6847
6848
6849# tweak BASECFLAGS based on compiler and platform
6850case $GCC in
6851yes)
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07006852 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006853
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006854 # Python doesn't violate C99 aliasing rules, but older versions of
6855 # GCC produce warnings for legal Python code. Enable
6856 # -fno-strict-aliasing on versions of GCC that support but produce
6857 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6859$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 ac_save_cc="$CC"
6861 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006862 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006863 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006868
Matthias Kloseb159a552010-04-25 21:00:44 +00006869
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006870int
6871main ()
6872{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006873
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006874 ;
6875 return 0;
6876}
Matthias Kloseb159a552010-04-25 21:00:44 +00006877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006879if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006880
6881 CC="$ac_save_cc -fstrict-aliasing"
6882 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006884/* end confdefs.h. */
6885
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006886 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006887int
6888main ()
6889{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006890double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006891 ;
6892 return 0;
6893}
Matthias Kloseb159a552010-04-25 21:00:44 +00006894
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006896if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006897
6898 ac_cv_no_strict_aliasing=no
6899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900else
Matthias Kloseb159a552010-04-25 21:00:44 +00006901
6902 ac_cv_no_strict_aliasing=yes
6903
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006904fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006906
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006907else
Matthias Kloseb159a552010-04-25 21:00:44 +00006908
6909 ac_cv_no_strict_aliasing=no
6910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006913fi
6914
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006915 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006916 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6918$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006919 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920 then
6921 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6922 fi
6923
Zachary Ware5af85642015-12-21 12:09:17 -06006924 # ICC doesn't recognize the option, but only emits a warning
6925 ## XXX does it emit an unused result warning and can it be disabled?
6926 case "$CC" in
6927 *icc*)
6928 ac_cv_disable_unused_result_warning=no
6929 ;;
6930 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6932$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6933 ac_save_cc="$CC"
6934 CC="$CC -Wunused-result -Werror"
6935 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006936 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006937 $as_echo_n "(cached) " >&6
6938else
6939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6940/* end confdefs.h. */
6941
6942
6943int
6944main ()
6945{
6946
6947 ;
6948 return 0;
6949}
6950
6951_ACEOF
6952if ac_fn_c_try_compile "$LINENO"; then :
6953
6954 ac_cv_disable_unused_result_warning=yes
6955
6956else
6957
6958 ac_cv_disable_unused_result_warning=no
6959
6960fi
6961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6962fi
6963
6964 CFLAGS="$save_CFLAGS"
6965 CC="$ac_save_cc"
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6967$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006968 ;;
6969 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006970
6971 if test $ac_cv_disable_unused_result_warning = yes
6972 then
6973 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6974 fi
6975
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6977$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6978 ac_save_cc="$CC"
6979 CC="$CC -Wsign-compare"
6980 save_CFLAGS="$CFLAGS"
6981 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6982 $as_echo_n "(cached) " >&6
6983else
6984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6985/* end confdefs.h. */
6986
6987
6988int
6989main ()
6990{
6991
6992 ;
6993 return 0;
6994}
6995
6996_ACEOF
6997if ac_fn_c_try_compile "$LINENO"; then :
6998
6999 ac_cv_enable_sign_compare_warning=yes
7000
7001else
7002
7003 ac_cv_enable_sign_compare_warning=no
7004
7005fi
7006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7007fi
7008
7009 CFLAGS="$save_CFLAGS"
7010 CC="$ac_save_cc"
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7012$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7013
7014 if test $ac_cv_enable_sign_compare_warning = yes
7015 then
7016 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7017 fi
7018
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7020$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7021 ac_save_cc="$CC"
7022 CC="$CC -Wunreachable-code"
7023 save_CFLAGS="$CFLAGS"
7024 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7025 $as_echo_n "(cached) " >&6
7026else
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7028/* end confdefs.h. */
7029
7030
7031int
7032main ()
7033{
7034
7035 ;
7036 return 0;
7037}
7038
7039_ACEOF
7040if ac_fn_c_try_compile "$LINENO"; then :
7041
7042 ac_cv_enable_unreachable_code_warning=yes
7043
7044else
7045
7046 ac_cv_enable_unreachable_code_warning=no
7047
7048fi
7049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7050fi
7051
7052 CFLAGS="$save_CFLAGS"
7053 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007054
7055 # Don't enable unreachable code warning in debug mode, since it usually
7056 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007057 # Issue #24324: Unfortunately, the unreachable code warning does not work
7058 # correctly on gcc and has been silently removed from the compiler.
7059 # It is supported on clang but on OS X systems gcc may be an alias
7060 # for clang. Try to determine if the compiler is not really gcc and,
7061 # if so, only then enable the warning.
7062 if test $ac_cv_enable_unreachable_code_warning = yes && \
7063 test "$Py_DEBUG" != "true" && \
7064 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007065 then
7066 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007067 else
7068 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007069 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7071$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007072
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7074 # support. Without this, treatment of subnormals doesn't follow
7075 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007076 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077 alpha*)
7078 BASECFLAGS="$BASECFLAGS -mieee"
7079 ;;
7080 esac
7081
7082 case $ac_sys_system in
7083 SCO_SV*)
7084 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7085 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007086
7087 # is there any other compiler on Darwin besides gcc?
7088 Darwin*)
7089 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7090 # used to be here, but non-Apple gcc doesn't accept them.
7091 if test "${CC}" = gcc
7092 then
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007094$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007095 case "${UNIVERSALSDK}" in
7096 */MacOSX10.4u.sdk)
7097 # Build using 10.4 SDK, force usage of gcc when the
7098 # compiler is gcc, otherwise the user will get very
7099 # confusing error messages when building on OSX 10.6
7100 CC=gcc-4.0
7101 CPP=cpp-4.0
7102 ;;
7103 esac
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007105$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007106 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007107
Ned Deily87adb6e2013-10-18 21:09:56 -07007108 if test "${enable_universalsdk}"
7109 then
7110 case "$UNIVERSAL_ARCHS" in
7111 32-bit)
7112 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7113 LIPO_32BIT_FLAGS=""
7114 ARCH_RUN_32BIT=""
7115 ;;
7116 64-bit)
7117 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7118 LIPO_32BIT_FLAGS=""
7119 ARCH_RUN_32BIT="true"
7120 ;;
7121 all)
7122 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7123 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7124 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7125 ;;
7126 intel)
7127 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7128 LIPO_32BIT_FLAGS="-extract i386"
7129 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7130 ;;
7131 intel-32)
7132 UNIVERSAL_ARCH_FLAGS="-arch i386"
7133 LIPO_32BIT_FLAGS=""
7134 ARCH_RUN_32BIT=""
7135 ;;
7136 3-way)
7137 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7138 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7139 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7140 ;;
7141 *)
7142 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7143 ;;
7144 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007145
Ned Deily87adb6e2013-10-18 21:09:56 -07007146 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7147 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7148 if test "${UNIVERSALSDK}" != "/"
7149 then
7150 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7151 fi
7152 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007153
Ned Deily87adb6e2013-10-18 21:09:56 -07007154 # Calculate an appropriate deployment target for this build:
7155 # The deployment target value is used explicitly to enable certain
7156 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007157 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007158 # component of the string returned by distutils.get_platform().
7159 #
7160 # Use the value from:
7161 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7162 # 2. the operating system version of the build machine if >= 10.6
7163 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7164 # below to pick either 10.3, 10.4, or 10.5 as the target.
7165 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166
Ned Deily87adb6e2013-10-18 21:09:56 -07007167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7168$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007169 cur_target_major=`sw_vers -productVersion | \
7170 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7171 cur_target_minor=`sw_vers -productVersion | \
7172 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7173 cur_target="${cur_target_major}.${cur_target_minor}"
7174 if test ${cur_target_major} -eq 10 && \
7175 test ${cur_target_minor} -ge 3 && \
7176 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007177 then
Ned Deily36820b62014-06-25 13:44:22 -07007178 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007179 cur_target=10.3
7180 if test ${enable_universalsdk}
7181 then
7182 case "$UNIVERSAL_ARCHS" in
7183 all|3-way|intel|64-bit)
7184 # These configurations were first supported in 10.5
7185 cur_target='10.5'
7186 ;;
7187 esac
7188 else
7189 if test `/usr/bin/arch` = "i386"
7190 then
7191 # 10.4 was the first release to support Intel archs
7192 cur_target="10.4"
7193 fi
7194 fi
7195 fi
7196 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007197
Ned Deily87adb6e2013-10-18 21:09:56 -07007198 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7199 # environment with a value that is the same as what we'll use
7200 # in the Makefile to ensure that we'll get the same compiler
7201 # environment during configure and build time.
7202 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7203 export MACOSX_DEPLOYMENT_TARGET
7204 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7206$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007207
Ned Deily87adb6e2013-10-18 21:09:56 -07007208 # end of Darwin* tests
7209 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007210 esac
7211 ;;
7212
7213*)
7214 case $ac_sys_system in
7215 OpenUNIX*|UnixWare*)
7216 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7217 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218 SCO_SV*)
7219 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7220 ;;
7221 esac
7222 ;;
7223esac
7224
Zachary Ware5af85642015-12-21 12:09:17 -06007225# ICC needs -fp-model strict or floats behave badly
7226case "$CC" in
7227*icc*)
7228 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7229 ;;
7230esac
7231
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232if test "$Py_DEBUG" = 'true'; then
7233 :
7234else
7235 OPT="-DNDEBUG $OPT"
7236fi
7237
7238if test "$ac_arch_flags"
7239then
7240 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7241fi
7242
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243# On some compilers, pthreads are available without further options
7244# (e.g. MacOS X). On some of these systems, the compiler will not
7245# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7246# So we have to see first whether pthreads are available without
7247# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7249$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007250if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254 ac_cv_pthread_is_default=no
7255else
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257/* end confdefs.h. */
7258
Stefan Krah7dba5942012-11-22 22:49:11 +01007259#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260#include <pthread.h>
7261
7262void* routine(void* p){return NULL;}
7263
7264int main(){
7265 pthread_t p;
7266 if(pthread_create(&p,NULL,routine,NULL)!=0)
7267 return 1;
7268 (void)pthread_detach(p);
7269 return 0;
7270}
7271
7272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007273if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274
7275 ac_cv_pthread_is_default=yes
7276 ac_cv_kthread=no
7277 ac_cv_pthread=no
7278
7279else
Matthias Kloseb9621712010-04-24 17:59:49 +00007280 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7283 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007284fi
7285
7286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287fi
7288
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7290$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291
7292
7293if test $ac_cv_pthread_is_default = yes
7294then
7295 ac_cv_kpthread=no
7296else
7297# -Kpthread, if available, provides the right #defines
7298# and linker options to make pthread_create available
7299# Some compilers won't report that they do not support -Kpthread,
7300# so we need to run a program to see whether it really made the
7301# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7303$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007304if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007306else
7307 ac_save_cc="$CC"
7308CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007309if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310 ac_cv_kpthread=no
7311else
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313/* end confdefs.h. */
7314
Stefan Krah7dba5942012-11-22 22:49:11 +01007315#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316#include <pthread.h>
7317
7318void* routine(void* p){return NULL;}
7319
7320int main(){
7321 pthread_t p;
7322 if(pthread_create(&p,NULL,routine,NULL)!=0)
7323 return 1;
7324 (void)pthread_detach(p);
7325 return 0;
7326}
7327
7328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007329if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330 ac_cv_kpthread=yes
7331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7335 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336fi
7337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338CC="$ac_save_cc"
7339fi
7340
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7342$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343fi
7344
7345if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7346then
7347# -Kthread, if available, provides the right #defines
7348# and linker options to make pthread_create available
7349# Some compilers won't report that they do not support -Kthread,
7350# so we need to run a program to see whether it really made the
7351# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7353$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007354if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007355 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356else
7357 ac_save_cc="$CC"
7358CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007359if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360 ac_cv_kthread=no
7361else
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363/* end confdefs.h. */
7364
Stefan Krah7dba5942012-11-22 22:49:11 +01007365#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366#include <pthread.h>
7367
7368void* routine(void* p){return NULL;}
7369
7370int main(){
7371 pthread_t p;
7372 if(pthread_create(&p,NULL,routine,NULL)!=0)
7373 return 1;
7374 (void)pthread_detach(p);
7375 return 0;
7376}
7377
7378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007379if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380 ac_cv_kthread=yes
7381else
Matthias Kloseb9621712010-04-24 17:59:49 +00007382 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7385 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386fi
7387
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388CC="$ac_save_cc"
7389fi
7390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7392$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393fi
7394
7395if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7396then
7397# -pthread, if available, provides the right #defines
7398# and linker options to make pthread_create available
7399# Some compilers won't report that they do not support -pthread,
7400# so we need to run a program to see whether it really made the
7401# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7403$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007404if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406else
7407 ac_save_cc="$CC"
7408CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007409if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410 ac_cv_pthread=no
7411else
Matthias Kloseb9621712010-04-24 17:59:49 +00007412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413/* end confdefs.h. */
7414
Stefan Krah7dba5942012-11-22 22:49:11 +01007415#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416#include <pthread.h>
7417
7418void* routine(void* p){return NULL;}
7419
7420int main(){
7421 pthread_t p;
7422 if(pthread_create(&p,NULL,routine,NULL)!=0)
7423 return 1;
7424 (void)pthread_detach(p);
7425 return 0;
7426}
7427
7428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007429if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430 ac_cv_pthread=yes
7431else
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436fi
7437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438CC="$ac_save_cc"
7439fi
7440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7442$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443fi
7444
7445# If we have set a CC compiler flag for thread support then
7446# check if it works for CXX, too.
7447ac_cv_cxx_thread=no
7448if test ! -z "$CXX"
7449then
Matthias Kloseb9621712010-04-24 17:59:49 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7451$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452ac_save_cxx="$CXX"
7453
7454if test "$ac_cv_kpthread" = "yes"
7455then
7456 CXX="$CXX -Kpthread"
7457 ac_cv_cxx_thread=yes
7458elif test "$ac_cv_kthread" = "yes"
7459then
7460 CXX="$CXX -Kthread"
7461 ac_cv_cxx_thread=yes
7462elif test "$ac_cv_pthread" = "yes"
7463then
7464 CXX="$CXX -pthread"
7465 ac_cv_cxx_thread=yes
7466fi
7467
7468if test $ac_cv_cxx_thread = yes
7469then
7470 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7471 $CXX -c conftest.$ac_ext 2>&5
7472 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7473 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7474 then
7475 ac_cv_cxx_thread=yes
7476 else
7477 ac_cv_cxx_thread=no
7478 fi
7479 rm -fr conftest*
7480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7482$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483fi
7484CXX="$ac_save_cxx"
7485
7486
7487# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7489$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007490if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494/* end confdefs.h. */
7495#include <stdlib.h>
7496#include <stdarg.h>
7497#include <string.h>
7498#include <float.h>
7499
7500int
7501main ()
7502{
7503
7504 ;
7505 return 0;
7506}
7507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007508if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509 ac_cv_header_stdc=yes
7510else
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7514
7515if test $ac_cv_header_stdc = yes; then
7516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007518/* end confdefs.h. */
7519#include <string.h>
7520
7521_ACEOF
7522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007523 $EGREP "memchr" >/dev/null 2>&1; then :
7524
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525else
7526 ac_cv_header_stdc=no
7527fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007528rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529
7530fi
7531
7532if test $ac_cv_header_stdc = yes; then
7533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535/* end confdefs.h. */
7536#include <stdlib.h>
7537
7538_ACEOF
7539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 $EGREP "free" >/dev/null 2>&1; then :
7541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542else
7543 ac_cv_header_stdc=no
7544fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007545rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546
7547fi
7548
7549if test $ac_cv_header_stdc = yes; then
7550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 :
7553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555/* end confdefs.h. */
7556#include <ctype.h>
7557#include <stdlib.h>
7558#if ((' ' & 0x0FF) == 0x020)
7559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7561#else
7562# define ISLOWER(c) \
7563 (('a' <= (c) && (c) <= 'i') \
7564 || ('j' <= (c) && (c) <= 'r') \
7565 || ('s' <= (c) && (c) <= 'z'))
7566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7567#endif
7568
7569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7570int
7571main ()
7572{
7573 int i;
7574 for (i = 0; i < 256; i++)
7575 if (XOR (islower (i), ISLOWER (i))
7576 || toupper (i) != TOUPPER (i))
7577 return 2;
7578 return 0;
7579}
7580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if ac_fn_c_try_run "$LINENO"; then :
7582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
7589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590fi
7591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7593$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007594if test $ac_cv_header_stdc = yes; then
7595
Matthias Kloseb9621712010-04-24 17:59:49 +00007596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007597
7598fi
7599
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007600for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007601fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007602ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007603sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007604unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007605poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007606sys/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 +01007607sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007608sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007609sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007610sys/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 -07007611libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007612linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007613sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007614do :
7615 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7616ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007617if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007619#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007620_ACEOF
7621
7622fi
7623
Guido van Rossum627b2d71993-12-24 10:39:16 +00007624done
7625
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007626ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007627for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7630$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007635/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007636#include <sys/types.h>
7637#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639int
7640main ()
7641{
7642if ((DIR *) 0)
7643return 0;
7644 ;
7645 return 0;
7646}
7647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007649 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655eval ac_res=\$$as_ac_Header
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7657$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007658if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007660#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007661_ACEOF
7662
7663ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007664fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007665
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007666done
7667# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7668if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7670$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007671if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007673else
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678/* Override any GCC internal prototype to avoid an error.
7679 Use char because int might match the return type of a GCC
7680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007681#ifdef __cplusplus
7682extern "C"
7683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007684char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007685int
7686main ()
7687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 ;
7690 return 0;
7691}
7692_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693for ac_lib in '' dir; do
7694 if test -z "$ac_lib"; then
7695 ac_res="none required"
7696 else
7697 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007698 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703rm -f core conftest.err conftest.$ac_objext \
7704 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007705 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708done
Victor Stinnere0be4232011-10-25 13:06:09 +02007709if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711else
7712 ac_cv_search_opendir=no
7713fi
7714rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007715LIBS=$ac_func_search_save_LIBS
7716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7718$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007720if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007722
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007723fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007724
Michael W. Hudson54241132001-12-07 15:38:26 +00007725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7727$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007728if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
7731 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735/* Override any GCC internal prototype to avoid an error.
7736 Use char because int might match the return type of a GCC
7737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007738#ifdef __cplusplus
7739extern "C"
7740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007741char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007742int
7743main ()
7744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ;
7747 return 0;
7748}
7749_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750for ac_lib in '' x; do
7751 if test -z "$ac_lib"; then
7752 ac_res="none required"
7753 else
7754 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007755 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007760rm -f core conftest.err conftest.$ac_objext \
7761 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007762 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007763 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765done
Victor Stinnere0be4232011-10-25 13:06:09 +02007766if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768else
7769 ac_cv_search_opendir=no
7770fi
7771rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007772LIBS=$ac_func_search_save_LIBS
7773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7775$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007777if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007779
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007780fi
7781
7782fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7785$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007790/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007791#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007792int
7793main ()
7794{
7795return makedev(0, 0);
7796 ;
7797 return 0;
7798}
7799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007800if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007801 ac_cv_header_sys_types_h_makedev=yes
7802else
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805rm -f core conftest.err conftest.$ac_objext \
7806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007807
7808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7810$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007811
7812if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007813ac_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 +02007814if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007815
Matthias Kloseb9621712010-04-24 17:59:49 +00007816$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007817
7818fi
7819
7820
7821
7822 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 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 +02007824if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007825
Matthias Kloseb9621712010-04-24 17:59:49 +00007826$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007827
7828fi
7829
7830
7831 fi
7832fi
7833
Michael W. Hudson54241132001-12-07 15:38:26 +00007834
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007835# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7836# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7837SAVE_CFLAGS=$CFLAGS
7838CFLAGS="-std=c99 $CFLAGS"
7839for ac_header in bluetooth/bluetooth.h
7840do :
7841 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7842if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7843 cat >>confdefs.h <<_ACEOF
7844#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7845_ACEOF
7846
7847fi
7848
7849done
7850
7851CFLAGS=$SAVE_CFLAGS
7852
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007853# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7854for ac_header in net/if.h
7855do :
7856 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7857#ifdef STDC_HEADERS
7858# include <stdlib.h>
7859# include <stddef.h>
7860#else
7861# ifdef HAVE_STDLIB_H
7862# include <stdlib.h>
7863# endif
7864#endif
7865#ifdef HAVE_SYS_SOCKET_H
7866# include <sys/socket.h>
7867#endif
7868
7869"
Victor Stinnere0be4232011-10-25 13:06:09 +02007870if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007871 cat >>confdefs.h <<_ACEOF
7872#define HAVE_NET_IF_H 1
7873_ACEOF
7874
7875fi
7876
7877done
7878
7879
Martin v. Löwis11017b12006-01-14 18:12:57 +00007880# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007881for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007882do :
7883 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 +00007884#ifdef HAVE_ASM_TYPES_H
7885#include <asm/types.h>
7886#endif
7887#ifdef HAVE_SYS_SOCKET_H
7888#include <sys/socket.h>
7889#endif
7890
Matthias Kloseb9621712010-04-24 17:59:49 +00007891"
Victor Stinnere0be4232011-10-25 13:06:09 +02007892if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007893 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007895_ACEOF
7896
7897fi
7898
7899done
7900
7901
Charles-François Natali47413c12011-10-06 19:47:44 +02007902# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007903for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007904do :
7905 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7906ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7907#ifdef HAVE_SYS_SOCKET_H
7908#include <sys/socket.h>
7909#endif
7910
7911"
7912if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7913 cat >>confdefs.h <<_ACEOF
7914#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7915_ACEOF
7916
7917fi
7918
7919done
7920
7921
Guido van Rossum627b2d71993-12-24 10:39:16 +00007922# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007923was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7925$as_echo_n "checking for clock_t in time.h... " >&6; }
7926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007927/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007928#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007929
7930_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007933 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007934else
Martin v. Löwis11437992002-04-12 09:54:03 +00007935
7936
Matthias Kloseb9621712010-04-24 17:59:49 +00007937$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007938
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007939
Guido van Rossum627b2d71993-12-24 10:39:16 +00007940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007941rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7944$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007945
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7947$as_echo_n "checking for makedev... " >&6; }
7948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007950
Jesus Cea740f53a2010-04-28 11:35:30 +00007951#if defined(MAJOR_IN_MKDEV)
7952#include <sys/mkdev.h>
7953#elif defined(MAJOR_IN_SYSMACROS)
7954#include <sys/sysmacros.h>
7955#else
7956#include <sys/types.h>
7957#endif
7958
Neal Norwitz11690112002-07-30 01:08:28 +00007959int
7960main ()
7961{
Jesus Cea740f53a2010-04-28 11:35:30 +00007962
7963 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007964 ;
7965 return 0;
7966}
Matthias Kloseb159a552010-04-25 21:00:44 +00007967
Neal Norwitz11690112002-07-30 01:08:28 +00007968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007969if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007970 ac_cv_has_makedev=yes
7971else
Matthias Kloseb9621712010-04-24 17:59:49 +00007972 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974rm -f core conftest.err conftest.$ac_objext \
7975 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7977$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007978if test "$ac_cv_has_makedev" = "yes"; then
7979
Matthias Kloseb9621712010-04-24 17:59:49 +00007980$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007981
7982fi
7983
Christian Heimes985ecdc2013-11-20 11:46:18 +01007984# byte swapping
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7986$as_echo_n "checking for le64toh... " >&6; }
7987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7988/* end confdefs.h. */
7989
7990#ifdef HAVE_ENDIAN_H
7991#include <endian.h>
7992#elif defined(HAVE_SYS_ENDIAN_H)
7993#include <sys/endian.h>
7994#endif
7995
7996int
7997main ()
7998{
7999
8000 le64toh(1)
8001 ;
8002 return 0;
8003}
8004
8005_ACEOF
8006if ac_fn_c_try_link "$LINENO"; then :
8007 ac_cv_has_le64toh=yes
8008else
8009 ac_cv_has_le64toh=no
8010fi
8011rm -f core conftest.err conftest.$ac_objext \
8012 conftest$ac_exeext conftest.$ac_ext
8013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8014$as_echo "$ac_cv_has_le64toh" >&6; }
8015if test "$ac_cv_has_le64toh" = "yes"; then
8016
8017$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8018
8019fi
8020
Martin v. Löwis399a6892002-10-04 10:22:02 +00008021# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8022# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8023# defined, but the compiler does not support pragma redefine_extname,
8024# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8025# structures (such as rlimit64) without declaring them. As a
8026# work-around, disable LFS on such configurations
8027
8028use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8030$as_echo_n "checking Solaris LFS bug... " >&6; }
8031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008033
8034#define _LARGEFILE_SOURCE 1
8035#define _FILE_OFFSET_BITS 64
8036#include <sys/resource.h>
8037
Martin v. Löwis399a6892002-10-04 10:22:02 +00008038int
8039main ()
8040{
8041struct rlimit foo;
8042 ;
8043 return 0;
8044}
8045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008047 sol_lfs_bug=no
8048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8053$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008054if test "$sol_lfs_bug" = "yes"; then
8055 use_lfs=no
8056fi
8057
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008058# Don't use largefile support for GNU/Hurd
8059case $ac_sys_system in GNU*)
8060 use_lfs=no
8061esac
8062
Martin v. Löwis399a6892002-10-04 10:22:02 +00008063if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008064# Two defines needed to enable largefile support on various platforms
8065# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008066case $ac_sys_system/$ac_sys_release in
8067AIX*)
8068
8069$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8070
8071 ;;
8072esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008073
Matthias Kloseb9621712010-04-24 17:59:49 +00008074$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
8076
Matthias Kloseb9621712010-04-24 17:59:49 +00008077$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008078
Martin v. Löwis399a6892002-10-04 10:22:02 +00008079fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008080
Guido van Rossum84e7b241996-08-19 21:59:00 +00008081# Add some code to confdefs.h so that the test for off_t works on SCO
8082cat >> confdefs.h <<\EOF
8083#if defined(SCO_DS)
8084#undef _OFF_T
8085#endif
8086EOF
8087
Guido van Rossumef2255b2000-03-10 22:30:29 +00008088# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008089ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008091
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092else
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
8094cat >>confdefs.h <<_ACEOF
8095#define mode_t int
8096_ACEOF
8097
8098fi
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008101if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103else
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
8105cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008107_ACEOF
8108
8109fi
8110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008112if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008113
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008114else
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
8116cat >>confdefs.h <<_ACEOF
8117#define pid_t int
8118_ACEOF
8119
8120fi
8121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008122
Martin v. Löwis11437992002-04-12 09:54:03 +00008123cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008124#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008125_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008128if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008130else
Martin v. Löwis11437992002-04-12 09:54:03 +00008131
8132cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008134_ACEOF
8135
8136fi
8137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8139$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008140if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008142else
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008144/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008145#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008146
8147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008150 ac_cv_type_uid_t=yes
8151else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008152 ac_cv_type_uid_t=no
8153fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008154rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8158$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008159if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008162
8163
Matthias Kloseb9621712010-04-24 17:59:49 +00008164$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008165
8166fi
8167
Mark Dickinson983bc162012-12-02 12:11:38 +00008168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008173
8174fi
8175
Stefan Krah1919b7e2012-03-21 18:25:23 +01008176ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8177if test "x$ac_cv_type___uint128_t" = xyes; then :
8178
8179$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8180
8181fi
8182
Jack Jansendd19cf82001-12-06 22:36:17 +00008183
Michael W. Hudson54241132001-12-07 15:38:26 +00008184# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008185# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008186# The cast to long int works around a bug in the HP C Compiler
8187# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8188# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8189# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8191$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008192if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008194else
Matthias Kloseb9621712010-04-24 17:59:49 +00008195 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 +00008196
Martin v. Löwis11437992002-04-12 09:54:03 +00008197else
Matthias Kloseb9621712010-04-24 17:59:49 +00008198 if test "$ac_cv_type_int" = yes; then
8199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008201as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008202See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 else
8204 ac_cv_sizeof_int=0
8205 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8210$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211
8212
8213
Martin v. Löwis11437992002-04-12 09:54:03 +00008214cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008215#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008216_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008217
8218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219# The cast to long int works around a bug in the HP C Compiler
8220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8222# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8224$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008225if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008227else
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 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 +00008229
Martin v. Löwis11437992002-04-12 09:54:03 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 if test "$ac_cv_type_long" = yes; then
8232 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008234as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008235See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236 else
8237 ac_cv_sizeof_long=0
8238 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8243$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244
8245
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008248#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008249_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008250
8251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252# The cast to long int works around a bug in the HP C Compiler
8253# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8254# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8255# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8257$as_echo_n "checking size of long long... " >&6; }
8258if ${ac_cv_sizeof_long_long+:} false; then :
8259 $as_echo_n "(cached) " >&6
8260else
8261 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8262
8263else
8264 if test "$ac_cv_type_long_long" = yes; then
8265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8267as_fn_error 77 "cannot compute sizeof (long long)
8268See \`config.log' for more details" "$LINENO" 5; }
8269 else
8270 ac_cv_sizeof_long_long=0
8271 fi
8272fi
8273
8274fi
8275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8276$as_echo "$ac_cv_sizeof_long_long" >&6; }
8277
8278
8279
8280cat >>confdefs.h <<_ACEOF
8281#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8282_ACEOF
8283
8284
8285# The cast to long int works around a bug in the HP C Compiler
8286# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8287# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8288# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8290$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008291if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008293else
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 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 +00008295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296else
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 if test "$ac_cv_type_void_p" = yes; then
8298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008300as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008301See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302 else
8303 ac_cv_sizeof_void_p=0
8304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8309$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310
8311
8312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008314#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008315_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008316
8317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318# The cast to long int works around a bug in the HP C Compiler
8319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8321# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8323$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008324if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008326else
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 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 +00008328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329else
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 if test "$ac_cv_type_short" = yes; then
8331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8332$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008333as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008334See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008335 else
8336 ac_cv_sizeof_short=0
8337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8342$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008343
8344
8345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008347#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008348_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008349
8350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351# The cast to long int works around a bug in the HP C Compiler
8352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8354# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8356$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008357if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008359else
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 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 +00008361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362else
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 if test "$ac_cv_type_float" = yes; then
8364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008366as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008367See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008368 else
8369 ac_cv_sizeof_float=0
8370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8375$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376
8377
8378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008380#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008381_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008382
8383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384# The cast to long int works around a bug in the HP C Compiler
8385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8387# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8389$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008390if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 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 +00008394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395else
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 if test "$ac_cv_type_double" = yes; then
8397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008399as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008400See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401 else
8402 ac_cv_sizeof_double=0
8403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8408$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409
8410
8411
Martin v. Löwis11437992002-04-12 09:54:03 +00008412cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008413#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008414_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008415
8416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417# The cast to long int works around a bug in the HP C Compiler
8418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8420# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8422$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008423if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008425else
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 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 +00008427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428else
Matthias Kloseb9621712010-04-24 17:59:49 +00008429 if test "$ac_cv_type_fpos_t" = yes; then
8430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008432as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008433See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434 else
8435 ac_cv_sizeof_fpos_t=0
8436 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8441$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442
8443
8444
Martin v. Löwis11437992002-04-12 09:54:03 +00008445cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008446#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008447_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008448
Michael W. Hudson54241132001-12-07 15:38:26 +00008449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450# The cast to long int works around a bug in the HP C Compiler
8451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8453# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8455$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 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 +00008460
Martin v. Löwis18e16552006-02-15 17:27:45 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 if test "$ac_cv_type_size_t" = yes; then
8463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008465as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008466See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467 else
8468 ac_cv_sizeof_size_t=0
8469 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471
Martin v. Löwis18e16552006-02-15 17:27:45 +00008472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8474$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475
8476
8477
Martin v. Löwis18e16552006-02-15 17:27:45 +00008478cat >>confdefs.h <<_ACEOF
8479#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8480_ACEOF
8481
8482
Christian Heimes400adb02008-02-01 08:12:03 +00008483# The cast to long int works around a bug in the HP C Compiler
8484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8486# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8488$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 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 +00008493
Christian Heimes400adb02008-02-01 08:12:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 if test "$ac_cv_type_pid_t" = yes; then
8496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008498as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008499See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008500 else
8501 ac_cv_sizeof_pid_t=0
8502 fi
8503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504
Christian Heimes400adb02008-02-01 08:12:03 +00008505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8507$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008508
8509
8510
8511cat >>confdefs.h <<_ACEOF
8512#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8513_ACEOF
8514
8515
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008516# The cast to long int works around a bug in the HP C Compiler
8517# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8518# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8519# This bug is HP SR number 8606223364.
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8521$as_echo_n "checking size of uintptr_t... " >&6; }
8522if ${ac_cv_sizeof_uintptr_t+:} false; then :
8523 $as_echo_n "(cached) " >&6
8524else
8525 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8526
8527else
8528 if test "$ac_cv_type_uintptr_t" = yes; then
8529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8531as_fn_error 77 "cannot compute sizeof (uintptr_t)
8532See \`config.log' for more details" "$LINENO" 5; }
8533 else
8534 ac_cv_sizeof_uintptr_t=0
8535 fi
8536fi
8537
8538fi
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8540$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8541
8542
8543
8544cat >>confdefs.h <<_ACEOF
8545#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8546_ACEOF
8547
8548
Michael W. Hudson54241132001-12-07 15:38:26 +00008549
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8551$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008552have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008554/* end confdefs.h. */
8555
8556int
8557main ()
8558{
8559long double x; x = (long double)0;
8560 ;
8561 return 0;
8562}
8563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008564if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008565
8566
Matthias Kloseb9621712010-04-24 17:59:49 +00008567$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008568
8569 have_long_double=yes
8570
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008571fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8574$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008575if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008576# The cast to long int works around a bug in the HP C Compiler
8577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8579# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8581$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008582if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008584else
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 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 +00008586
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 if test "$ac_cv_type_long_double" = yes; then
8589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008591as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008592See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008593 else
8594 ac_cv_sizeof_long_double=0
8595 fi
8596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8600$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008601
8602
8603
8604cat >>confdefs.h <<_ACEOF
8605#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8606_ACEOF
8607
8608
8609fi
8610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611# The cast to long int works around a bug in the HP C Compiler
8612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8616$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008617if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 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 +00008621
Thomas Woutersb2137042007-02-01 18:02:27 +00008622else
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 if test "$ac_cv_type__Bool" = yes; then
8624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008626as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008627See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 else
8629 ac_cv_sizeof__Bool=0
8630 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632
Thomas Woutersb2137042007-02-01 18:02:27 +00008633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8635$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636
8637
8638
Thomas Woutersb2137042007-02-01 18:02:27 +00008639cat >>confdefs.h <<_ACEOF
8640#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8641_ACEOF
8642
8643
Thomas Woutersb2137042007-02-01 18:02:27 +00008644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +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 off_t" >&5
8650$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008655#ifdef HAVE_SYS_TYPES_H
8656#include <sys/types.h>
8657#endif
8658
Matthias Kloseb9621712010-04-24 17:59:49 +00008659"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 if test "$ac_cv_type_off_t" = yes; then
8663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008665as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008666See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008667 else
8668 ac_cv_sizeof_off_t=0
8669 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008671
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8674$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008675
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008676
8677
Martin v. Löwis11437992002-04-12 09:54:03 +00008678cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008679#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008680_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008681
Michael W. Hudson54241132001-12-07 15:38:26 +00008682
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008683
Matthias Kloseb9621712010-04-24 17:59:49 +00008684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8685$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008686if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008687 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008688
Matthias Kloseb9621712010-04-24 17:59:49 +00008689$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008690
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8692$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008693else
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8695$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008696fi
8697
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008698# The cast to long int works around a bug in the HP C Compiler
8699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8703$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008708#ifdef HAVE_SYS_TYPES_H
8709#include <sys/types.h>
8710#endif
8711#ifdef HAVE_TIME_H
8712#include <time.h>
8713#endif
8714
Matthias Kloseb9621712010-04-24 17:59:49 +00008715"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_time_t" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008723 else
8724 ac_cv_sizeof_time_t=0
8725 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8730$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008735#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008737
Michael W. Hudson54241132001-12-07 15:38:26 +00008738
8739
Trent Mick635f6fb2000-08-23 21:33:05 +00008740# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008741ac_save_cc="$CC"
8742if test "$ac_cv_kpthread" = "yes"
8743then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008744elif test "$ac_cv_kthread" = "yes"
8745then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008746elif test "$ac_cv_pthread" = "yes"
8747then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008748fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8751$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008752have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008754/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008755
8756 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008757int
8758main ()
8759{
Guido van Rossum12580492000-09-24 16:47:19 +00008760pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ;
8762 return 0;
8763}
Matthias Kloseb159a552010-04-25 21:00:44 +00008764
Martin v. Löwis11437992002-04-12 09:54:03 +00008765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008766if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008767 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8771$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008772if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8778$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008779if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008781else
Matthias Kloseb9621712010-04-24 17:59:49 +00008782 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783#ifdef HAVE_PTHREAD_H
8784#include <pthread.h>
8785#endif
8786
Matthias Kloseb9621712010-04-24 17:59:49 +00008787"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 if test "$ac_cv_type_pthread_t" = yes; then
8791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008793as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008794See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008795 else
8796 ac_cv_sizeof_pthread_t=0
8797 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008799
Trent Mick635f6fb2000-08-23 21:33:05 +00008800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8802$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008804
8805
Martin v. Löwis11437992002-04-12 09:54:03 +00008806cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008807#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008808_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008809
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810
Trent Mick635f6fb2000-08-23 21:33:05 +00008811fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008812CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008813
Michael W. Hudson54241132001-12-07 15:38:26 +00008814
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008815case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008816 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008817 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8818 ;;
8819 Darwin/*)
8820 OTHER_LIBTOOL_OPT=""
8821 ;;
8822esac
8823
8824
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008825
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008826case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008827 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008828 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8829 if test "${enable_universalsdk}"; then
8830 :
8831 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008832 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008833 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008834 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008835 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008836 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008837 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008838 if test ${gcc_version} '<' 4.0
8839 then
8840 LIBTOOL_CRUFT="-lcc_dynamic"
8841 else
8842 LIBTOOL_CRUFT=""
8843 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008845 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008846else
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008848/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008849
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008850 #include <unistd.h>
8851 int main(int argc, char*argv[])
8852 {
8853 if (sizeof(long) == 4) {
8854 return 0;
8855 } else {
8856 return 1;
8857 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008858 }
8859
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008861if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008862 ac_osx_32bit=yes
8863else
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008868fi
8869
8870
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008871 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008872 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008873 i386)
8874 MACOSX_DEFAULT_ARCH="i386"
8875 ;;
8876 ppc)
8877 MACOSX_DEFAULT_ARCH="ppc"
8878 ;;
8879 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008880 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008881 ;;
8882 esac
8883 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008884 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008885 i386)
8886 MACOSX_DEFAULT_ARCH="x86_64"
8887 ;;
8888 ppc)
8889 MACOSX_DEFAULT_ARCH="ppc64"
8890 ;;
8891 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008892 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008893 ;;
8894 esac
8895
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008896 fi
8897
8898 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008899 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008900 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008901esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8903$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008904if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008905then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008906 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008908 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008911
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8913$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008914 if test $enable_shared = "yes"
8915 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008916 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 +00008917 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8920$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008921fi
8922
Matthias Kloseb9621712010-04-24 17:59:49 +00008923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8924$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008925case $ac_sys_system/$ac_sys_release in
8926 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008929
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8931$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008932 ;;
8933 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8935$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008936 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008937esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008938
Guido van Rossum0a516c91994-09-12 10:58:40 +00008939# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008940
Michael W. Hudson54241132001-12-07 15:38:26 +00008941
8942
8943
8944
Benjamin Peterson99f03762010-04-11 22:15:28 +00008945
Thomas Wouters477c8d52006-05-27 19:21:47 +00008946
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008947# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8948# -- usually .so, .sl on HP-UX, .dll on Cygwin
8949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8950$as_echo_n "checking the extension of shared libraries... " >&6; }
8951if test -z "$SHLIB_SUFFIX"; then
8952 case $ac_sys_system in
8953 hp*|HP*)
8954 case `uname -m` in
8955 ia64) SHLIB_SUFFIX=.so;;
8956 *) SHLIB_SUFFIX=.sl;;
8957 esac
8958 ;;
8959 CYGWIN*) SHLIB_SUFFIX=.dll;;
8960 *) SHLIB_SUFFIX=.so;;
8961 esac
8962fi
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8964$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008965
Guido van Rossum0a516c91994-09-12 10:58:40 +00008966# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008967# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008968# (Shared libraries in this instance are shared modules to be loaded into
8969# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8971$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008972if test -z "$LDSHARED"
8973then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008974 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008975 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008976 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008977 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008978 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008979 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008980 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008982 if test "$GCC" = "yes" ; then
8983 LDSHARED='$(CC) -shared'
8984 LDCXXSHARED='$(CXX) -shared'
8985 else
8986 LDSHARED='$(CC) -G'
8987 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008988 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008989 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008990 if test "$GCC" = "yes" ; then
8991 LDSHARED='$(CC) -shared'
8992 LDCXXSHARED='$(CXX) -shared'
8993 else
8994 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008995 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008996 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008997 LDSHARED='$(CC) -bundle'
8998 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008999 if test "$enable_framework" ; then
9000 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009001 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9002 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009003 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009004 else
9005 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009006 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009007 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009008 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009009 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009010 LDSHARED='$(CC) -bundle'
9011 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009012 if test "$enable_framework" ; then
9013 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009014 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9015 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009016 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009017 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009018 # No framework, use the Python app as bundle-loader
9019 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009020 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009021 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009022 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009023 Darwin/*)
9024 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9025 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009026
Ned Deily36820b62014-06-25 13:44:22 -07009027 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9028 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9029 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9030 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9031 if test ${dep_target_major} -eq 10 && \
9032 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009033 then
Ned Deily36820b62014-06-25 13:44:22 -07009034 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009035 LDSHARED='$(CC) -bundle'
9036 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009037 if test "$enable_framework" ; then
9038 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009039 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9040 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009041 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009042 else
9043 # No framework, use the Python app as bundle-loader
9044 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9045 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009046 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009047 fi
Ned Deily36820b62014-06-25 13:44:22 -07009048 else
9049 # building for OS X 10.3 and later
9050 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9051 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9052 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009053 fi
9054 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009055 Linux*|GNU*|QNX*)
9056 LDSHARED='$(CC) -shared'
9057 LDCXXSHARED='$(CXX) -shared';;
9058 BSD/OS*/4*)
9059 LDSHARED="gcc -shared"
9060 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009061 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009062 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009063 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009064 LDSHARED='$(CC) -shared'
9065 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009066 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009067 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009068 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009069 OpenBSD*)
9070 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9071 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009072 LDSHARED='$(CC) -shared $(CCSHARED)'
9073 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009074 else
9075 case `uname -r` in
9076 [01].* | 2.[0-7] | 2.[0-7].*)
9077 LDSHARED="ld -Bshareable ${LDFLAGS}"
9078 ;;
9079 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009080 LDSHARED='$(CC) -shared $(CCSHARED)'
9081 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009082 ;;
9083 esac
9084 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009085 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009086 LDSHARED='$(CC) -shared'
9087 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009088 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009089 if test "$GCC" = "yes" ; then
9090 LDSHARED='$(CC) -shared'
9091 LDCXXSHARED='$(CXX) -shared'
9092 else
9093 LDSHARED='$(CC) -G'
9094 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009095 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009096 SCO_SV*)
9097 LDSHARED='$(CC) -Wl,-G,-Bexport'
9098 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9099 CYGWIN*)
9100 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9101 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009102 *) LDSHARED="ld";;
9103 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9106$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009107LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009108BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009109# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9112$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009113if test -z "$CCSHARED"
9114then
Guido van Rossum07397971997-04-29 21:49:50 +00009115 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009116 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009117 then CCSHARED="-fPIC";
9118 elif test `uname -p` = sparc;
9119 then CCSHARED="-xcode=pic32";
9120 else CCSHARED="-Kpic";
9121 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009122 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009123 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009124 else CCSHARED="+z";
9125 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009126 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009127 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009128 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009129 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009130 if test "$GCC" = "yes"
9131 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009132 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009133 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009134 SCO_SV*)
9135 if test "$GCC" = "yes"
9136 then CCSHARED="-fPIC"
9137 else CCSHARED="-Kpic -belf"
9138 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009139 IRIX*/6*) case $CC in
9140 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009141 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009142 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009143 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9146$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009147# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009148# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9150$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151if test -z "$LINKFORSHARED"
9152then
Guido van Rossum07397971997-04-29 21:49:50 +00009153 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009154 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009155 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009156 LINKFORSHARED="-Wl,-E -Wl,+s";;
9157# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009158 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009159 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009160 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009161 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009162 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009163
9164 # Issue #18075: the default maximum stack size (8MBytes) is too
9165 # small for the default recursion limit. Increase the stack size
9166 # to ensure that tests don't crash
9167 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9168
Jack Jansene578a632001-08-15 01:27:14 +00009169 if test "$enable_framework"
9170 then
Jack Jansenda49e192005-01-07 13:08:22 +00009171 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009172 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009173 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009174 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009175 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009176 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009177 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009178 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9179 then
9180 LINKFORSHARED="-Wl,--export-dynamic"
9181 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009182 SunOS/5*) case $CC in
9183 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009184 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009185 then
9186 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009187 fi;;
9188 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009189 CYGWIN*)
9190 if test $enable_shared = "no"
9191 then
9192 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9193 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009194 QNX*)
9195 # -Wl,-E causes the symbols to be added to the dynamic
9196 # symbol table so that they can be found when a module
9197 # is loaded. -N 2048K causes the stack size to be set
9198 # to 2048 kilobytes so that the stack doesn't overflow
9199 # when running test_compile.py.
9200 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009201 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9204$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009205
Michael W. Hudson54241132001-12-07 15:38:26 +00009206
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009207
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9209$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009210if test ! "$LIBRARY" = "$LDLIBRARY"
9211then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009212 case $ac_sys_system in
9213 CYGWIN*)
9214 # Cygwin needs CCSHARED when building extension DLLs
9215 # but not when building the interpreter DLL.
9216 CFLAGSFORSHARED='';;
9217 *)
9218 CFLAGSFORSHARED='$(CCSHARED)'
9219 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9222$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009223
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009224# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9225# library (with --enable-shared).
9226# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009227# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9228# if it is not required, since it creates a dependency of the shared library
9229# to LIBS. This, in turn, means that applications linking the shared libpython
9230# don't need to link LIBS explicitly. The default should be only changed
9231# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9234$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009235case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009236 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009237 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009238esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9240$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009241
9242
Guido van Rossum627b2d71993-12-24 10:39:16 +00009243# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9245$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009246if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009247 $as_echo_n "(cached) " >&6
9248else
9249 ac_check_lib_save_LIBS=$LIBS
9250LIBS="-lsendfile $LIBS"
9251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9252/* end confdefs.h. */
9253
9254/* Override any GCC internal prototype to avoid an error.
9255 Use char because int might match the return type of a GCC
9256 builtin and then its argument prototype would still apply. */
9257#ifdef __cplusplus
9258extern "C"
9259#endif
9260char sendfile ();
9261int
9262main ()
9263{
9264return sendfile ();
9265 ;
9266 return 0;
9267}
9268_ACEOF
9269if ac_fn_c_try_link "$LINENO"; then :
9270 ac_cv_lib_sendfile_sendfile=yes
9271else
9272 ac_cv_lib_sendfile_sendfile=no
9273fi
9274rm -f core conftest.err conftest.$ac_objext \
9275 conftest$ac_exeext conftest.$ac_ext
9276LIBS=$ac_check_lib_save_LIBS
9277fi
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9279$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009280if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009281 cat >>confdefs.h <<_ACEOF
9282#define HAVE_LIBSENDFILE 1
9283_ACEOF
9284
9285 LIBS="-lsendfile $LIBS"
9286
9287fi
9288
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9290$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009291if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009293else
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009295LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009299/* Override any GCC internal prototype to avoid an error.
9300 Use char because int might match the return type of a GCC
9301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009302#ifdef __cplusplus
9303extern "C"
9304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009305char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009309return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009310 ;
9311 return 0;
9312}
9313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009314if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009316else
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319rm -f core conftest.err conftest.$ac_objext \
9320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009321LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9324$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009325if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 cat >>confdefs.h <<_ACEOF
9327#define HAVE_LIBDL 1
9328_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009329
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009330 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009332fi
9333 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9335$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009336if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009338else
Martin v. Löwis11437992002-04-12 09:54:03 +00009339 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009340LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344/* Override any GCC internal prototype to avoid an error.
9345 Use char because int might match the return type of a GCC
9346 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009347#ifdef __cplusplus
9348extern "C"
9349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009350char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009351int
9352main ()
9353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 ;
9356 return 0;
9357}
9358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009359if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009361else
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364rm -f core conftest.err conftest.$ac_objext \
9365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9369$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009370if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009371 cat >>confdefs.h <<_ACEOF
9372#define HAVE_LIBDLD 1
9373_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009374
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009375 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009376
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009377fi
9378 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009379
Georg Brandlb1441c72009-01-03 22:33:39 +00009380# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009381if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9383$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009384if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009386else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009387 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391/* Override any GCC internal prototype to avoid an error.
9392 Use char because int might match the return type of a GCC
9393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394#ifdef __cplusplus
9395extern "C"
9396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009397char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
9400{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 ;
9403 return 0;
9404}
9405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406for ac_lib in '' pthread rt posix4; do
9407 if test -z "$ac_lib"; then
9408 ac_res="none required"
9409 else
9410 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009411 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009412 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009416rm -f core conftest.err conftest.$ac_objext \
9417 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009418 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421done
Victor Stinnere0be4232011-10-25 13:06:09 +02009422if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424else
9425 ac_cv_search_sem_init=no
9426fi
9427rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009428LIBS=$ac_func_search_save_LIBS
9429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9431$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009435
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009436fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009437 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009438 # posix4 on Solaris 2.6
9439 # pthread (first!) on Linux
9440fi
9441
Martin v. Löwis19d17342003-06-14 21:03:05 +00009442# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9444$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009445if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009447else
9448 ac_check_lib_save_LIBS=$LIBS
9449LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009451/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453/* Override any GCC internal prototype to avoid an error.
9454 Use char because int might match the return type of a GCC
9455 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009456#ifdef __cplusplus
9457extern "C"
9458#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009459char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009460int
9461main ()
9462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009464 ;
9465 return 0;
9466}
9467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009469 ac_cv_lib_intl_textdomain=yes
9470else
Matthias Kloseb9621712010-04-24 17:59:49 +00009471 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473rm -f core conftest.err conftest.$ac_objext \
9474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009475LIBS=$ac_check_lib_save_LIBS
9476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9478$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009479if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009480
Matthias Kloseb9621712010-04-24 17:59:49 +00009481$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009482
Brett Cannonc6d936e2009-06-07 20:09:53 +00009483 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009484fi
9485
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009486
9487# checks for system dependent C++ extensions support
9488case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9490$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009493
Georg Brandl59e87bd2011-02-15 19:48:59 +00009494 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009495int
9496main ()
9497{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009498loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ;
9500 return 0;
9501}
Matthias Kloseb159a552010-04-25 21:00:44 +00009502
Martin v. Löwis11437992002-04-12 09:54:03 +00009503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009504if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009505
Matthias Kloseb159a552010-04-25 21:00:44 +00009506
Matthias Kloseb9621712010-04-24 17:59:49 +00009507$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009508
Matthias Kloseb159a552010-04-25 21:00:44 +00009509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009510$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009511
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009512else
Matthias Kloseb159a552010-04-25 21:00:44 +00009513
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009515$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009516
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518rm -f core conftest.err conftest.$ac_objext \
9519 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009520 *) ;;
9521esac
9522
Christian Heimes985ecdc2013-11-20 11:46:18 +01009523# check for systems that require aligned memory access
9524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9525$as_echo_n "checking aligned memory access is required... " >&6; }
9526if test "$cross_compiling" = yes; then :
9527 aligned_required=yes
9528else
9529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530/* end confdefs.h. */
9531
9532int main()
9533{
9534 char s[16];
9535 int i, *p1, *p2;
9536 for (i=0; i < 16; i++)
9537 s[i] = i;
9538 p1 = (int*)(s+1);
9539 p2 = (int*)(s+2);
9540 if (*p1 == *p2)
9541 return 1;
9542 return 0;
9543}
9544
9545_ACEOF
9546if ac_fn_c_try_run "$LINENO"; then :
9547 aligned_required=no
9548else
9549 aligned_required=yes
9550fi
9551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9552 conftest.$ac_objext conftest.beam conftest.$ac_ext
9553fi
9554
9555
9556if test "$aligned_required" = yes ; then
9557
9558$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9559
9560fi
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9562$as_echo "$aligned_required" >&6; }
9563
9564
9565# str, bytes and memoryview hash algorithm
9566
9567
9568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9569$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9570
9571# Check whether --with-hash_algorithm was given.
9572if test "${with_hash_algorithm+set}" = set; then :
9573 withval=$with_hash_algorithm;
9574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9575$as_echo "$withval" >&6; }
9576case "$withval" in
9577 siphash24)
9578 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9579
9580 ;;
9581 fnv)
9582 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9583
9584 ;;
9585 *)
9586 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9587 ;;
9588esac
9589
9590else
9591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9592$as_echo "default" >&6; }
9593fi
9594
9595
Charles-François Natalid30b0222014-05-08 23:08:51 +01009596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9597$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9598
9599# Check whether --with-address_sanitizer was given.
9600if test "${with_address_sanitizer+set}" = set; then :
9601 withval=$with_address_sanitizer;
9602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9603$as_echo "$withval" >&6; }
9604BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9605LDFLAGS="-fsanitize=address $LDFLAGS"
9606
9607else
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
Guido van Rossum70c7f481998-03-26 18:44:10 +00009613# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9615$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009616if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009618else
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009620LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624/* Override any GCC internal prototype to avoid an error.
9625 Use char because int might match the return type of a GCC
9626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009627#ifdef __cplusplus
9628extern "C"
9629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009630char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009631int
9632main ()
9633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 ;
9636 return 0;
9637}
9638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009641else
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644rm -f core conftest.err conftest.$ac_objext \
9645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9649$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009650if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009651 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009652fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009653 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9655$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009656if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009658else
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009660LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664/* Override any GCC internal prototype to avoid an error.
9665 Use char because int might match the return type of a GCC
9666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009667#ifdef __cplusplus
9668extern "C"
9669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009670char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ;
9676 return 0;
9677}
9678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009681else
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009684rm -f core conftest.err conftest.$ac_objext \
9685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009686LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9689$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009690if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009691 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009692fi
9693 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9696$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009699if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009700 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9702$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009703LIBS="$withval $LIBS"
9704
9705else
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9707$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708fi
9709
Guido van Rossum7f43da71994-08-01 12:15:30 +00009710
Victor Stinner8291b5e2015-03-20 16:03:14 +01009711
9712
9713
9714
9715
9716
9717
9718if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9719 if test -n "$ac_tool_prefix"; then
9720 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9721set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723$as_echo_n "checking for $ac_word... " >&6; }
9724if ${ac_cv_path_PKG_CONFIG+:} false; then :
9725 $as_echo_n "(cached) " >&6
9726else
9727 case $PKG_CONFIG in
9728 [\\/]* | ?:[\\/]*)
9729 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9730 ;;
9731 *)
9732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733for as_dir in $PATH
9734do
9735 IFS=$as_save_IFS
9736 test -z "$as_dir" && as_dir=.
9737 for ac_exec_ext in '' $ac_executable_extensions; do
9738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741 break 2
9742 fi
9743done
9744 done
9745IFS=$as_save_IFS
9746
9747 ;;
9748esac
9749fi
9750PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9751if test -n "$PKG_CONFIG"; then
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9753$as_echo "$PKG_CONFIG" >&6; }
9754else
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
9757fi
9758
9759
9760fi
9761if test -z "$ac_cv_path_PKG_CONFIG"; then
9762 ac_pt_PKG_CONFIG=$PKG_CONFIG
9763 # Extract the first word of "pkg-config", so it can be a program name with args.
9764set dummy pkg-config; ac_word=$2
9765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9766$as_echo_n "checking for $ac_word... " >&6; }
9767if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9768 $as_echo_n "(cached) " >&6
9769else
9770 case $ac_pt_PKG_CONFIG in
9771 [\\/]* | ?:[\\/]*)
9772 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9773 ;;
9774 *)
9775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9776for as_dir in $PATH
9777do
9778 IFS=$as_save_IFS
9779 test -z "$as_dir" && as_dir=.
9780 for ac_exec_ext in '' $ac_executable_extensions; do
9781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9782 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9784 break 2
9785 fi
9786done
9787 done
9788IFS=$as_save_IFS
9789
9790 ;;
9791esac
9792fi
9793ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9794if test -n "$ac_pt_PKG_CONFIG"; then
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9796$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9797else
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
9800fi
9801
9802 if test "x$ac_pt_PKG_CONFIG" = x; then
9803 PKG_CONFIG=""
9804 else
9805 case $cross_compiling:$ac_tool_warned in
9806yes:)
9807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9809ac_tool_warned=yes ;;
9810esac
9811 PKG_CONFIG=$ac_pt_PKG_CONFIG
9812 fi
9813else
9814 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9815fi
9816
9817fi
9818if test -n "$PKG_CONFIG"; then
9819 _pkg_min_version=0.9.0
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9821$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9822 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9824$as_echo "yes" >&6; }
9825 else
9826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9827$as_echo "no" >&6; }
9828 PKG_CONFIG=""
9829 fi
9830fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009831
9832# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9834$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009835
9836# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009837if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009838 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009839else
9840 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009841fi
9842
9843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9845$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009846
9847# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9849$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009850
9851# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009852if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009853 withval=$with_system_ffi;
9854fi
9855
9856
Zachary Ware935043d2016-09-09 17:01:21 -07009857case "$with_system_ffi" in
9858 "")
9859 case $ac_sys_system in
9860 Darwin)
9861 with_system_ffi="no"
9862 ;;
9863 *)
9864 with_system_ffi="yes"
9865 ;;
9866 esac
9867 ;;
9868 yes|no)
9869 ;;
9870 *)
9871 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
9872 ;;
9873esac
9874
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009875if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009876 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9877else
9878 LIBFFI_INCLUDEDIR=""
9879fi
9880
9881
Matthias Kloseb9621712010-04-24 17:59:49 +00009882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9883$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009884
Stefan Krah60187b52012-03-23 19:06:27 +01009885# Check for use of the system libmpdec library
9886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9887$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9888
9889# Check whether --with-system_libmpdec was given.
9890if test "${with_system_libmpdec+set}" = set; then :
9891 withval=$with_system_libmpdec;
9892else
9893 with_system_libmpdec="no"
9894fi
9895
9896
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9898$as_echo "$with_system_libmpdec" >&6; }
9899
Benjamin Peterson076ed002010-10-31 17:11:02 +00009900# Check for support for loadable sqlite extensions
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9902$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9903# Check whether --enable-loadable-sqlite-extensions was given.
9904if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9905 enableval=$enable_loadable_sqlite_extensions;
9906else
9907 enable_loadable_sqlite_extensions="no"
9908fi
9909
9910
9911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9912$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9913
Ned Deilyd819b932013-09-06 01:07:05 -07009914# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9915
9916
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9918$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9919
9920# Check whether --with-tcltk-includes was given.
9921if test "${with_tcltk_includes+set}" = set; then :
9922 withval=$with_tcltk_includes;
9923else
9924 with_tcltk_includes="default"
9925fi
9926
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9928$as_echo "$with_tcltk_includes" >&6; }
9929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9930$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9931
9932# Check whether --with-tcltk-libs was given.
9933if test "${with_tcltk_libs+set}" = set; then :
9934 withval=$with_tcltk_libs;
9935else
9936 with_tcltk_libs="default"
9937fi
9938
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9940$as_echo "$with_tcltk_libs" >&6; }
9941if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9942then
9943 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9944 then
9945 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9946 fi
9947 TCLTK_INCLUDES=""
9948 TCLTK_LIBS=""
9949else
9950 TCLTK_INCLUDES="$with_tcltk_includes"
9951 TCLTK_LIBS="$with_tcltk_libs"
9952fi
9953
Matthias Klose55708cc2009-04-30 08:06:49 +00009954# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9956$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009957
9958# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009959if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009960 withval=$with_dbmliborder;
9961if test x$with_dbmliborder = xyes
9962then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009963as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009964else
9965 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9966 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9967 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009968 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009969 fi
9970 done
9971fi
9972fi
9973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9975$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009976
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009977# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009978
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009979USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981
Martin v. Löwis11437992002-04-12 09:54:03 +00009982
9983# Templates for things AC_DEFINEd more than once.
9984# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009985
9986
Martin v. Löwis11437992002-04-12 09:54:03 +00009987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9989$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009991# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009992if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009993 withval=$with_threads;
9994fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009995
9996
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009997# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010000if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001 withval=$with_thread; with_threads=$with_thread
10002fi
10003
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010004
10005if test -z "$with_threads"
10006then with_threads="yes"
10007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10009$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010010
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010011
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010012if test "$with_threads" = "no"
10013then
10014 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010015elif test "$ac_cv_pthread_is_default" = yes
10016then
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010018
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010019 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010021
10022 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010023 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010024elif test "$ac_cv_kpthread" = "yes"
10025then
10026 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010027 if test "$ac_cv_cxx_thread" = "yes"; then
10028 CXX="$CXX -Kpthread"
10029 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010032 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010033 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010034elif test "$ac_cv_kthread" = "yes"
10035then
10036 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010037 if test "$ac_cv_cxx_thread" = "yes"; then
10038 CXX="$CXX -Kthread"
10039 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010040 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010041
10042 posix_threads=yes
10043 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010044elif test "$ac_cv_pthread" = "yes"
10045then
10046 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010047 if test "$ac_cv_cxx_thread" = "yes"; then
10048 CXX="$CXX -pthread"
10049 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010051
10052 posix_threads=yes
10053 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010054else
10055 if test ! -z "$with_threads" -a -d "$with_threads"
10056 then LDFLAGS="$LDFLAGS -L$with_threads"
10057 fi
10058 if test ! -z "$withval" -a -d "$withval"
10059 then LDFLAGS="$LDFLAGS -L$withval"
10060 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010061
10062 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010063 # define _POSIX_THREADS in unistd.h. Some apparently don't
10064 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10066$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010069
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010070#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010071#ifdef _POSIX_THREADS
10072yes
10073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010074
10075_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010078 unistd_defines_pthreads=yes
10079else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010080 unistd_defines_pthreads=no
10081fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010082rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010083
Matthias Kloseb9621712010-04-24 17:59:49 +000010084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10085$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010088
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010089 # Just looking for pthread_create in libpthread is not enough:
10090 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10091 # So we really have to include pthread.h, and then link.
10092 _libs=$LIBS
10093 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10095$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010097/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010098
10099#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010100#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010101
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010102void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010103int
10104main ()
10105{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010106
10107pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 ;
10109 return 0;
10110}
10111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010112if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010113
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10115$as_echo "yes" >&6; }
10116 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010117
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010118 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010119 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010120else
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010122 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010124if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010126
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010127 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010128 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010129else
Guido van Rossumad678af1998-10-02 14:42:15 +000010130
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10132$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010133if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010135else
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010137LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141/* Override any GCC internal prototype to avoid an error.
10142 Use char because int might match the return type of a GCC
10143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144#ifdef __cplusplus
10145extern "C"
10146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010147char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ;
10153 return 0;
10154}
10155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010158else
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010161rm -f core conftest.err conftest.$ac_objext \
10162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010163LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10166$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010167if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010172 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010173else
Greg Steinadf63d62000-07-05 10:38:09 +000010174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10176$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010177if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010179else
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010181LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185/* Override any GCC internal prototype to avoid an error.
10186 Use char because int might match the return type of a GCC
10187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010188#ifdef __cplusplus
10189extern "C"
10190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010191char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010192int
10193main ()
10194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ;
10197 return 0;
10198}
10199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010202else
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205rm -f core conftest.err conftest.$ac_objext \
10206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010207LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10210$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010211if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010213
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010214 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010215 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010216 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010217else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010218
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10220$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010221if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010223else
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010225LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229/* Override any GCC internal prototype to avoid an error.
10230 Use char because int might match the return type of a GCC
10231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010232#ifdef __cplusplus
10233extern "C"
10234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010235char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010236int
10237main ()
10238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ;
10241 return 0;
10242}
10243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010249rm -f core conftest.err conftest.$ac_objext \
10250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010251LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10254$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010255if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010257
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010258 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010259 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010260 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010261else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010262
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10264$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010265if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010267else
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010269LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010273/* Override any GCC internal prototype to avoid an error.
10274 Use char because int might match the return type of a GCC
10275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010276#ifdef __cplusplus
10277extern "C"
10278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010279char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010280int
10281main ()
10282{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010284 ;
10285 return 0;
10286}
10287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010288if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010290else
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010293rm -f core conftest.err conftest.$ac_objext \
10294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010295LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10298$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010299if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010300 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010301
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010302 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010303 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010304 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010305else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010306
Martin v. Löwis130fb172001-07-19 11:00:41 +000010307 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010308fi
10309
Guido van Rossum627b2d71993-12-24 10:39:16 +000010310
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010311fi
10312
Guido van Rossum0be3e491997-05-22 20:33:33 +000010313fi
10314
Guido van Rossum49545951997-12-02 19:28:29 +000010315fi
10316
Guido van Rossumb93a8621998-05-07 13:27:32 +000010317fi
10318
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010320rm -f core conftest.err conftest.$ac_objext \
10321 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10324$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010325if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010327else
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010329LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333/* Override any GCC internal prototype to avoid an error.
10334 Use char because int might match the return type of a GCC
10335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010336#ifdef __cplusplus
10337extern "C"
10338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010339char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
10342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010350else
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010353rm -f core conftest.err conftest.$ac_objext \
10354 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010355LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10358$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010359if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010361
Martin v. Löwis130fb172001-07-19 11:00:41 +000010362 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010363 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010364 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010365fi
10366
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010367
Neal Norwitza978ab02002-11-02 16:58:05 +000010368 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10370$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010371if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010373else
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010375LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379/* Override any GCC internal prototype to avoid an error.
10380 Use char because int might match the return type of a GCC
10381 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010382#ifdef __cplusplus
10383extern "C"
10384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010385char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010386int
10387main ()
10388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010390 ;
10391 return 0;
10392}
10393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010396else
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010399rm -f core conftest.err conftest.$ac_objext \
10400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010401LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10404$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010405if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010407
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010408 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010409 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010410 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010411fi
10412
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010413 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010414fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010415
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010416if test "$posix_threads" = "yes"; then
10417 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010420
10421 fi
10422
10423 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10424 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010425 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010426$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010427
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010428 ;;
10429 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010430$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010431
10432 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010433 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010434$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010435
10436 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010437 esac
10438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10440$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010441 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010443else
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010445 ac_cv_pthread_system_supported=no
10446else
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010449
10450 #include <stdio.h>
10451 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010452 void *foo(void *parm) {
10453 return NULL;
10454 }
10455 main() {
10456 pthread_attr_t attr;
10457 pthread_t id;
10458 if (pthread_attr_init(&attr)) exit(-1);
10459 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10460 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10461 exit(0);
10462 }
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010465 ac_cv_pthread_system_supported=yes
10466else
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010471fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473
Guido van Rossum627b2d71993-12-24 10:39:16 +000010474fi
10475
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10477$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010478 if test "$ac_cv_pthread_system_supported" = "yes"; then
10479
Matthias Kloseb9621712010-04-24 17:59:49 +000010480$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010481
10482 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 for ac_func in pthread_sigmask
10484do :
10485 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010486if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010487 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010488#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010489_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010490 case $ac_sys_system in
10491 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492
Matthias Kloseb9621712010-04-24 17:59:49 +000010493$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010494
10495 ;;
10496 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010497fi
10498done
10499
Christian Heimesf77b4b22013-08-21 13:26:05 +020010500 for ac_func in pthread_atfork
10501do :
10502 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10503if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10504 cat >>confdefs.h <<_ACEOF
10505#define HAVE_PTHREAD_ATFORK 1
10506_ACEOF
10507
10508fi
10509done
10510
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010511fi
10512
10513
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010514# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010515
Matthias Kloseb9621712010-04-24 17:59:49 +000010516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10517$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010518# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010519if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010521 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10523$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010524 ipv6=no
10525 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10527$as_echo "yes" >&6; }
10528 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010529
10530 ipv6=yes
10531 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010532 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533else
Martin v. Löwis11437992002-04-12 09:54:03 +000010534
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010536/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010537 /* AF_INET6 available check */
10538#include <sys/types.h>
10539#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010540int
10541main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010542{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010543int domain = AF_INET6;
10544 ;
10545 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010546}
Martin v. Löwis11437992002-04-12 09:54:03 +000010547_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010548if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010549
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10551$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010553
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010554else
Matthias Kloseb159a552010-04-25 21:00:44 +000010555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10557$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010558 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010559
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010560fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010563if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10565$as_echo_n "checking if RFC2553 API is available... " >&6; }
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010567/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010568
10569 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010570#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010571int
10572main ()
10573{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010574struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010575 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 ;
10577 return 0;
10578}
Matthias Kloseb159a552010-04-25 21:00:44 +000010579
Martin v. Löwis11437992002-04-12 09:54:03 +000010580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010581if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010582
10583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010584$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010585 ipv6=yes
10586
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010587else
Matthias Kloseb159a552010-04-25 21:00:44 +000010588
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010590$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010591 ipv6=no
10592
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010595fi
10596
10597if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010599
10600fi
10601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602fi
10603
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010604
10605ipv6type=unknown
10606ipv6lib=none
10607ipv6trylibc=no
10608
10609if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10611$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010612 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10613 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010614 case $i in
10615 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010617/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010618
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010619#include <netinet/in.h>
10620#ifdef IPV6_INRIA_VERSION
10621yes
10622#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010623_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010626 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010627fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010628rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010629
10630 ;;
10631 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010633/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010634
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010635#include <netinet/in.h>
10636#ifdef __KAME__
10637yes
10638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010639_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010640if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010642 ipv6type=$i;
10643 ipv6lib=inet6
10644 ipv6libdir=/usr/local/v6/lib
10645 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010647rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648
10649 ;;
10650 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010652/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010653
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010654#include <features.h>
10655#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10656yes
10657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010658_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661 ipv6type=$i;
10662 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010663fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010664rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010665
10666 ;;
10667 linux-inet6)
10668 if test -d /usr/inet6; then
10669 ipv6type=$i
10670 ipv6lib=inet6
10671 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010672 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010673 fi
10674 ;;
10675 solaris)
10676 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010677 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 ipv6type=$i
10679 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680 fi
10681 fi
10682 ;;
10683 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010685/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010686
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687#include <sys/param.h>
10688#ifdef _TOSHIBA_INET6
10689yes
10690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010691_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010694 ipv6type=$i;
10695 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010696 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010697fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010698rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699
10700 ;;
10701 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010703/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010704
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010705#include </usr/local/v6/include/sys/v6config.h>
10706#ifdef __V6D__
10707yes
10708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010709_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712 ipv6type=$i;
10713 ipv6lib=v6;
10714 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010715 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010717rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718
10719 ;;
10720 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010723
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724#include <sys/param.h>
10725#ifdef _ZETA_MINAMI_INET6
10726yes
10727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010728_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731 ipv6type=$i;
10732 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010733 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010735rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010736
10737 ;;
10738 esac
10739 if test "$ipv6type" != "unknown"; then
10740 break
10741 fi
10742 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10744$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745fi
10746
10747if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10748 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10749 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10750 echo "using lib$ipv6lib"
10751 else
10752 if test $ipv6trylibc = "yes"; then
10753 echo "using libc"
10754 else
10755 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10756 echo "You need to fetch lib$ipv6lib.a from appropriate"
10757 echo 'ipv6 kit and compile beforehand.'
10758 exit 1
10759 fi
10760 fi
10761fi
10762
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10764$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10766/* end confdefs.h. */
10767 /* CAN_RAW_FD_FRAMES available check */
10768#include <linux/can/raw.h>
10769int
10770main ()
10771{
10772int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10773 ;
10774 return 0;
10775}
10776_ACEOF
10777if ac_fn_c_try_compile "$LINENO"; then :
10778
10779
10780$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10781
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10783$as_echo "yes" >&6; }
10784
10785else
10786
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788$as_echo "no" >&6; }
10789
10790fi
10791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10792
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010793# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10795$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010798if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799 withval=$with_doc_strings;
10800fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010801
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010802
10803if test -z "$with_doc_strings"
10804then with_doc_strings="yes"
10805fi
10806if test "$with_doc_strings" != "no"
10807then
10808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010810
10811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10813$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010814
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010815# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10817$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010820if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821 withval=$with_pymalloc;
10822fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010823
Neil Schemenauera35c6882001-02-27 04:45:05 +000010824
Neil Schemenauer16c22972002-03-22 15:34:49 +000010825if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010826then
10827 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010828fi
10829if test "$with_pymalloc" != "no"
10830then
Martin v. Löwis11437992002-04-12 09:54:03 +000010831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010833
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010834 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10837$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010838
Benjamin Peterson05159c42009-12-03 03:01:27 +000010839# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10841$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010842
10843# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010844if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010845 withval=$with_valgrind;
10846else
10847 with_valgrind=no
10848fi
10849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10851$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010852if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 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 +020010854if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010857
10858else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010859 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010860
10861fi
10862
10863
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010864 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010865fi
10866
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010867# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010868
Guido van Rossum98935bf2001-09-05 19:13:16 +000010869DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010870
Guido van Rossume97ee181999-12-20 21:27:22 +000010871# the dlopen() function means we might want to use dynload_shlib.o. some
10872# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010873for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010874do :
10875 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010876if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010878#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010879_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010880
Guido van Rossume97ee181999-12-20 21:27:22 +000010881fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010882done
Guido van Rossume97ee181999-12-20 21:27:22 +000010883
Michael W. Hudson54241132001-12-07 15:38:26 +000010884
Guido van Rossume97ee181999-12-20 21:27:22 +000010885# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10886# loading of modules.
10887
Matthias Kloseb9621712010-04-24 17:59:49 +000010888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10889$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010890if test -z "$DYNLOADFILE"
10891then
10892 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010893 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10894 if test "$ac_cv_func_dlopen" = yes
10895 then DYNLOADFILE="dynload_shlib.o"
10896 else DYNLOADFILE="dynload_aix.o"
10897 fi
10898 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010899 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010900 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10901 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010902 *)
10903 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10904 # out any dynamic loading
10905 if test "$ac_cv_func_dlopen" = yes
10906 then DYNLOADFILE="dynload_shlib.o"
10907 else DYNLOADFILE="dynload_stub.o"
10908 fi
10909 ;;
10910 esac
10911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10913$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010914if test "$DYNLOADFILE" != "dynload_stub.o"
10915then
Martin v. Löwis11437992002-04-12 09:54:03 +000010916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010918
10919fi
10920
Neil Schemenauer4e425612001-06-19 15:44:15 +000010921# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10922
Michael W. Hudson54241132001-12-07 15:38:26 +000010923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10925$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010926if test -z "$MACHDEP_OBJS"
10927then
Jack Jansene578a632001-08-15 01:27:14 +000010928 MACHDEP_OBJS=$extra_machdep_objs
10929else
10930 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010931fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010932if test -z "$MACHDEP_OBJS"; then
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10934$as_echo "none" >&6; }
10935else
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10937$as_echo "$MACHDEP_OBJS" >&6; }
10938fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010939
Guido van Rossum627b2d71993-12-24 10:39:16 +000010940# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010941for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010942 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010943 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010944 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010945 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010946 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010947 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010948 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10949 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010950 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010951 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010952 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010953 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010954 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010955 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010956 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10957 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010958 sigaction sigaltstack siginterrupt sigpending sigrelse \
10959 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010960 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010961 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010962 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010963do :
10964 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10965ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010966if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010967 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010968#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010969_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010970
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010971fi
10972done
10973
Michael W. Hudson54241132001-12-07 15:38:26 +000010974
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010975ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10976 #include <dirent.h>
10977"
10978if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10979
10980$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10981
10982fi
10983
10984
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010985# For some functions, having a definition is not sufficient, since
10986# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10988$as_echo_n "checking for chroot... " >&6; }
10989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010991#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010992int
10993main ()
10994{
10995void *x=chroot
10996 ;
10997 return 0;
10998}
10999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011001
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011003
Matthias Kloseb159a552010-04-25 21:00:44 +000011004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011006else
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011009
11010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11013$as_echo_n "checking for link... " >&6; }
11014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011015/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011016#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011017int
11018main ()
11019{
11020void *x=link
11021 ;
11022 return 0;
11023}
11024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011028
Matthias Kloseb159a552010-04-25 21:00:44 +000011029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011031else
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11033$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011034
11035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11038$as_echo_n "checking for symlink... " >&6; }
11039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011041#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011042int
11043main ()
11044{
11045void *x=symlink
11046 ;
11047 return 0;
11048}
11049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011053
Matthias Kloseb159a552010-04-25 21:00:44 +000011054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011055$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011056else
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11058$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011059
11060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11063$as_echo_n "checking for fchdir... " >&6; }
11064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011065/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011066#include <unistd.h>
11067int
11068main ()
11069{
11070void *x=fchdir
11071 ;
11072 return 0;
11073}
11074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011078
Matthias Kloseb159a552010-04-25 21:00:44 +000011079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011080$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011084
11085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11088$as_echo_n "checking for fsync... " >&6; }
11089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011090/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011091#include <unistd.h>
11092int
11093main ()
11094{
11095void *x=fsync
11096 ;
11097 return 0;
11098}
11099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011101
Matthias Kloseb9621712010-04-24 17:59:49 +000011102$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011103
Matthias Kloseb159a552010-04-25 21:00:44 +000011104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011105$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011106else
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11108$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011109
11110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11113$as_echo_n "checking for fdatasync... " >&6; }
11114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011115/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011116#include <unistd.h>
11117int
11118main ()
11119{
11120void *x=fdatasync
11121 ;
11122 return 0;
11123}
11124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011128
Matthias Kloseb159a552010-04-25 21:00:44 +000011129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011130$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011131else
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11133$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011134
11135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11138$as_echo_n "checking for epoll... " >&6; }
11139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011140/* end confdefs.h. */
11141#include <sys/epoll.h>
11142int
11143main ()
11144{
11145void *x=epoll_create
11146 ;
11147 return 0;
11148}
11149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011150if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011151
Matthias Kloseb9621712010-04-24 17:59:49 +000011152$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011153
Matthias Kloseb159a552010-04-25 21:00:44 +000011154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011156else
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011159
11160fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11163$as_echo_n "checking for epoll_create1... " >&6; }
11164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11165/* end confdefs.h. */
11166#include <sys/epoll.h>
11167int
11168main ()
11169{
11170void *x=epoll_create1
11171 ;
11172 return 0;
11173}
11174_ACEOF
11175if ac_fn_c_try_compile "$LINENO"; then :
11176
11177$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11178
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11180$as_echo "yes" >&6; }
11181else
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11183$as_echo "no" >&6; }
11184
11185fi
11186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11188$as_echo_n "checking for kqueue... " >&6; }
11189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011190/* end confdefs.h. */
11191
11192#include <sys/types.h>
11193#include <sys/event.h>
11194
11195int
11196main ()
11197{
11198int x=kqueue()
11199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011204
Matthias Kloseb9621712010-04-24 17:59:49 +000011205$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011206
Matthias Kloseb159a552010-04-25 21:00:44 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011208$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011209else
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011212
11213fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11216$as_echo_n "checking for prlimit... " >&6; }
11217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11218/* end confdefs.h. */
11219
11220#include <sys/time.h>
11221#include <sys/resource.h>
11222
11223int
11224main ()
11225{
11226void *x=prlimit
11227 ;
11228 return 0;
11229}
11230_ACEOF
11231if ac_fn_c_try_compile "$LINENO"; then :
11232
11233$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11234
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11236$as_echo "yes" >&6; }
11237else
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
11240
11241fi
11242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11243
Martin v. Löwisd5843682002-11-21 20:41:28 +000011244# On some systems (eg. FreeBSD 5), we would find a definition of the
11245# functions ctermid_r, setgroups in the library, but no prototype
11246# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11247# address to avoid compiler warnings and potential miscompilations
11248# because of the missing prototypes.
11249
Matthias Kloseb9621712010-04-24 17:59:49 +000011250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11251$as_echo_n "checking for ctermid_r... " >&6; }
11252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011253/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011254
Martin v. Löwisd5843682002-11-21 20:41:28 +000011255#include <stdio.h>
11256
Martin v. Löwisd5843682002-11-21 20:41:28 +000011257int
11258main ()
11259{
11260void* p = ctermid_r
11261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011268
Matthias Kloseb159a552010-04-25 21:00:44 +000011269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011271else
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11273$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011274
11275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11279$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011280if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011281 $as_echo_n "(cached) " >&6
11282else
11283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011285#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011286int
11287main ()
11288{
11289void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011290
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011295if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011296 ac_cv_flock_decl=yes
11297else
11298 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011299
11300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011302
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011303fi
11304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11305$as_echo "$ac_cv_flock_decl" >&6; }
11306if test "x${ac_cv_flock_decl}" = xyes; then
11307 for ac_func in flock
11308do :
11309 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011310if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011311 cat >>confdefs.h <<_ACEOF
11312#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011313_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011314
Antoine Pitroua3000072010-09-07 14:52:42 +000011315else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011317$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011318if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011319 $as_echo_n "(cached) " >&6
11320else
11321 ac_check_lib_save_LIBS=$LIBS
11322LIBS="-lbsd $LIBS"
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11324/* end confdefs.h. */
11325
11326/* Override any GCC internal prototype to avoid an error.
11327 Use char because int might match the return type of a GCC
11328 builtin and then its argument prototype would still apply. */
11329#ifdef __cplusplus
11330extern "C"
11331#endif
11332char flock ();
11333int
11334main ()
11335{
11336return flock ();
11337 ;
11338 return 0;
11339}
11340_ACEOF
11341if ac_fn_c_try_link "$LINENO"; then :
11342 ac_cv_lib_bsd_flock=yes
11343else
11344 ac_cv_lib_bsd_flock=no
11345fi
11346rm -f core conftest.err conftest.$ac_objext \
11347 conftest$ac_exeext conftest.$ac_ext
11348LIBS=$ac_check_lib_save_LIBS
11349fi
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11351$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011352if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011353 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011354
11355
11356$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11357
11358
11359fi
11360
11361
11362fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011363done
11364
Antoine Pitroua3000072010-09-07 14:52:42 +000011365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11368$as_echo_n "checking for getpagesize... " >&6; }
11369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011371
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011372#include <unistd.h>
11373
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011374int
11375main ()
11376{
11377void* p = getpagesize
11378 ;
11379 return 0;
11380}
11381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011383
Matthias Kloseb9621712010-04-24 17:59:49 +000011384$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011385
Matthias Kloseb159a552010-04-25 21:00:44 +000011386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011387$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011388else
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11390$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011391
11392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011394
Victor Stinner984890f2011-11-24 13:53:38 +010011395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11396$as_echo_n "checking for broken unsetenv... " >&6; }
11397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11398/* end confdefs.h. */
11399
11400#include <stdlib.h>
11401
11402int
11403main ()
11404{
11405int res = unsetenv("DUMMY")
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410if ac_fn_c_try_compile "$LINENO"; then :
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
11413else
11414
11415$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11416
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11418$as_echo "yes" >&6; }
11419
11420fi
11421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11422
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011423for ac_prog in true
11424do
11425 # Extract the first word of "$ac_prog", so it can be a program name with args.
11426set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11428$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011429if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011431else
11432 if test -n "$TRUE"; then
11433 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11434else
11435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11436for as_dir in $PATH
11437do
11438 IFS=$as_save_IFS
11439 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011440 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011442 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 $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 +000011444 break 2
11445 fi
11446done
Matthias Kloseb9621712010-04-24 17:59:49 +000011447 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011449
11450fi
11451fi
11452TRUE=$ac_cv_prog_TRUE
11453if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11455$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011456else
Matthias Kloseb9621712010-04-24 17:59:49 +000011457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11458$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011459fi
11460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011462 test -n "$TRUE" && break
11463done
11464test -n "$TRUE" || TRUE="/bin/true"
11465
11466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11468$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011469if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011471else
11472 ac_check_lib_save_LIBS=$LIBS
11473LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011475/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011477/* Override any GCC internal prototype to avoid an error.
11478 Use char because int might match the return type of a GCC
11479 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011480#ifdef __cplusplus
11481extern "C"
11482#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011483char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011484int
11485main ()
11486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011488 ;
11489 return 0;
11490}
11491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011492if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011493 ac_cv_lib_c_inet_aton=yes
11494else
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011497rm -f core conftest.err conftest.$ac_objext \
11498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011499LIBS=$ac_check_lib_save_LIBS
11500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11502$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011503if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011504 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011505else
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11507$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011508if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011510else
11511 ac_check_lib_save_LIBS=$LIBS
11512LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011514/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516/* Override any GCC internal prototype to avoid an error.
11517 Use char because int might match the return type of a GCC
11518 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011519#ifdef __cplusplus
11520extern "C"
11521#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011522char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011523int
11524main ()
11525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011527 ;
11528 return 0;
11529}
11530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011531if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011532 ac_cv_lib_resolv_inet_aton=yes
11533else
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011536rm -f core conftest.err conftest.$ac_objext \
11537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011538LIBS=$ac_check_lib_save_LIBS
11539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11541$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011542if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011543 cat >>confdefs.h <<_ACEOF
11544#define HAVE_LIBRESOLV 1
11545_ACEOF
11546
11547 LIBS="-lresolv $LIBS"
11548
11549fi
11550
11551
11552fi
11553
11554
Christian Heimesd0764e22007-12-04 15:00:33 +000011555# On Tru64, chflags seems to be present, but calling it will
11556# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11558$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011559if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011561else
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011563 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011566/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011567
Christian Heimesd0764e22007-12-04 15:00:33 +000011568#include <sys/stat.h>
11569#include <unistd.h>
11570int main(int argc, char*argv[])
11571{
11572 if(chflags(argv[0], 0) != 0)
11573 return 1;
11574 return 0;
11575}
Ned Deily3eb67d52011-06-28 00:00:28 -070011576
Christian Heimesd0764e22007-12-04 15:00:33 +000011577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011578if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011579 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011580else
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11584 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011585fi
11586
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011587
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11590$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011591if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011592 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011593if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011594 ac_cv_have_chflags="yes"
11595else
11596 ac_cv_have_chflags="no"
11597fi
11598
11599fi
11600if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011603
11604fi
11605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11607$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011608if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011612 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011615/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011616
Christian Heimesd0764e22007-12-04 15:00:33 +000011617#include <sys/stat.h>
11618#include <unistd.h>
11619int main(int argc, char*argv[])
11620{
11621 if(lchflags(argv[0], 0) != 0)
11622 return 1;
11623 return 0;
11624}
Ned Deily3eb67d52011-06-28 00:00:28 -070011625
Christian Heimesd0764e22007-12-04 15:00:33 +000011626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011628 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011629else
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011634fi
11635
11636
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11639$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011640if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011642if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011643 ac_cv_have_lchflags="yes"
11644else
11645 ac_cv_have_lchflags="no"
11646fi
11647
11648fi
11649if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011650
Matthias Kloseb9621712010-04-24 17:59:49 +000011651$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011652
11653fi
11654
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011655case $ac_sys_system/$ac_sys_release in
11656Darwin/*)
11657 _CUR_CFLAGS="${CFLAGS}"
11658 _CUR_LDFLAGS="${LDFLAGS}"
11659 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11660 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11661 ;;
11662esac
11663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11665$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011666if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011668else
11669 ac_check_lib_save_LIBS=$LIBS
11670LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011672/* end confdefs.h. */
11673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674/* Override any GCC internal prototype to avoid an error.
11675 Use char because int might match the return type of a GCC
11676 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011677#ifdef __cplusplus
11678extern "C"
11679#endif
11680char inflateCopy ();
11681int
11682main ()
11683{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011684return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011685 ;
11686 return 0;
11687}
11688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011689if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011690 ac_cv_lib_z_inflateCopy=yes
11691else
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011694rm -f core conftest.err conftest.$ac_objext \
11695 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011696LIBS=$ac_check_lib_save_LIBS
11697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11699$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011700if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011703
11704fi
11705
11706
11707case $ac_sys_system/$ac_sys_release in
11708Darwin/*)
11709 CFLAGS="${_CUR_CFLAGS}"
11710 LDFLAGS="${_CUR_LDFLAGS}"
11711 ;;
11712esac
11713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11715$as_echo_n "checking for hstrerror... " >&6; }
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011717/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011718
Martin v. Löwise9416172003-05-03 10:12:45 +000011719#include <netdb.h>
11720
Martin v. Löwise9416172003-05-03 10:12:45 +000011721int
11722main ()
11723{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011724void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011725 ;
11726 return 0;
11727}
11728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011732
Matthias Kloseb159a552010-04-25 21:00:44 +000011733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011734$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11737$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011738
11739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011740rm -f core conftest.err conftest.$ac_objext \
11741 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11744$as_echo_n "checking for inet_aton... " >&6; }
11745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011746/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011747
Martin v. Löwis86d66262006-02-17 08:40:11 +000011748#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011749#include <sys/socket.h>
11750#include <netinet/in.h>
11751#include <arpa/inet.h>
11752
Martin v. Löwise9416172003-05-03 10:12:45 +000011753int
11754main ()
11755{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011756void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011757 ;
11758 return 0;
11759}
11760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011764
Matthias Kloseb159a552010-04-25 21:00:44 +000011765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011766$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11769$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011770
11771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011772rm -f core conftest.err conftest.$ac_objext \
11773 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774
Matthias Kloseb9621712010-04-24 17:59:49 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11776$as_echo_n "checking for inet_pton... " >&6; }
11777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011778/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011779
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011780#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011781#include <sys/socket.h>
11782#include <netinet/in.h>
11783#include <arpa/inet.h>
11784
Martin v. Löwise9416172003-05-03 10:12:45 +000011785int
11786main ()
11787{
11788void* p = inet_pton
11789 ;
11790 return 0;
11791}
11792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011796
Matthias Kloseb159a552010-04-25 21:00:44 +000011797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011798$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11801$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011802
11803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011805
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011806# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11808$as_echo_n "checking for setgroups... " >&6; }
11809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011811
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011812#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011813#ifdef HAVE_GRP_H
11814#include <grp.h>
11815#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011816
Martin v. Löwisd5843682002-11-21 20:41:28 +000011817int
11818main ()
11819{
11820void* p = setgroups
11821 ;
11822 return 0;
11823}
11824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011825if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011828
Matthias Kloseb159a552010-04-25 21:00:44 +000011829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011830$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11833$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011834
11835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011837
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011838# check for openpty and forkpty
11839
11840for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011841do :
11842 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011843if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011846_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011847
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011848else
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11850$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011853else
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011855LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011859/* Override any GCC internal prototype to avoid an error.
11860 Use char because int might match the return type of a GCC
11861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011862#ifdef __cplusplus
11863extern "C"
11864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011865char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011866int
11867main ()
11868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011869return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 ;
11871 return 0;
11872}
11873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011875 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011879rm -f core conftest.err conftest.$ac_objext \
11880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011881LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11884$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011885if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011887 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11890$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011891if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011893else
11894 ac_check_lib_save_LIBS=$LIBS
11895LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011897/* end confdefs.h. */
11898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899/* Override any GCC internal prototype to avoid an error.
11900 Use char because int might match the return type of a GCC
11901 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011902#ifdef __cplusplus
11903extern "C"
11904#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011905char openpty ();
11906int
11907main ()
11908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011910 ;
11911 return 0;
11912}
11913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011915 ac_cv_lib_bsd_openpty=yes
11916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011919rm -f core conftest.err conftest.$ac_objext \
11920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011921LIBS=$ac_check_lib_save_LIBS
11922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11924$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011925if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011927 LIBS="$LIBS -lbsd"
11928fi
11929
11930
11931fi
11932
Fred Drake8cef4cf2000-06-28 16:40:38 +000011933
11934fi
11935done
11936
11937for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011938do :
11939 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011940if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011942#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011943_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011944
Fred Drake8cef4cf2000-06-28 16:40:38 +000011945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11947$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011948if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011950else
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011952LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011956/* Override any GCC internal prototype to avoid an error.
11957 Use char because int might match the return type of a GCC
11958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011959#ifdef __cplusplus
11960extern "C"
11961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011962char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011963int
11964main ()
11965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 ;
11968 return 0;
11969}
11970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011971if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011976rm -f core conftest.err conftest.$ac_objext \
11977 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011978LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11981$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011982if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011983 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011984 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011985else
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11987$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011988if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011990else
11991 ac_check_lib_save_LIBS=$LIBS
11992LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011994/* end confdefs.h. */
11995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996/* Override any GCC internal prototype to avoid an error.
11997 Use char because int might match the return type of a GCC
11998 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011999#ifdef __cplusplus
12000extern "C"
12001#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012002char forkpty ();
12003int
12004main ()
12005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012007 ;
12008 return 0;
12009}
12010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012012 ac_cv_lib_bsd_forkpty=yes
12013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012016rm -f core conftest.err conftest.$ac_objext \
12017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012018LIBS=$ac_check_lib_save_LIBS
12019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12021$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012022if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012024 LIBS="$LIBS -lbsd"
12025fi
12026
12027
12028fi
12029
Fred Drake8cef4cf2000-06-28 16:40:38 +000012030
12031fi
12032done
12033
Jack Jansendd19cf82001-12-06 22:36:17 +000012034
Christian Heimesb186d002008-03-18 15:15:01 +000012035# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012036for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012037do :
12038 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012039if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012040 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012041#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012042_ACEOF
12043
12044fi
12045done
12046
12047
Michael W. Hudson54241132001-12-07 15:38:26 +000012048# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012049for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012050do :
12051 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12052ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012053if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012054 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012055#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012056_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012057
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012058fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012059done
12060
Michael W. Hudson54241132001-12-07 15:38:26 +000012061
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012062ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012063if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012064 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012065
Martin v. Löwis1142de32002-03-29 16:28:31 +000012066else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012068 *" dup2.$ac_objext "* ) ;;
12069 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012071esac
12072
Martin v. Löwis1142de32002-03-29 16:28:31 +000012073fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012074
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012075ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012076if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012077 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12078
12079else
12080 case " $LIBOBJS " in
12081 *" strdup.$ac_objext "* ) ;;
12082 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12083 ;;
12084esac
12085
12086fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012087
12088
12089for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012090do :
12091 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012092if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012097/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012098#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012099int
12100main ()
12101{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012102getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 ;
12104 return 0;
12105}
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
Matthias Kloseb9621712010-04-24 17:59:49 +000012109$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012110
Guido van Rossum627b2d71993-12-24 10:39:16 +000012111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012113
Guido van Rossum627b2d71993-12-24 10:39:16 +000012114fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012115done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012116
Jack Jansen150753c2003-03-29 22:07:47 +000012117for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012118do :
12119 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012121 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012122#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012125/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012126#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012127int
12128main ()
12129{
12130setpgrp(0,0);
12131 ;
12132 return 0;
12133}
12134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012135if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012136
Matthias Kloseb9621712010-04-24 17:59:49 +000012137$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012138
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012141
12142fi
12143done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012144
Thomas Wouters3a584202000-08-05 23:28:51 +000012145for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012146do :
12147 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012150#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012153/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012154#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012155int
12156main ()
12157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 ;
12160 return 0;
12161}
12162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_compile "$LINENO"; then :
12164
Guido van Rossum627b2d71993-12-24 10:39:16 +000012165else
Skip Montanaro6dead952003-09-25 14:50:04 +000012166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012168
Martin v. Löwis11437992002-04-12 09:54:03 +000012169
Guido van Rossum627b2d71993-12-24 10:39:16 +000012170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012172
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012173fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012174done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175
Michael W. Hudson54241132001-12-07 15:38:26 +000012176
Victor Stinnere0be4232011-10-25 13:06:09 +020012177for ac_func in clock_gettime
12178do :
12179 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12180if test "x$ac_cv_func_clock_gettime" = xyes; then :
12181 cat >>confdefs.h <<_ACEOF
12182#define HAVE_CLOCK_GETTIME 1
12183_ACEOF
12184
12185else
12186
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12188$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12189if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12190 $as_echo_n "(cached) " >&6
12191else
12192 ac_check_lib_save_LIBS=$LIBS
12193LIBS="-lrt $LIBS"
12194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195/* end confdefs.h. */
12196
12197/* Override any GCC internal prototype to avoid an error.
12198 Use char because int might match the return type of a GCC
12199 builtin and then its argument prototype would still apply. */
12200#ifdef __cplusplus
12201extern "C"
12202#endif
12203char clock_gettime ();
12204int
12205main ()
12206{
12207return clock_gettime ();
12208 ;
12209 return 0;
12210}
12211_ACEOF
12212if ac_fn_c_try_link "$LINENO"; then :
12213 ac_cv_lib_rt_clock_gettime=yes
12214else
12215 ac_cv_lib_rt_clock_gettime=no
12216fi
12217rm -f core conftest.err conftest.$ac_objext \
12218 conftest$ac_exeext conftest.$ac_ext
12219LIBS=$ac_check_lib_save_LIBS
12220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12222$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12223if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12224
Victor Stinner7efb8332014-08-29 15:41:08 +020012225 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012226 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12227
12228
12229$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12230
12231
12232fi
12233
12234
12235fi
12236done
12237
12238
12239for ac_func in clock_getres
12240do :
12241 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12242if test "x$ac_cv_func_clock_getres" = xyes; then :
12243 cat >>confdefs.h <<_ACEOF
12244#define HAVE_CLOCK_GETRES 1
12245_ACEOF
12246
12247else
12248
12249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12250$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12251if ${ac_cv_lib_rt_clock_getres+:} false; then :
12252 $as_echo_n "(cached) " >&6
12253else
12254 ac_check_lib_save_LIBS=$LIBS
12255LIBS="-lrt $LIBS"
12256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12257/* end confdefs.h. */
12258
12259/* Override any GCC internal prototype to avoid an error.
12260 Use char because int might match the return type of a GCC
12261 builtin and then its argument prototype would still apply. */
12262#ifdef __cplusplus
12263extern "C"
12264#endif
12265char clock_getres ();
12266int
12267main ()
12268{
12269return clock_getres ();
12270 ;
12271 return 0;
12272}
12273_ACEOF
12274if ac_fn_c_try_link "$LINENO"; then :
12275 ac_cv_lib_rt_clock_getres=yes
12276else
12277 ac_cv_lib_rt_clock_getres=no
12278fi
12279rm -f core conftest.err conftest.$ac_objext \
12280 conftest$ac_exeext conftest.$ac_ext
12281LIBS=$ac_check_lib_save_LIBS
12282fi
12283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12284$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12285if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12286
12287 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12288
12289
12290fi
12291
12292
12293fi
12294done
12295
12296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12298$as_echo_n "checking for major... " >&6; }
12299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012301
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012302#if defined(MAJOR_IN_MKDEV)
12303#include <sys/mkdev.h>
12304#elif defined(MAJOR_IN_SYSMACROS)
12305#include <sys/sysmacros.h>
12306#else
12307#include <sys/types.h>
12308#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012309
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012310int
12311main ()
12312{
12313
12314 makedev(major(0),minor(0));
12315
12316 ;
12317 return 0;
12318}
12319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012321
12322
Matthias Kloseb9621712010-04-24 17:59:49 +000012323$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12326$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012327
12328else
Skip Montanaro6dead952003-09-25 14:50:04 +000012329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12331$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012332
12333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012334rm -f core conftest.err conftest.$ac_objext \
12335 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012336
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012337# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012338# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12340$as_echo_n "checking for getaddrinfo... " >&6; }
12341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012342/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012343
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012344#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012345#include <sys/socket.h>
12346#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012347#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012348
Martin v. Löwis11437992002-04-12 09:54:03 +000012349int
12350main ()
12351{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012352getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012353 ;
12354 return 0;
12355}
12356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012357if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012358 have_getaddrinfo=yes
12359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012362rm -f core conftest.err conftest.$ac_objext \
12363 conftest$ac_exeext conftest.$ac_ext
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12365$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012366if test $have_getaddrinfo = yes
12367then
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12369$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012370 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012372else
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012374
12375if test "${enable_ipv6+set}" = set; then
12376 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12377else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012378 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012379fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012382/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012383
Stefan Krah19c21392012-11-22 23:47:32 +010012384#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385#include <sys/types.h>
12386#include <netdb.h>
12387#include <string.h>
12388#include <sys/socket.h>
12389#include <netinet/in.h>
12390
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012391int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012392{
12393 int passive, gaierr, inet4 = 0, inet6 = 0;
12394 struct addrinfo hints, *ai, *aitop;
12395 char straddr[INET6_ADDRSTRLEN], strport[16];
12396
12397 for (passive = 0; passive <= 1; passive++) {
12398 memset(&hints, 0, sizeof(hints));
12399 hints.ai_family = AF_UNSPEC;
12400 hints.ai_flags = passive ? AI_PASSIVE : 0;
12401 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012402 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12404 (void)gai_strerror(gaierr);
12405 goto bad;
12406 }
12407 for (ai = aitop; ai; ai = ai->ai_next) {
12408 if (ai->ai_addr == NULL ||
12409 ai->ai_addrlen == 0 ||
12410 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12411 straddr, sizeof(straddr), strport, sizeof(strport),
12412 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12413 goto bad;
12414 }
12415 switch (ai->ai_family) {
12416 case AF_INET:
12417 if (strcmp(strport, "54321") != 0) {
12418 goto bad;
12419 }
12420 if (passive) {
12421 if (strcmp(straddr, "0.0.0.0") != 0) {
12422 goto bad;
12423 }
12424 } else {
12425 if (strcmp(straddr, "127.0.0.1") != 0) {
12426 goto bad;
12427 }
12428 }
12429 inet4++;
12430 break;
12431 case AF_INET6:
12432 if (strcmp(strport, "54321") != 0) {
12433 goto bad;
12434 }
12435 if (passive) {
12436 if (strcmp(straddr, "::") != 0) {
12437 goto bad;
12438 }
12439 } else {
12440 if (strcmp(straddr, "::1") != 0) {
12441 goto bad;
12442 }
12443 }
12444 inet6++;
12445 break;
12446 case AF_UNSPEC:
12447 goto bad;
12448 break;
12449 default:
12450 /* another family support? */
12451 break;
12452 }
12453 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012454 freeaddrinfo(aitop);
12455 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012456 }
12457
12458 if (!(inet4 == 0 || inet4 == 2))
12459 goto bad;
12460 if (!(inet6 == 0 || inet6 == 2))
12461 goto bad;
12462
12463 if (aitop)
12464 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012465 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012466
12467 bad:
12468 if (aitop)
12469 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012470 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012471}
12472
Martin v. Löwis11437992002-04-12 09:54:03 +000012473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012475 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012476else
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12480 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012483fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012484
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12488$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12489
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012490if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012491then
12492 if test $ipv6 = yes
12493 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012494 echo 'Fatal: You must get working getaddrinfo() function.'
12495 echo ' or you can specify "--disable-ipv6"'.
12496 exit 1
12497 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012498else
Martin v. Löwis11437992002-04-12 09:54:03 +000012499
Matthias Kloseb9621712010-04-24 17:59:49 +000012500$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012501
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012502fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012503
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012504for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012505do :
12506 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012507if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012509#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012510_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012511
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012512fi
12513done
12514
Michael W. Hudson54241132001-12-07 15:38:26 +000012515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012516# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12518$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012519if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012521else
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012523/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524#include <sys/types.h>
12525#include <sys/time.h>
12526#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Martin v. Löwis11437992002-04-12 09:54:03 +000012528int
12529main ()
12530{
12531if ((struct tm *) 0)
12532return 0;
12533 ;
12534 return 0;
12535}
12536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012537if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012539else
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12545$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012546if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Matthias Kloseb9621712010-04-24 17:59:49 +000012548$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012549
12550fi
12551
Matthias Kloseb9621712010-04-24 17:59:49 +000012552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12553$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012554if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012556else
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012558/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012559#include <sys/types.h>
12560#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Martin v. Löwis11437992002-04-12 09:54:03 +000012562int
12563main ()
12564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565struct tm tm;
12566 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ;
12569 return 0;
12570}
12571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012573 ac_cv_struct_tm=time.h
12574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12580$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012581if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012584
12585fi
12586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587ac_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 +000012588#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
Matthias Kloseb9621712010-04-24 17:59:49 +000012590"
Victor Stinnere0be4232011-10-25 13:06:09 +020012591if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
12593cat >>confdefs.h <<_ACEOF
12594#define HAVE_STRUCT_TM_TM_ZONE 1
12595_ACEOF
12596
12597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012599
Martin v. Löwis11437992002-04-12 09:54:03 +000012600if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603
12604else
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12606"
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012609else
Matthias Kloseb9621712010-04-24 17:59:49 +000012610 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012611fi
12612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012614#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615_ACEOF
12616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12618$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012619if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621else
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012623/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625#if !HAVE_DECL_TZNAME
12626extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629int
12630main ()
12631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ;
12634 return 0;
12635}
12636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012638 ac_cv_var_tzname=yes
12639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642rm -f core conftest.err conftest.$ac_objext \
12643 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12646$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012647 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
Matthias Kloseb9621712010-04-24 17:59:49 +000012649$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012650
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651 fi
12652fi
12653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654ac_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 +020012655if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
12657cat >>confdefs.h <<_ACEOF
12658#define HAVE_STRUCT_STAT_ST_RDEV 1
12659_ACEOF
12660
12661
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012662fi
12663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664ac_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 +020012665if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012666
Martin v. Löwis11437992002-04-12 09:54:03 +000012667cat >>confdefs.h <<_ACEOF
12668#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12669_ACEOF
12670
12671
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012672fi
12673
Matthias Kloseb9621712010-04-24 17:59:49 +000012674ac_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 +020012675if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012676
12677cat >>confdefs.h <<_ACEOF
12678#define HAVE_STRUCT_STAT_ST_FLAGS 1
12679_ACEOF
12680
12681
12682fi
12683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684ac_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 +020012685if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012686
12687cat >>confdefs.h <<_ACEOF
12688#define HAVE_STRUCT_STAT_ST_GEN 1
12689_ACEOF
12690
12691
12692fi
12693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694ac_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 +020012695if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012696
12697cat >>confdefs.h <<_ACEOF
12698#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12699_ACEOF
12700
12701
12702fi
12703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704ac_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 +020012705if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012706
Martin v. Löwis11437992002-04-12 09:54:03 +000012707cat >>confdefs.h <<_ACEOF
12708#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12709_ACEOF
12710
12711
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012712fi
12713
Stefan Krah267b6392016-04-26 01:09:18 +020012714ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12715 #include <sys/types.h>
12716 #include <pwd.h>
12717
12718"
12719if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12720
12721cat >>confdefs.h <<_ACEOF
12722#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12723_ACEOF
12724
12725
12726fi
12727ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12728 #include <sys/types.h>
12729 #include <pwd.h>
12730
12731"
12732if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12733
12734cat >>confdefs.h <<_ACEOF
12735#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12736_ACEOF
12737
12738
12739fi
12740
Michael W. Hudson54241132001-12-07 15:38:26 +000012741
Matthias Kloseb9621712010-04-24 17:59:49 +000012742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12743$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012744if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012746else
Matthias Kloseb159a552010-04-25 21:00:44 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012749/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012750#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012751int
12752main ()
12753{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ;
12756 return 0;
12757}
12758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012759if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760 ac_cv_header_time_altzone=yes
12761else
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012766fi
12767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12769$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773
12774fi
12775
Guido van Rossumda88dad1995-01-26 00:46:29 +000012776was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12778$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012781
12782#include <sys/types.h>
12783#include <sys/select.h>
12784#include <sys/time.h>
12785
Martin v. Löwis11437992002-04-12 09:54:03 +000012786int
12787main ()
12788{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789;
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 ;
12791 return 0;
12792}
12793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012794if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
12796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012799 was_it_defined=yes
12800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12804$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12807$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012808if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012812/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012813#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012814int
12815main ()
12816{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012817struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012822if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823 ac_cv_struct_addrinfo=yes
12824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12828fi
12829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12831$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012832if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012835
12836fi
12837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12839$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012840if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012844/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012845
12846# include <sys/types.h>
12847# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012848int
12849main ()
12850{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012851struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 ;
12853 return 0;
12854}
12855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012856if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012857 ac_cv_struct_sockaddr_storage=yes
12858else
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12862fi
12863
Matthias Kloseb9621712010-04-24 17:59:49 +000012864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12865$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012866if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012867
Matthias Kloseb9621712010-04-24 17:59:49 +000012868$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012869
12870fi
12871
Christian Heimesdffa3942016-09-05 23:54:41 +020012872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12873$as_echo_n "checking for sockaddr_alg... " >&6; }
12874if ${ac_cv_struct_sockaddr_alg+:} false; then :
12875 $as_echo_n "(cached) " >&6
12876else
12877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12878/* end confdefs.h. */
12879
12880# include <sys/types.h>
12881# include <sys/socket.h>
12882# include <linux/if_alg.h>
12883int
12884main ()
12885{
12886struct sockaddr_alg s
12887 ;
12888 return 0;
12889}
12890_ACEOF
12891if ac_fn_c_try_compile "$LINENO"; then :
12892 ac_cv_struct_sockaddr_alg=yes
12893else
12894 ac_cv_struct_sockaddr_alg=no
12895fi
12896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12897fi
12898
12899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12900$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12901if test $ac_cv_struct_sockaddr_alg = yes; then
12902
12903$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12904
12905fi
12906
Guido van Rossum627b2d71993-12-24 10:39:16 +000012907# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012908
Matthias Kloseb9621712010-04-24 17:59:49 +000012909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12910$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012911if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012917int
12918main ()
12919{
12920static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012921test_array [0] = 0;
12922return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012923
12924 ;
12925 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012926}
Martin v. Löwis11437992002-04-12 09:54:03 +000012927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012929 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12936$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012937if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012939
12940fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12943$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012944if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012955 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012957 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959 char const *const *pcpcc;
12960 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012961 /* NEC SVR4.0.2 mips cc rejects this. */
12962 struct point {int x, y;};
12963 static struct point const zero = {0,0};
12964 /* AIX XL C 1.02.0.0 rejects this.
12965 It does not let you subtract one const X* pointer from another in
12966 an arm of an if-expression whose if-part is not a constant
12967 expression */
12968 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971 ++pcpcc;
12972 ppc = (char**) pcpcc;
12973 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012974 { /* SCO 3.2v4 cc rejects this sort of thing. */
12975 char tx;
12976 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 }
12982 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12983 int x[] = {25, 17};
12984 const int *foo = &x[0];
12985 ++foo;
12986 }
12987 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12988 typedef const int *iptr;
12989 iptr p = 0;
12990 ++p;
12991 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012992 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012993 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012994 struct s { int j; const int *ap[3]; } bx;
12995 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 }
12997 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12998 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013002#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013003
Martin v. Löwis11437992002-04-12 09:54:03 +000013004 ;
13005 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013006}
Martin v. Löwis11437992002-04-12 09:54:03 +000013007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013008if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009 ac_cv_c_const=yes
13010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13016$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013017if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013020
13021fi
13022
Michael W. Hudson54241132001-12-07 15:38:26 +000013023
Guido van Rossumda88dad1995-01-26 00:46:29 +000013024works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13026$as_echo_n "checking for working volatile... " >&6; }
13027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013028/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013029
Martin v. Löwis11437992002-04-12 09:54:03 +000013030int
13031main ()
13032{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 ;
13035 return 0;
13036}
13037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013038if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013039 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013040else
Skip Montanaro6dead952003-09-25 14:50:04 +000013041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013043
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013044
Guido van Rossum627b2d71993-12-24 10:39:16 +000013045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13048$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013049
Guido van Rossumda88dad1995-01-26 00:46:29 +000013050works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13052$as_echo_n "checking for working signed char... " >&6; }
13053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013054/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013055
Martin v. Löwis11437992002-04-12 09:54:03 +000013056int
13057main ()
13058{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 ;
13061 return 0;
13062}
13063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013064if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013065 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013066else
Skip Montanaro6dead952003-09-25 14:50:04 +000013067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013069
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013070
Guido van Rossum7f43da71994-08-01 12:15:30 +000013071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13074$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013075
Guido van Rossumda88dad1995-01-26 00:46:29 +000013076have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13078$as_echo_n "checking for prototypes... " >&6; }
13079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013080/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013081int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013082int
13083main ()
13084{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 ;
13087 return 0;
13088}
13089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013093
Matthias Kloseb159a552010-04-25 21:00:44 +000013094 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13098$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099
Guido van Rossumda88dad1995-01-26 00:46:29 +000013100works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13102$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013104/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013105
13106#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013107int foo(int x, ...) {
13108 va_list va;
13109 va_start(va, x);
13110 va_arg(va, int);
13111 va_arg(va, char *);
13112 va_arg(va, double);
13113 return 0;
13114}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116int
13117main ()
13118{
Guido van Rossum90eea071996-08-30 20:58:57 +000013119return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ;
13121 return 0;
13122}
13123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013125
13126
Matthias Kloseb9621712010-04-24 17:59:49 +000013127$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013128
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013129 works=yes
13130
Guido van Rossum627b2d71993-12-24 10:39:16 +000013131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13134$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135
Martin v. Löwisd6320502004-08-12 13:45:08 +000013136# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13138$as_echo_n "checking for socketpair... " >&6; }
13139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013140/* end confdefs.h. */
13141
13142#include <sys/types.h>
13143#include <sys/socket.h>
13144
13145int
13146main ()
13147{
13148void *x=socketpair
13149 ;
13150 return 0;
13151}
13152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013156
Matthias Kloseb159a552010-04-25 21:00:44 +000013157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013159else
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13161$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013162
13163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013165
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013166# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13168$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013170/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013171#include <sys/types.h>
13172#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013173int
13174main ()
13175{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176struct sockaddr x;
13177x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ;
13179 return 0;
13180}
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_compile "$LINENO"; then :
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13184$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187
13188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13190$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013191
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013194
Guido van Rossumda88dad1995-01-26 00:46:29 +000013195va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13197$as_echo_n "checking whether va_list is an array... " >&6; }
13198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013199/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013200
13201#ifdef HAVE_STDARG_PROTOTYPES
13202#include <stdarg.h>
13203#else
13204#include <varargs.h>
13205#endif
13206
Martin v. Löwis11437992002-04-12 09:54:03 +000013207int
13208main ()
13209{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 ;
13212 return 0;
13213}
13214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013215if ac_fn_c_try_compile "$LINENO"; then :
13216
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013217else
Skip Montanaro6dead952003-09-25 14:50:04 +000013218
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
Guido van Rossumda88dad1995-01-26 00:46:29 +000013222 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013223
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13227$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013228
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013229# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013233if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13238$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013239 OLD_CFLAGS=$CFLAGS
13240 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013242/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013243
13244# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013245
Martin v. Löwis11437992002-04-12 09:54:03 +000013246int
13247main ()
13248{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013249
13250 char *name;
13251 struct hostent *he, *res;
13252 char buffer[2048];
13253 int buflen = 2048;
13254 int h_errnop;
13255
13256 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
13258 ;
13259 return 0;
13260}
13261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013265
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13270$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013272else
Skip Montanaro6dead952003-09-25 14:50:04 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13275$as_echo "no" >&6; }
13276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13277$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013279/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013280
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013281# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283int
13284main ()
13285{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013286
13287 char *name;
13288 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013289 char buffer[2048];
13290 int buflen = 2048;
13291 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013292
Matthias Kloseb159a552010-04-25 21:00:44 +000013293 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
13295 ;
13296 return 0;
13297}
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013302
Martin v. Löwis11437992002-04-12 09:54:03 +000013303
Matthias Kloseb159a552010-04-25 21:00:44 +000013304$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13307$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013309else
Skip Montanaro6dead952003-09-25 14:50:04 +000013310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13312$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13314$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13316/* end confdefs.h. */
13317
13318# include <netdb.h>
13319
13320int
13321main ()
13322{
13323
13324 char *name;
13325 struct hostent *he;
13326 struct hostent_data data;
13327
13328 (void) gethostbyname_r(name, he, &data);
13329
13330 ;
13331 return 0;
13332}
13333_ACEOF
13334if ac_fn_c_try_compile "$LINENO"; then :
13335
13336 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13337
13338
13339$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13340
13341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13342$as_echo "yes" >&6; }
13343
13344else
13345
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13347$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013357 CFLAGS=$OLD_CFLAGS
13358
13359else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 for ac_func in gethostbyname
13362do :
13363 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013364if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013366#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013367_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013368
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013369fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013370done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013371
Michael W. Hudson54241132001-12-07 15:38:26 +000013372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013373fi
13374
Michael W. Hudson54241132001-12-07 15:38:26 +000013375
13376
13377
13378
13379
13380
Guido van Rossum627b2d71993-12-24 10:39:16 +000013381# checks for system services
13382# (none yet)
13383
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013385ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013386if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013387
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13390$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013391if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013393else
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013395LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399/* Override any GCC internal prototype to avoid an error.
13400 Use char because int might match the return type of a GCC
13401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013402#ifdef __cplusplus
13403extern "C"
13404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013405char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013406int
13407main ()
13408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013409return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ;
13411 return 0;
13412}
13413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013415 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013419rm -f core conftest.err conftest.$ac_objext \
13420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13424$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013425if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013426 cat >>confdefs.h <<_ACEOF
13427#define HAVE_LIBIEEE 1
13428_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013430 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013431
Guido van Rossum627b2d71993-12-24 10:39:16 +000013432fi
13433
Michael W. Hudson54241132001-12-07 15:38:26 +000013434
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013435fi
13436
Michael W. Hudson54241132001-12-07 15:38:26 +000013437
Guido van Rossum7f253911997-05-09 02:42:48 +000013438# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13440$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013445if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013446then
13447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13451$as_echo "yes" >&6; }
13452else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13453$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013454fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13457$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013458fi
13459
Guido van Rossum7f253911997-05-09 02:42:48 +000013460
Guido van Rossum7f43da71994-08-01 12:15:30 +000013461# check for --with-libm=...
13462
Guido van Rossum563e7081996-09-10 18:20:48 +000013463case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013464Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013465*) LIBM=-lm
13466esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13468$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013470# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013471if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013473if test "$withval" = no
13474then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13476$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013477elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013478then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13480$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013481else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013482fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13485$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013486fi
13487
Guido van Rossum7f43da71994-08-01 12:15:30 +000013488
13489# check for --with-libc=...
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13492$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013495if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013497if test "$withval" = no
13498then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13500$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013501elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013502then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13504$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013505else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013506fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013507else
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13509$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510fi
13511
Guido van Rossum7f43da71994-08-01 12:15:30 +000013512
Stefan Krah1919b7e2012-03-21 18:25:23 +010013513# **************************************
13514# * Check for gcc x64 inline assembler *
13515# **************************************
13516
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13518$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13520/* end confdefs.h. */
13521
13522int
13523main ()
13524{
13525
13526 __asm__ __volatile__ ("movq %rcx, %rax");
13527
13528 ;
13529 return 0;
13530}
13531_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013532if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013533 have_gcc_asm_for_x64=yes
13534else
13535 have_gcc_asm_for_x64=no
13536fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013537rm -f core conftest.err conftest.$ac_objext \
13538 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13540$as_echo "$have_gcc_asm_for_x64" >&6; }
13541if test "$have_gcc_asm_for_x64" = yes
13542then
13543
13544$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13545
13546fi
13547
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013548# **************************************************
13549# * Check for various properties of floating point *
13550# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13553$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013554if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013556else
13557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013559 ac_cv_little_endian_double=no
13560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013562/* end confdefs.h. */
13563
13564#include <string.h>
13565int main() {
13566 double x = 9006104071832581.0;
13567 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13568 return 0;
13569 else
13570 return 1;
13571}
13572
13573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013574if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013575 ac_cv_little_endian_double=yes
13576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013581fi
13582
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013583fi
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13586$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013587if test "$ac_cv_little_endian_double" = yes
13588then
13589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013591
13592fi
13593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13595$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013596if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013598else
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013601 ac_cv_big_endian_double=no
13602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013604/* end confdefs.h. */
13605
13606#include <string.h>
13607int main() {
13608 double x = 9006104071832581.0;
13609 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13610 return 0;
13611 else
13612 return 1;
13613}
13614
13615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013616if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013617 ac_cv_big_endian_double=yes
13618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013623fi
13624
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013625fi
13626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13628$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629if test "$ac_cv_big_endian_double" = yes
13630then
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013633
13634fi
13635
13636# Some ARM platforms use a mixed-endian representation for doubles.
13637# While Python doesn't currently have full support for these platforms
13638# (see e.g., issue 1762561), we can at least make sure that float <-> string
13639# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13641$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013642if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013644else
13645
Matthias Kloseb9621712010-04-24 17:59:49 +000013646if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013647 ac_cv_mixed_endian_double=no
13648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013650/* end confdefs.h. */
13651
13652#include <string.h>
13653int main() {
13654 double x = 9006104071832581.0;
13655 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13656 return 0;
13657 else
13658 return 1;
13659}
13660
13661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013662if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013663 ac_cv_mixed_endian_double=yes
13664else
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13668 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013669fi
13670
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671fi
13672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13674$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013675if test "$ac_cv_mixed_endian_double" = yes
13676then
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013679
13680fi
13681
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013682# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013683# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013684# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013685# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013686# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013687# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013688
13689# This inline assembler syntax may also work for suncc and icc,
13690# so we try it on all platforms.
13691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13693$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013695/* end confdefs.h. */
13696
13697int
13698main ()
13699{
13700
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013701 unsigned short cw;
13702 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13703 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013704
13705 ;
13706 return 0;
13707}
13708_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013709if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013710 have_gcc_asm_for_x87=yes
13711else
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013713fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013714rm -f core conftest.err conftest.$ac_objext \
13715 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13717$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013718if test "$have_gcc_asm_for_x87" = yes
13719then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013723fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013724
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13726$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13728/* end confdefs.h. */
13729
13730int
13731main ()
13732{
13733
13734 unsigned int fpcr;
13735 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13736 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13737
13738 ;
13739 return 0;
13740}
13741_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013742if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013743 have_gcc_asm_for_mc68881=yes
13744else
13745 have_gcc_asm_for_mc68881=no
13746fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013747rm -f core conftest.err conftest.$ac_objext \
13748 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13750$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13751if test "$have_gcc_asm_for_mc68881" = yes
13752then
13753
13754$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13755
13756fi
13757
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013758# Detect whether system arithmetic is subject to x87-style double
13759# rounding issues. The result of this test has little meaning on non
13760# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13761# mode is round-to-nearest and double rounding issues are present, and
13762# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13764$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765# $BASECFLAGS may affect the result
13766ac_save_cc="$CC"
13767CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013768if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013769 ac_cv_x87_double_rounding=no
13770else
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013772/* end confdefs.h. */
13773
13774#include <stdlib.h>
13775#include <math.h>
13776int main() {
13777 volatile double x, y, z;
13778 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13779 x = 0.99999999999999989; /* 1-2**-53 */
13780 y = 1./x;
13781 if (y != 1.)
13782 exit(0);
13783 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13784 x = 1e16;
13785 y = 2.99999;
13786 z = x + y;
13787 if (z != 1e16+4.)
13788 exit(0);
13789 /* both tests show evidence of double rounding */
13790 exit(1);
13791}
13792
13793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013795 ac_cv_x87_double_rounding=no
13796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013801fi
13802
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13805$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013806if test "$ac_cv_x87_double_rounding" = yes
13807then
13808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013810
13811fi
13812
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013813# ************************************
13814# * Check for mathematical functions *
13815# ************************************
13816
13817LIBS_SAVE=$LIBS
13818LIBS="$LIBS $LIBM"
13819
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013820for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13821do :
13822 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13823ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013824if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013825 cat >>confdefs.h <<_ACEOF
13826#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13827_ACEOF
13828
13829fi
13830done
13831
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013832for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013833do :
13834 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13835ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013836if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013837 cat >>confdefs.h <<_ACEOF
13838#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13839_ACEOF
13840
13841fi
13842done
13843
13844ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13845"
Victor Stinnere0be4232011-10-25 13:06:09 +020013846if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013847 ac_have_decl=1
13848else
13849 ac_have_decl=0
13850fi
13851
13852cat >>confdefs.h <<_ACEOF
13853#define HAVE_DECL_ISINF $ac_have_decl
13854_ACEOF
13855ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13856"
Victor Stinnere0be4232011-10-25 13:06:09 +020013857if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013858 ac_have_decl=1
13859else
13860 ac_have_decl=0
13861fi
13862
13863cat >>confdefs.h <<_ACEOF
13864#define HAVE_DECL_ISNAN $ac_have_decl
13865_ACEOF
13866ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13867"
Victor Stinnere0be4232011-10-25 13:06:09 +020013868if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013869 ac_have_decl=1
13870else
13871 ac_have_decl=0
13872fi
13873
13874cat >>confdefs.h <<_ACEOF
13875#define HAVE_DECL_ISFINITE $ac_have_decl
13876_ACEOF
13877
13878
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013879# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13880# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13882$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013883if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013885else
13886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013888 ac_cv_tanh_preserves_zero_sign=no
13889else
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013891/* end confdefs.h. */
13892
13893#include <math.h>
13894#include <stdlib.h>
13895int main() {
13896 /* return 0 if either negative zeros don't exist
13897 on this platform or if negative zeros exist
13898 and tanh(-0.) == -0. */
13899 if (atan2(0., -1.) == atan2(-0., -1.) ||
13900 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13901 else exit(1);
13902}
13903
13904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013905if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013906 ac_cv_tanh_preserves_zero_sign=yes
13907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13911 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013912fi
13913
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013914fi
13915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13917$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013918if test "$ac_cv_tanh_preserves_zero_sign" = yes
13919then
13920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013922
13923fi
13924
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013925if test "$ac_cv_func_log1p" = yes
13926then
13927 # On some versions of AIX, log1p(-0.) returns 0. instead of
13928 # -0. See issue #9920.
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13930$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013931 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013932 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013933else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013934
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013935 if test "$cross_compiling" = yes; then :
13936 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013937else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013940
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013941 #include <math.h>
13942 #include <stdlib.h>
13943 int main() {
13944 /* Fail if the signs of log1p(-0.) and -0. can be
13945 distinguished. */
13946 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13947 return 0;
13948 else
13949 return 1;
13950 }
13951
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013952_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013953if ac_fn_c_try_run "$LINENO"; then :
13954 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013955else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013956 ac_cv_log1p_drops_zero_sign=yes
13957fi
13958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13959 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013960fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013961
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013962fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013963
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13965$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13966fi
13967if test "$ac_cv_log1p_drops_zero_sign" = yes
13968then
13969
13970$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13971
13972fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013973
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013974LIBS=$LIBS_SAVE
13975
Mark Dickinsona614f042009-11-28 12:48:43 +000013976# For multiprocessing module, check that sem_open
13977# actually works. For FreeBSD versions <= 7.2,
13978# the kernel module that provides POSIX semaphores
13979# isn't loaded by default, so an attempt to call
13980# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13982$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013983if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013987 ac_cv_posix_semaphores_enabled=yes
13988else
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013990/* end confdefs.h. */
13991
13992#include <unistd.h>
13993#include <fcntl.h>
13994#include <stdio.h>
13995#include <semaphore.h>
13996#include <sys/stat.h>
13997
13998int main(void) {
13999 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14000 if (a == SEM_FAILED) {
14001 perror("sem_open");
14002 return 1;
14003 }
14004 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014005 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014006 return 0;
14007}
14008
14009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014010if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014011 ac_cv_posix_semaphores_enabled=yes
14012else
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14016 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014017fi
14018
14019
Mark Dickinsona614f042009-11-28 12:48:43 +000014020fi
14021
Matthias Kloseb9621712010-04-24 17:59:49 +000014022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14023$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014024if test $ac_cv_posix_semaphores_enabled = no
14025then
14026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014028
14029fi
14030
Mark Dickinson10683072009-04-18 21:18:19 +000014031# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14033$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014034if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014036else
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014038 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014039else
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014041/* end confdefs.h. */
14042
14043#include <unistd.h>
14044#include <fcntl.h>
14045#include <stdio.h>
14046#include <semaphore.h>
14047#include <sys/stat.h>
14048
14049int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014050 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014051 int count;
14052 int res;
14053 if(a==SEM_FAILED){
14054 perror("sem_open");
14055 return 1;
14056
14057 }
14058 res = sem_getvalue(a, &count);
14059 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014060 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014061 return res==-1 ? 1 : 0;
14062}
14063
Mark Dickinson10683072009-04-18 21:18:19 +000014064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014065if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014066 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014067else
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014072fi
14073
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014074
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014075fi
14076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14078$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014079if test $ac_cv_broken_sem_getvalue = yes
14080then
14081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014083
14084fi
14085
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014086ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14087"
14088if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14089 ac_have_decl=1
14090else
14091 ac_have_decl=0
14092fi
14093
14094cat >>confdefs.h <<_ACEOF
14095#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14096_ACEOF
14097ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14098"
14099if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14100 ac_have_decl=1
14101else
14102 ac_have_decl=0
14103fi
14104
14105cat >>confdefs.h <<_ACEOF
14106#define HAVE_DECL_RTLD_NOW $ac_have_decl
14107_ACEOF
14108ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14109"
14110if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14111 ac_have_decl=1
14112else
14113 ac_have_decl=0
14114fi
14115
14116cat >>confdefs.h <<_ACEOF
14117#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14118_ACEOF
14119ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14120"
14121if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14122 ac_have_decl=1
14123else
14124 ac_have_decl=0
14125fi
14126
14127cat >>confdefs.h <<_ACEOF
14128#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14129_ACEOF
14130ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14131"
14132if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14133 ac_have_decl=1
14134else
14135 ac_have_decl=0
14136fi
14137
14138cat >>confdefs.h <<_ACEOF
14139#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14140_ACEOF
14141ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14142"
14143if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14144 ac_have_decl=1
14145else
14146 ac_have_decl=0
14147fi
14148
14149cat >>confdefs.h <<_ACEOF
14150#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14151_ACEOF
14152ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14153"
14154if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14155 ac_have_decl=1
14156else
14157 ac_have_decl=0
14158fi
14159
14160cat >>confdefs.h <<_ACEOF
14161#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14162_ACEOF
14163
14164
Mark Dickinsonbd792642009-03-18 20:06:12 +000014165# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14167$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014168# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014169if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014170 enableval=$enable_big_digits; case $enable_big_digits in
14171yes)
14172 enable_big_digits=30 ;;
14173no)
14174 enable_big_digits=15 ;;
1417515|30)
14176 ;;
14177*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014178 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 +000014179esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14181$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014182
14183cat >>confdefs.h <<_ACEOF
14184#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14185_ACEOF
14186
14187
14188else
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14190$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014191fi
14192
14193
Guido van Rossumef2255b2000-03-10 22:30:29 +000014194# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014195ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014196if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014197
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014200
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014201 wchar_h="yes"
14202
Guido van Rossumef2255b2000-03-10 22:30:29 +000014203else
Martin v. Löwis11437992002-04-12 09:54:03 +000014204 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014205
14206fi
14207
Michael W. Hudson54241132001-12-07 15:38:26 +000014208
Martin v. Löwis11437992002-04-12 09:54:03 +000014209
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014210# determine wchar_t size
14211if test "$wchar_h" = yes
14212then
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14216# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14218$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014219if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014221else
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14223"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Martin v. Löwis11437992002-04-12 09:54:03 +000014225else
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 if test "$ac_cv_type_wchar_t" = yes; then
14227 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014229as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014230See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231 else
14232 ac_cv_sizeof_wchar_t=0
14233 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014235
Martin v. Löwis11437992002-04-12 09:54:03 +000014236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14238$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239
14240
14241
Martin v. Löwis11437992002-04-12 09:54:03 +000014242cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014243#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014244_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014245
Michael W. Hudson54241132001-12-07 15:38:26 +000014246
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014247fi
14248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14250$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014251have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014253/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014254
14255#include <tcl.h>
14256#if TCL_UTF_MAX != 6
14257# error "NOT UCS4_TCL"
14258#endif
14259int
14260main ()
14261{
14262
14263 ;
14264 return 0;
14265}
14266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014268
14269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014271
14272 have_ucs4_tcl=yes
14273
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14277$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014278
Skip Montanaro6dead952003-09-25 14:50:04 +000014279# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014280if test "$wchar_h" = yes
14281then
14282 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14284$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014285 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014287else
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014290 ac_cv_wchar_t_signed=yes
14291else
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014293/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014294
14295 #include <wchar.h>
14296 int main()
14297 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014298 /* Success: exit code 0 */
14299 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014300 }
14301
14302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014303if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014304 ac_cv_wchar_t_signed=yes
14305else
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014310fi
14311
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014312fi
14313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14315$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316fi
14317
Georg Brandl52d168a2008-01-07 18:10:24 +000014318# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014319if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014320 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014321then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014322 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014323
Matthias Kloseb9621712010-04-24 17:59:49 +000014324$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
Georg Brandl52d168a2008-01-07 18:10:24 +000014326else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014327 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014328fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14330$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014331
14332# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14334$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014335if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014337else
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 ac_cv_c_bigendian=unknown
14339 # See if we're dealing with a universal compiler.
14340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14341/* end confdefs.h. */
14342#ifndef __APPLE_CC__
14343 not a universal capable compiler
14344 #endif
14345 typedef int dummy;
14346
Skip Montanaro6dead952003-09-25 14:50:04 +000014347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014348if ac_fn_c_try_compile "$LINENO"; then :
14349
14350 # Check for potential -arch flags. It is not universal unless
14351 # there are at least two -arch flags with different values.
14352 ac_arch=
14353 ac_prev=
14354 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14355 if test -n "$ac_prev"; then
14356 case $ac_word in
14357 i?86 | x86_64 | ppc | ppc64)
14358 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14359 ac_arch=$ac_word
14360 else
14361 ac_cv_c_bigendian=universal
14362 break
14363 fi
14364 ;;
14365 esac
14366 ac_prev=
14367 elif test "x$ac_word" = "x-arch"; then
14368 ac_prev=arch
14369 fi
14370 done
14371fi
14372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14373 if test $ac_cv_c_bigendian = unknown; then
14374 # See if sys/param.h defines the BYTE_ORDER macro.
14375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014376/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014377#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014379
Martin v. Löwis11437992002-04-12 09:54:03 +000014380int
14381main ()
14382{
Matthias Kloseb9621712010-04-24 17:59:49 +000014383#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14384 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14385 && LITTLE_ENDIAN)
14386 bogus endian macros
14387 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014388
14389 ;
14390 return 0;
14391}
14392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014393if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014394 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014396/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014397#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014399
Martin v. Löwis11437992002-04-12 09:54:03 +000014400int
14401main ()
14402{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014403#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 not big endian
14405 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
14407 ;
14408 return 0;
14409}
14410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014411if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014412 ac_cv_c_bigendian=yes
14413else
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014417fi
14418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14419 fi
14420 if test $ac_cv_c_bigendian = unknown; then
14421 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014423/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014424#include <limits.h>
14425
Martin v. Löwis11437992002-04-12 09:54:03 +000014426int
14427main ()
14428{
Matthias Kloseb9621712010-04-24 17:59:49 +000014429#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14430 bogus endian macros
14431 #endif
14432
Martin v. Löwis11437992002-04-12 09:54:03 +000014433 ;
14434 return 0;
14435}
14436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_compile "$LINENO"; then :
14438 # It does; now see whether it defined to _BIG_ENDIAN or not.
14439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14440/* end confdefs.h. */
14441#include <limits.h>
14442
14443int
14444main ()
14445{
14446#ifndef _BIG_ENDIAN
14447 not big endian
14448 #endif
14449
14450 ;
14451 return 0;
14452}
14453_ACEOF
14454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014455 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014456else
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14460fi
14461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14462 fi
14463 if test $ac_cv_c_bigendian = unknown; then
14464 # Compile a test program.
14465 if test "$cross_compiling" = yes; then :
14466 # Try to guess by grepping values from an object file.
14467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14468/* end confdefs.h. */
14469short int ascii_mm[] =
14470 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14471 short int ascii_ii[] =
14472 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14473 int use_ascii (int i) {
14474 return ascii_mm[i] + ascii_ii[i];
14475 }
14476 short int ebcdic_ii[] =
14477 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14478 short int ebcdic_mm[] =
14479 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14480 int use_ebcdic (int i) {
14481 return ebcdic_mm[i] + ebcdic_ii[i];
14482 }
14483 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484
Matthias Kloseb9621712010-04-24 17:59:49 +000014485int
14486main ()
14487{
14488return use_ascii (foo) == use_ebcdic (foo);
14489 ;
14490 return 0;
14491}
14492_ACEOF
14493if ac_fn_c_try_compile "$LINENO"; then :
14494 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14495 ac_cv_c_bigendian=yes
14496 fi
14497 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14498 if test "$ac_cv_c_bigendian" = unknown; then
14499 ac_cv_c_bigendian=no
14500 else
14501 # finding both strings is unlikely to happen, but who knows?
14502 ac_cv_c_bigendian=unknown
14503 fi
14504 fi
14505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014507else
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014509/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014511int
14512main ()
14513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514
Matthias Kloseb9621712010-04-24 17:59:49 +000014515 /* Are we little or big endian? From Harbison&Steele. */
14516 union
14517 {
14518 long int l;
14519 char c[sizeof (long int)];
14520 } u;
14521 u.l = 1;
14522 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523
14524 ;
14525 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014526}
Martin v. Löwis11437992002-04-12 09:54:03 +000014527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014528if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014529 ac_cv_c_bigendian=no
14530else
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14540$as_echo "$ac_cv_c_bigendian" >&6; }
14541 case $ac_cv_c_bigendian in #(
14542 yes)
14543 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14544;; #(
14545 no)
14546 ;; #(
14547 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014550
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 ;; #(
14552 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014553 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014554 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014556
Michael W. Hudson54241132001-12-07 15:38:26 +000014557
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014558# ABI version string for Python extension modules. This appears between the
14559# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14560# from the following attributes which affect the ABI of this Python build (in
14561# this order):
14562#
14563# * The Python implementation (always 'cpython-' for us)
14564# * The major and minor version numbers
14565# * --with-pydebug (adds a 'd')
14566# * --with-pymalloc (adds a 'm')
14567# * --with-wide-unicode (adds a 'u')
14568#
14569# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014570# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14571# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014572
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14574$as_echo_n "checking ABIFLAGS... " >&6; }
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14576$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14578$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014579SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14581$as_echo "$SOABI" >&6; }
14582
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014583
14584case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014585 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014586 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14587 *)
14588 EXT_SUFFIX=${SHLIB_SUFFIX};;
14589esac
14590
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14592$as_echo_n "checking LDVERSION... " >&6; }
14593LDVERSION='$(VERSION)$(ABIFLAGS)'
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14595$as_echo "$LDVERSION" >&6; }
14596
doko@python.org87421192013-01-26 11:39:31 +010014597
doko@ubuntu.com55532312016-06-14 08:55:19 +020014598if test x$PLATFORM_TRIPLET = x; then
14599 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14600else
14601 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14602fi
doko@python.org87421192013-01-26 11:39:31 +010014603
14604
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014605# Check whether right shifting a negative integer extends the sign bit
14606# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14608$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014609if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014611else
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014614 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014615else
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014617/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014618
14619int main()
14620{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014621 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014622}
14623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014625if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014626 ac_cv_rshift_extends_sign=yes
14627else
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014632fi
14633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634fi
14635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14637$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014638if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014639then
Martin v. Löwis11437992002-04-12 09:54:03 +000014640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014642
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014643fi
14644
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014645# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14647$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014648if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014649 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014650else
Martin v. Löwis11437992002-04-12 09:54:03 +000014651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014653/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014654#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014655int
14656main ()
14657{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014658
14659 FILE *f = fopen("/dev/null", "r");
14660 flockfile(f);
14661 getc_unlocked(f);
14662 funlockfile(f);
14663
Martin v. Löwis11437992002-04-12 09:54:03 +000014664 ;
14665 return 0;
14666}
14667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014668if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014669 ac_cv_have_getc_unlocked=yes
14670else
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 ac_cv_have_getc_unlocked=no
14672fi
14673rm -f core conftest.err conftest.$ac_objext \
14674 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14678$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014679if test "$ac_cv_have_getc_unlocked" = yes
14680then
Martin v. Löwis11437992002-04-12 09:54:03 +000014681
Matthias Kloseb9621712010-04-24 17:59:49 +000014682$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014683
14684fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014685
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014686# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014687# save the value of LIBS so we don't actually link Python with readline
14688LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014689
Gregory P. Smith18820942008-09-07 06:24:49 +000014690# On some systems we need to link readline to a termcap compatible
14691# library. NOTE: Keep the precedence of listed libraries synchronised
14692# with setup.py.
14693py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14695$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014696for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014697 if test -z "$py_libtermcap"; then
14698 READLINE_LIBS="-lreadline"
14699 else
14700 READLINE_LIBS="-lreadline -l$py_libtermcap"
14701 fi
14702 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014704/* end confdefs.h. */
14705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014706/* Override any GCC internal prototype to avoid an error.
14707 Use char because int might match the return type of a GCC
14708 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014709#ifdef __cplusplus
14710extern "C"
14711#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014712char readline ();
14713int
14714main ()
14715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014716return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014717 ;
14718 return 0;
14719}
14720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014721if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014722 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014724rm -f core conftest.err conftest.$ac_objext \
14725 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014726 if test $py_cv_lib_readline = yes; then
14727 break
14728 fi
14729done
14730# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14731#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014732if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14734$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14737$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014740
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014741fi
14742
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014743# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14745$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014746if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014748else
14749 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014750LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014752/* end confdefs.h. */
14753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014754/* Override any GCC internal prototype to avoid an error.
14755 Use char because int might match the return type of a GCC
14756 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014757#ifdef __cplusplus
14758extern "C"
14759#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014760char rl_callback_handler_install ();
14761int
14762main ()
14763{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014765 ;
14766 return 0;
14767}
14768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014769if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014770 ac_cv_lib_readline_rl_callback_handler_install=yes
14771else
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014774rm -f core conftest.err conftest.$ac_objext \
14775 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014776LIBS=$ac_check_lib_save_LIBS
14777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14779$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014780if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014783
14784fi
14785
14786
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014787# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014789/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014790#include <readline/readline.h>
14791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014792if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014793 have_readline=yes
14794else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014795 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014796
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014797fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014798rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014799if test $have_readline = yes
14800then
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014802/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014803#include <readline/readline.h>
14804
14805_ACEOF
14806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014807 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014810
14811fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014812rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014815/* end confdefs.h. */
14816#include <readline/readline.h>
14817
14818_ACEOF
14819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014821
Matthias Kloseb9621712010-04-24 17:59:49 +000014822$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014823
14824fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014825rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014826
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014827fi
14828
Martin v. Löwis0daad592001-09-30 21:09:59 +000014829# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14831$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014832if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014834else
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014836LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840/* Override any GCC internal prototype to avoid an error.
14841 Use char because int might match the return type of a GCC
14842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014843#ifdef __cplusplus
14844extern "C"
14845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014846char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014847int
14848main ()
14849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 ;
14852 return 0;
14853}
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014856 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014860rm -f core conftest.err conftest.$ac_objext \
14861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014862LIBS=$ac_check_lib_save_LIBS
14863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14865$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014866if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014867
Matthias Kloseb9621712010-04-24 17:59:49 +000014868$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014869
Martin v. Löwis0daad592001-09-30 21:09:59 +000014870fi
14871
Michael W. Hudson54241132001-12-07 15:38:26 +000014872
Thomas Wouters89d996e2007-09-08 17:39:28 +000014873# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14875$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014876if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014878else
14879 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014880LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014882/* end confdefs.h. */
14883
14884/* Override any GCC internal prototype to avoid an error.
14885 Use char because int might match the return type of a GCC
14886 builtin and then its argument prototype would still apply. */
14887#ifdef __cplusplus
14888extern "C"
14889#endif
14890char rl_completion_display_matches_hook ();
14891int
14892main ()
14893{
14894return rl_completion_display_matches_hook ();
14895 ;
14896 return 0;
14897}
14898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014899if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014900 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14901else
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014904rm -f core conftest.err conftest.$ac_objext \
14905 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014906LIBS=$ac_check_lib_save_LIBS
14907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14909$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014910if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014911
Matthias Kloseb9621712010-04-24 17:59:49 +000014912$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014913
14914fi
14915
14916
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014917# also in 4.0, but not in editline
14918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14919$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14920if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14921 $as_echo_n "(cached) " >&6
14922else
14923 ac_check_lib_save_LIBS=$LIBS
14924LIBS="-lreadline $READLINE_LIBS $LIBS"
14925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14926/* end confdefs.h. */
14927
14928/* Override any GCC internal prototype to avoid an error.
14929 Use char because int might match the return type of a GCC
14930 builtin and then its argument prototype would still apply. */
14931#ifdef __cplusplus
14932extern "C"
14933#endif
14934char rl_resize_terminal ();
14935int
14936main ()
14937{
14938return rl_resize_terminal ();
14939 ;
14940 return 0;
14941}
14942_ACEOF
14943if ac_fn_c_try_link "$LINENO"; then :
14944 ac_cv_lib_readline_rl_resize_terminal=yes
14945else
14946 ac_cv_lib_readline_rl_resize_terminal=no
14947fi
14948rm -f core conftest.err conftest.$ac_objext \
14949 conftest$ac_exeext conftest.$ac_ext
14950LIBS=$ac_check_lib_save_LIBS
14951fi
14952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14953$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14954if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14955
14956$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14957
14958fi
14959
14960
Martin v. Löwis0daad592001-09-30 21:09:59 +000014961# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14963$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014964if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014966else
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014968LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972/* Override any GCC internal prototype to avoid an error.
14973 Use char because int might match the return type of a GCC
14974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014975#ifdef __cplusplus
14976extern "C"
14977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014978char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014979int
14980main ()
14981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 ;
14984 return 0;
14985}
14986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014989else
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014992rm -f core conftest.err conftest.$ac_objext \
14993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014994LIBS=$ac_check_lib_save_LIBS
14995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14997$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014998if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014999
Matthias Kloseb9621712010-04-24 17:59:49 +000015000$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015001
Guido van Rossum353ae582001-07-10 16:45:32 +000015002fi
15003
Jack Jansendd19cf82001-12-06 22:36:17 +000015004
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015005# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015007/* end confdefs.h. */
15008#include <readline/readline.h>
15009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015011 have_readline=yes
15012else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015013 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015014
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015015fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015016rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015017if test $have_readline = yes
15018then
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015020/* end confdefs.h. */
15021#include <readline/readline.h>
15022
15023_ACEOF
15024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015026
Matthias Kloseb9621712010-04-24 17:59:49 +000015027$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015028
15029fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015030rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015031
15032fi
15033
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15035$as_echo_n "checking for append_history in -lreadline... " >&6; }
15036if ${ac_cv_lib_readline_append_history+:} false; then :
15037 $as_echo_n "(cached) " >&6
15038else
15039 ac_check_lib_save_LIBS=$LIBS
15040LIBS="-lreadline $READLINE_LIBS $LIBS"
15041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15042/* end confdefs.h. */
15043
15044/* Override any GCC internal prototype to avoid an error.
15045 Use char because int might match the return type of a GCC
15046 builtin and then its argument prototype would still apply. */
15047#ifdef __cplusplus
15048extern "C"
15049#endif
15050char append_history ();
15051int
15052main ()
15053{
15054return append_history ();
15055 ;
15056 return 0;
15057}
15058_ACEOF
15059if ac_fn_c_try_link "$LINENO"; then :
15060 ac_cv_lib_readline_append_history=yes
15061else
15062 ac_cv_lib_readline_append_history=no
15063fi
15064rm -f core conftest.err conftest.$ac_objext \
15065 conftest$ac_exeext conftest.$ac_ext
15066LIBS=$ac_check_lib_save_LIBS
15067fi
15068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15069$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15070if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15071
15072$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15073
15074fi
15075
15076
Martin v. Löwis82bca632006-02-10 20:49:30 +000015077# End of readline checks: restore LIBS
15078LIBS=$LIBS_no_readline
15079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15081$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015082if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015084else
Martin v. Löwis11437992002-04-12 09:54:03 +000015085
Matthias Kloseb9621712010-04-24 17:59:49 +000015086if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015087 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015088else
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015090/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015091
15092int main()
15093{
15094 int val1 = nice(1);
15095 if (val1 != -1 && val1 == nice(2))
15096 exit(0);
15097 exit(1);
15098}
15099
Martin v. Löwis11437992002-04-12 09:54:03 +000015100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015101if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015102 ac_cv_broken_nice=yes
15103else
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15107 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015108fi
15109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110fi
15111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15113$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015114if test "$ac_cv_broken_nice" = yes
15115then
Martin v. Löwis11437992002-04-12 09:54:03 +000015116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015118
15119fi
15120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15122$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015123if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015125else
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015127 ac_cv_broken_poll=no
15128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015130/* end confdefs.h. */
15131
15132#include <poll.h>
15133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015134int main()
15135{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015136 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015137 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015138
15139 close (42);
15140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015141 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015142 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015143 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015144 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015145 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015146 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015147 return 1;
15148}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015149
15150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015151if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015152 ac_cv_broken_poll=yes
15153else
Matthias Kloseb9621712010-04-24 17:59:49 +000015154 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015160fi
15161
Matthias Kloseb9621712010-04-24 17:59:49 +000015162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15163$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015164if test "$ac_cv_broken_poll" = yes
15165then
15166
Matthias Kloseb9621712010-04-24 17:59:49 +000015167$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015168
15169fi
15170
Brett Cannon43802422005-02-10 20:48:03 +000015171# 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 +000015172# (which is not required by ISO C or UNIX spec) and/or if we support
15173# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015174ac_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 +000015175#include <$ac_cv_struct_tm>
15176
Matthias Kloseb9621712010-04-24 17:59:49 +000015177"
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015179
15180cat >>confdefs.h <<_ACEOF
15181#define HAVE_STRUCT_TM_TM_ZONE 1
15182_ACEOF
15183
15184
15185fi
15186
15187if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15188
Matthias Kloseb9621712010-04-24 17:59:49 +000015189$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015190
15191else
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15193"
Victor Stinnere0be4232011-10-25 13:06:09 +020015194if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196else
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198fi
15199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015201#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202_ACEOF
15203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15205$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015206if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208else
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015210/* end confdefs.h. */
15211#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212#if !HAVE_DECL_TZNAME
15213extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015214#endif
15215
15216int
15217main ()
15218{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015220 ;
15221 return 0;
15222}
15223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015224if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015225 ac_cv_var_tzname=yes
15226else
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015229rm -f core conftest.err conftest.$ac_objext \
15230 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15233$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015234 if test $ac_cv_var_tzname = yes; then
15235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015237
15238 fi
15239fi
15240
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015241
Martin v. Löwis1d459062005-03-14 21:23:33 +000015242# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15244$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015245if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015247else
15248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015250 ac_cv_working_tzset=no
15251else
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015253/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015254
15255#include <stdlib.h>
15256#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015257#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015258
15259#if HAVE_TZNAME
15260extern char *tzname[];
15261#endif
15262
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015263int main()
15264{
Brett Cannon18367812003-09-19 00:59:16 +000015265 /* Note that we need to ensure that not only does tzset(3)
15266 do 'something' with localtime, but it works as documented
15267 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015268 This includes making sure that tzname is set properly if
15269 tm->tm_zone does not exist since it is the alternative way
15270 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015271
15272 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015273 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015274 */
15275
Martin v. Löwis1d459062005-03-14 21:23:33 +000015276 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015277 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15278
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015279 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015280 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015281 if (localtime(&groundhogday)->tm_hour != 0)
15282 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015283#if HAVE_TZNAME
15284 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15285 if (strcmp(tzname[0], "UTC") ||
15286 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15287 exit(1);
15288#endif
Brett Cannon18367812003-09-19 00:59:16 +000015289
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015290 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015291 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015292 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015293 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015294#if HAVE_TZNAME
15295 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15296 exit(1);
15297#endif
Brett Cannon18367812003-09-19 00:59:16 +000015298
15299 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15300 tzset();
15301 if (localtime(&groundhogday)->tm_hour != 11)
15302 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015303#if HAVE_TZNAME
15304 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15305 exit(1);
15306#endif
15307
15308#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015309 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15310 exit(1);
15311 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15312 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015313#endif
Brett Cannon18367812003-09-19 00:59:16 +000015314
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015315 exit(0);
15316}
15317
15318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015319if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015320 ac_cv_working_tzset=yes
15321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15325 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015326fi
15327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015328fi
15329
Matthias Kloseb9621712010-04-24 17:59:49 +000015330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15331$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015332if test "$ac_cv_working_tzset" = yes
15333then
15334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015336
15337fi
15338
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015339# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15341$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015342if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015343 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015344else
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015346/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015347#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015348int
15349main ()
15350{
15351
15352struct stat st;
15353st.st_mtim.tv_nsec = 1;
15354
15355 ;
15356 return 0;
15357}
15358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015360 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015361else
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15365fi
15366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15368$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015369if test "$ac_cv_stat_tv_nsec" = yes
15370then
15371
Matthias Kloseb9621712010-04-24 17:59:49 +000015372$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015373
15374fi
15375
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015376# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15378$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015379if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015383/* end confdefs.h. */
15384#include <sys/stat.h>
15385int
15386main ()
15387{
15388
15389struct stat st;
15390st.st_mtimespec.tv_nsec = 1;
15391
15392 ;
15393 return 0;
15394}
15395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015397 ac_cv_stat_tv_nsec2=yes
15398else
Matthias Kloseb9621712010-04-24 17:59:49 +000015399 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15402fi
15403
Matthias Kloseb9621712010-04-24 17:59:49 +000015404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15405$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015406if test "$ac_cv_stat_tv_nsec2" = yes
15407then
15408
Matthias Kloseb9621712010-04-24 17:59:49 +000015409$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015410
15411fi
15412
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015413# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015414ac_save_cppflags="$CPPFLAGS"
15415CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015416
15417for ac_header in curses.h ncurses.h
15418do :
15419 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15420ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15421if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15422 cat >>confdefs.h <<_ACEOF
15423#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15424_ACEOF
15425
15426fi
15427
15428done
15429
15430
15431# On Solaris, term.h requires curses.h
15432for ac_header in term.h
15433do :
15434 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15435#ifdef HAVE_CURSES_H
15436#include <curses.h>
15437#endif
15438
15439"
15440if test "x$ac_cv_header_term_h" = xyes; then :
15441 cat >>confdefs.h <<_ACEOF
15442#define HAVE_TERM_H 1
15443_ACEOF
15444
15445fi
15446
15447done
15448
15449
Jack Jansen666b1e72001-10-31 12:11:48 +000015450# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15452$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015453if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015457/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015458#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015459int
15460main ()
15461{
Jack Jansen666b1e72001-10-31 12:11:48 +000015462
15463 int rtn;
15464 rtn = mvwdelch(0,0,0);
15465
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ;
15467 return 0;
15468}
15469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015470if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015471 ac_cv_mvwdelch_is_expression=yes
15472else
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15476fi
15477
Matthias Kloseb9621712010-04-24 17:59:49 +000015478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15479$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015480
15481if test "$ac_cv_mvwdelch_is_expression" = yes
15482then
Martin v. Löwis11437992002-04-12 09:54:03 +000015483
Matthias Kloseb9621712010-04-24 17:59:49 +000015484$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015485
15486fi
15487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15489$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015490if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015492else
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015494/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015495#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015496int
15497main ()
15498{
Jack Jansen666b1e72001-10-31 12:11:48 +000015499
15500 WINDOW *w;
15501 w->_flags = 0;
15502
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 ;
15504 return 0;
15505}
15506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015507if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015508 ac_cv_window_has_flags=yes
15509else
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15513fi
15514
Matthias Kloseb9621712010-04-24 17:59:49 +000015515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15516$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015517
Jack Jansen666b1e72001-10-31 12:11:48 +000015518
15519if test "$ac_cv_window_has_flags" = yes
15520then
Martin v. Löwis11437992002-04-12 09:54:03 +000015521
Matthias Kloseb9621712010-04-24 17:59:49 +000015522$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015523
15524fi
15525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15527$as_echo_n "checking for is_term_resized... " >&6; }
15528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015529/* end confdefs.h. */
15530#include <curses.h>
15531int
15532main ()
15533{
15534void *x=is_term_resized
15535 ;
15536 return 0;
15537}
15538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015542
Matthias Kloseb159a552010-04-25 21:00:44 +000015543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015544$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015545else
Matthias Kloseb9621712010-04-24 17:59:49 +000015546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15547$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015548
15549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15551
Matthias Kloseb9621712010-04-24 17:59:49 +000015552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15553$as_echo_n "checking for resize_term... " >&6; }
15554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015555/* end confdefs.h. */
15556#include <curses.h>
15557int
15558main ()
15559{
15560void *x=resize_term
15561 ;
15562 return 0;
15563}
15564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015565if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015568
Matthias Kloseb159a552010-04-25 21:00:44 +000015569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015570$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015571else
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15573$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015574
15575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15577
Matthias Kloseb9621712010-04-24 17:59:49 +000015578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15579$as_echo_n "checking for resizeterm... " >&6; }
15580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015581/* end confdefs.h. */
15582#include <curses.h>
15583int
15584main ()
15585{
15586void *x=resizeterm
15587 ;
15588 return 0;
15589}
15590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015591if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015594
Matthias Kloseb159a552010-04-25 21:00:44 +000015595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015596$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015597else
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15599$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015600
15601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015603# last curses configure check
15604CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15607$as_echo "$as_me: checking for device files" >&6;}
15608
15609if test "x$cross_compiling" = xyes; then
15610 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15612$as_echo_n "checking for /dev/ptmx... " >&6; }
15613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15614$as_echo "not set" >&6; }
15615 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15616 fi
15617 if test "${ac_cv_file__dev_ptc+set}" != set; then
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15619$as_echo_n "checking for /dev/ptc... " >&6; }
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15621$as_echo "not set" >&6; }
15622 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15623 fi
15624fi
15625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15627$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015628if ${ac_cv_file__dev_ptmx+:} false; then :
15629 $as_echo_n "(cached) " >&6
15630else
15631 test "$cross_compiling" = yes &&
15632 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15633if test -r "/dev/ptmx"; then
15634 ac_cv_file__dev_ptmx=yes
15635else
15636 ac_cv_file__dev_ptmx=no
15637fi
15638fi
15639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15640$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15641if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015642
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015643fi
15644
15645if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015648
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15651$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015652if ${ac_cv_file__dev_ptc+:} false; then :
15653 $as_echo_n "(cached) " >&6
15654else
15655 test "$cross_compiling" = yes &&
15656 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15657if test -r "/dev/ptc"; then
15658 ac_cv_file__dev_ptc=yes
15659else
15660 ac_cv_file__dev_ptc=no
15661fi
15662fi
15663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15664$as_echo "$ac_cv_file__dev_ptc" >&6; }
15665if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015666
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015667fi
15668
15669if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015672
Neal Norwitz865400f2003-03-21 01:42:58 +000015673fi
15674
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015675if test $ac_sys_system = Darwin
15676then
15677 LIBS="$LIBS -framework CoreFoundation"
15678fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15681$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015682if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015684else
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015686 ac_cv_have_size_t_format="cross -- assuming yes"
15687
Thomas Wouters477c8d52006-05-27 19:21:47 +000015688else
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015690/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015691
Thomas Wouters477c8d52006-05-27 19:21:47 +000015692#include <stdio.h>
15693#include <stddef.h>
15694#include <string.h>
15695
Christian Heimes2c181612007-12-17 20:04:13 +000015696#ifdef HAVE_SYS_TYPES_H
15697#include <sys/types.h>
15698#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015699
15700#ifdef HAVE_SSIZE_T
15701typedef ssize_t Py_ssize_t;
15702#elif SIZEOF_VOID_P == SIZEOF_LONG
15703typedef long Py_ssize_t;
15704#else
15705typedef int Py_ssize_t;
15706#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015707
Christian Heimes2c181612007-12-17 20:04:13 +000015708int main()
15709{
15710 char buffer[256];
15711
Thomas Wouters477c8d52006-05-27 19:21:47 +000015712 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15713 return 1;
15714
Thomas Wouters89f507f2006-12-13 04:49:30 +000015715 if (strcmp(buffer, "123"))
15716 return 1;
15717
15718 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15719 return 1;
15720
15721 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015722 return 1;
15723
15724 return 0;
15725}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015726
Thomas Wouters477c8d52006-05-27 19:21:47 +000015727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015729 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015730else
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015735fi
15736
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15739$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015740if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015741
Matthias Kloseb9621712010-04-24 17:59:49 +000015742$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015743
15744fi
15745
Matthias Kloseb9621712010-04-24 17:59:49 +000015746ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015747#ifdef HAVE_SYS_TYPES_H
15748#include <sys/types.h>
15749#endif
15750#ifdef HAVE_SYS_SOCKET_H
15751#include <sys/socket.h>
15752#endif
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754"
Victor Stinnere0be4232011-10-25 13:06:09 +020015755if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015756
Martin v. Löwis11437992002-04-12 09:54:03 +000015757else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015760
15761fi
15762
Michael W. Hudson54241132001-12-07 15:38:26 +000015763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15765$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015766if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015768else
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015770 ac_cv_broken_mbstowcs=no
15771else
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015773/* end confdefs.h. */
15774
Stefan Krah19c21392012-11-22 23:47:32 +010015775#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015776#include<stdlib.h>
15777int main() {
15778 size_t len = -1;
15779 const char *str = "text";
15780 len = mbstowcs(NULL, str, 0);
15781 return (len != 4);
15782}
15783
15784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015785if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015786 ac_cv_broken_mbstowcs=no
15787else
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015792fi
15793
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015794fi
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15797$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015798if test "$ac_cv_broken_mbstowcs" = yes
15799then
15800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015802
15803fi
15804
Antoine Pitroub52ec782009-01-25 16:34:23 +000015805# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15807$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015808
15809# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015810if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015811 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015812if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015813then
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015816
Matthias Kloseb9621712010-04-24 17:59:49 +000015817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15818$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015819fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015820if test "$withval" = no
15821then
15822
15823$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15826$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015827fi
15828
Antoine Pitrou042b1282010-08-13 21:15:58 +000015829else
15830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15831$as_echo "no value specified" >&6; }
15832fi
15833
Antoine Pitroub52ec782009-01-25 16:34:23 +000015834
Matthias Kloseb17289e2012-03-15 19:51:34 +010015835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15836$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15837if ${ac_cv_computed_gotos+:} false; then :
15838 $as_echo_n "(cached) " >&6
15839else
15840 if test "$cross_compiling" = yes; then :
15841 if test "${with_computed_gotos+set}" = set; then
15842 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15843 else
15844 ac_cv_computed_gotos=no
15845 fi
15846else
15847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15848/* end confdefs.h. */
15849
15850int main(int argc, char **argv)
15851{
15852 static void *targets[1] = { &&LABEL1 };
15853 goto LABEL2;
15854LABEL1:
15855 return 0;
15856LABEL2:
15857 goto *targets[0];
15858 return 1;
15859}
15860
15861_ACEOF
15862if ac_fn_c_try_run "$LINENO"; then :
15863 ac_cv_computed_gotos=yes
15864else
15865 ac_cv_computed_gotos=no
15866fi
15867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15868 conftest.$ac_objext conftest.beam conftest.$ac_ext
15869fi
15870
15871fi
15872
15873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15874$as_echo "$ac_cv_computed_gotos" >&6; }
15875case "$ac_cv_computed_gotos" in yes*)
15876
15877$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15878
15879esac
15880
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015881case $ac_sys_system in
15882AIX*)
15883
15884$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15885 ;;
15886esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015887
Michael W. Hudson54241132001-12-07 15:38:26 +000015888
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015889
15890
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015891for h in `(cd $srcdir;echo Python/thread_*.h)`
15892do
15893 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15894done
15895
Michael W. Hudson54241132001-12-07 15:38:26 +000015896
Ned Deily0db50cf2014-07-25 12:41:31 -070015897SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15899$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015900for dir in $SRCDIRS; do
15901 if test ! -d $dir; then
15902 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015903 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015904done
Matthias Kloseb9621712010-04-24 17:59:49 +000015905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15906$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015907
Stefan Krah1919b7e2012-03-21 18:25:23 +010015908# Availability of -O2:
15909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15910$as_echo_n "checking for -O2... " >&6; }
15911saved_cflags="$CFLAGS"
15912CFLAGS="-O2"
15913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914/* end confdefs.h. */
15915
15916int
15917main ()
15918{
15919
15920
15921 ;
15922 return 0;
15923}
15924_ACEOF
15925if ac_fn_c_try_compile "$LINENO"; then :
15926 have_O2=yes
15927else
15928 have_O2=no
15929fi
15930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15932$as_echo "$have_O2" >&6; }
15933CFLAGS="$saved_cflags"
15934
15935# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15936# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15938$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15939saved_cflags="$CFLAGS"
15940CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15941if test "$have_O2" = no; then
15942 CFLAGS=""
15943fi
15944if test "$cross_compiling" = yes; then :
15945 have_glibc_memmove_bug=undefined
15946else
15947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15948/* end confdefs.h. */
15949
15950#include <stdio.h>
15951#include <stdlib.h>
15952#include <string.h>
15953void foo(void *p, void *q) { memmove(p, q, 19); }
15954int main() {
15955 char a[32] = "123456789000000000";
15956 foo(&a[9], a);
15957 if (strcmp(a, "123456789123456789000000000") != 0)
15958 return 1;
15959 foo(a, &a[9]);
15960 if (strcmp(a, "123456789000000000") != 0)
15961 return 1;
15962 return 0;
15963}
15964
15965_ACEOF
15966if ac_fn_c_try_run "$LINENO"; then :
15967 have_glibc_memmove_bug=no
15968else
15969 have_glibc_memmove_bug=yes
15970fi
15971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15972 conftest.$ac_objext conftest.beam conftest.$ac_ext
15973fi
15974
15975CFLAGS="$saved_cflags"
15976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15977$as_echo "$have_glibc_memmove_bug" >&6; }
15978if test "$have_glibc_memmove_bug" = yes; then
15979
15980$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15981
15982fi
15983
15984if test "$have_gcc_asm_for_x87" = yes; then
15985 # Some versions of gcc miscompile inline asm:
15986 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15987 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15988 case $CC in
15989 *gcc*)
15990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15991$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15992 saved_cflags="$CFLAGS"
15993 CFLAGS="-O2"
15994 if test "$cross_compiling" = yes; then :
15995 have_ipa_pure_const_bug=undefined
15996else
15997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15998/* end confdefs.h. */
15999
16000 __attribute__((noinline)) int
16001 foo(int *p) {
16002 int r;
16003 asm ( "movl \$6, (%1)\n\t"
16004 "xorl %0, %0\n\t"
16005 : "=r" (r) : "r" (p) : "memory"
16006 );
16007 return r;
16008 }
16009 int main() {
16010 int p = 8;
16011 if ((foo(&p) ? : p) != 6)
16012 return 1;
16013 return 0;
16014 }
16015
16016_ACEOF
16017if ac_fn_c_try_run "$LINENO"; then :
16018 have_ipa_pure_const_bug=no
16019else
16020 have_ipa_pure_const_bug=yes
16021fi
16022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16023 conftest.$ac_objext conftest.beam conftest.$ac_ext
16024fi
16025
16026 CFLAGS="$saved_cflags"
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16028$as_echo "$have_ipa_pure_const_bug" >&6; }
16029 if test "$have_ipa_pure_const_bug" = yes; then
16030
16031$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16032
16033 fi
16034 ;;
16035 esac
16036fi
16037
Victor Stinner4f5366e2015-01-09 02:13:19 +010016038# Check for stdatomic.h
16039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16040$as_echo_n "checking for stdatomic.h... " >&6; }
16041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16042/* end confdefs.h. */
16043
16044
16045 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016046 atomic_int value = ATOMIC_VAR_INIT(1);
16047 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016048 int main() {
16049 int loaded_value = atomic_load(&value);
16050 return 0;
16051 }
16052
16053
16054_ACEOF
16055if ac_fn_c_try_link "$LINENO"; then :
16056 have_stdatomic_h=yes
16057else
16058 have_stdatomic_h=no
16059fi
16060rm -f core conftest.err conftest.$ac_objext \
16061 conftest$ac_exeext conftest.$ac_ext
16062
16063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16064$as_echo "$have_stdatomic_h" >&6; }
16065
16066if test "$have_stdatomic_h" = yes; then
16067
16068$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16069
16070fi
16071
16072# Check for GCC >= 4.7 __atomic builtins
16073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16074$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16076/* end confdefs.h. */
16077
16078
16079 volatile int val = 1;
16080 int main() {
16081 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16082 return 0;
16083 }
16084
16085
16086_ACEOF
16087if ac_fn_c_try_link "$LINENO"; then :
16088 have_builtin_atomic=yes
16089else
16090 have_builtin_atomic=no
16091fi
16092rm -f core conftest.err conftest.$ac_objext \
16093 conftest$ac_exeext conftest.$ac_ext
16094
16095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16096$as_echo "$have_builtin_atomic" >&6; }
16097
16098if test "$have_builtin_atomic" = yes; then
16099
16100$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16101
16102fi
16103
Ned Deily322f5ba2013-11-21 23:01:59 -080016104# ensurepip option
16105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16106$as_echo_n "checking for ensurepip... " >&6; }
16107
16108# Check whether --with-ensurepip was given.
16109if test "${with_ensurepip+set}" = set; then :
16110 withval=$with_ensurepip;
16111else
16112 with_ensurepip=upgrade
16113fi
16114
16115case $with_ensurepip in #(
16116 yes|upgrade) :
16117 ENSUREPIP=upgrade ;; #(
16118 install) :
16119 ENSUREPIP=install ;; #(
16120 no) :
16121 ENSUREPIP=no ;; #(
16122 *) :
16123 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16124esac
16125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16126$as_echo "$ENSUREPIP" >&6; }
16127
16128
Victor Stinner35a97c02015-03-08 02:59:09 +010016129# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16131$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16133/* end confdefs.h. */
16134
16135
16136 #include <dirent.h>
16137
16138 int main() {
16139 struct dirent entry;
16140 return entry.d_type == DT_UNKNOWN;
16141 }
16142
16143
16144_ACEOF
16145if ac_fn_c_try_link "$LINENO"; then :
16146 have_dirent_d_type=yes
16147else
16148 have_dirent_d_type=no
16149fi
16150rm -f core conftest.err conftest.$ac_objext \
16151 conftest$ac_exeext conftest.$ac_ext
16152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16153$as_echo "$have_dirent_d_type" >&6; }
16154
16155if test "$have_dirent_d_type" = yes; then
16156
16157$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16158
16159fi
16160
Victor Stinner9eb57c52015-03-19 22:21:49 +010016161# check if the Linux getrandom() syscall is available
16162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16163$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16165/* end confdefs.h. */
16166
16167
Victor Stinner1b80b242016-04-12 22:34:58 +020016168 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016169 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016170 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016171
16172 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016173 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016174 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016175 const int flags = GRND_NONBLOCK;
16176 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016177 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016178 return 0;
16179 }
16180
16181
16182_ACEOF
16183if ac_fn_c_try_link "$LINENO"; then :
16184 have_getrandom_syscall=yes
16185else
16186 have_getrandom_syscall=no
16187fi
16188rm -f core conftest.err conftest.$ac_objext \
16189 conftest$ac_exeext conftest.$ac_ext
16190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16191$as_echo "$have_getrandom_syscall" >&6; }
16192
16193if test "$have_getrandom_syscall" = yes; then
16194
16195$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16196
16197fi
16198
Victor Stinner3abf44e2015-09-18 15:38:37 +020016199# check if the getrandom() function is available
16200# the test was written for the Solaris function of <sys/random.h>
16201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16202$as_echo_n "checking for the getrandom() function... " >&6; }
16203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16204/* end confdefs.h. */
16205
16206
16207 #include <sys/random.h>
16208
16209 int main() {
16210 char buffer[1];
16211 const size_t buflen = sizeof(buffer);
16212 const int flags = 0;
16213 /* ignore the result, Python checks for ENOSYS at runtime */
16214 (void)getrandom(buffer, buflen, flags);
16215 return 0;
16216 }
16217
16218
16219_ACEOF
16220if ac_fn_c_try_link "$LINENO"; then :
16221 have_getrandom=yes
16222else
16223 have_getrandom=no
16224fi
16225rm -f core conftest.err conftest.$ac_objext \
16226 conftest$ac_exeext conftest.$ac_ext
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16228$as_echo "$have_getrandom" >&6; }
16229
16230if test "$have_getrandom" = yes; then
16231
16232$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16233
16234fi
16235
Guido van Rossum627b2d71993-12-24 10:39:16 +000016236# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016237ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016238
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016239ac_config_files="$ac_config_files Modules/ld_so_aix"
16240
Martin v. Löwis11437992002-04-12 09:54:03 +000016241cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016242# This file is a shell script that caches the results of configure
16243# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016244# scripts and configure runs, see configure's option --config-cache.
16245# It is not useful on other systems. If it contains results you don't
16246# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016247#
Martin v. Löwis11437992002-04-12 09:54:03 +000016248# config.status only pays attention to the cache file if you give it
16249# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016250#
Skip Montanaro6dead952003-09-25 14:50:04 +000016251# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016252# loading this file, other *unset* `ac_cv_foo' will be assigned the
16253# following values.
16254
16255_ACEOF
16256
Guido van Rossumf78abae1997-01-21 22:02:36 +000016257# The following way of writing the cache mishandles newlines in values,
16258# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016260# Ultrix sh set writes to stderr and can't be redirected directly,
16261# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262(
16263 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16264 eval ac_val=\$$ac_var
16265 case $ac_val in #(
16266 *${as_nl}*)
16267 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16269$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016270 esac
16271 case $ac_var in #(
16272 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016273 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16274 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275 esac ;;
16276 esac
16277 done
16278
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16281 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016282 # `set' does not quote correctly, so add quotes: double-quote
16283 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016285 "s/'/'\\\\''/g;
16286 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 *)
16289 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292 esac |
16293 sort
16294) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16300 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16302 :end' >>confcache
16303if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16304 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016305 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016306 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16307$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016308 if test ! -f "$cache_file" || test -h "$cache_file"; then
16309 cat confcache >"$cache_file"
16310 else
16311 case $cache_file in #(
16312 */* | ?:*)
16313 mv -f confcache "$cache_file"$$ &&
16314 mv -f "$cache_file"$$ "$cache_file" ;; #(
16315 *)
16316 mv -f confcache "$cache_file" ;;
16317 esac
16318 fi
16319 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016320 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016321 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16322$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016324fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016325rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016326
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016327test "x$prefix" = xNONE && prefix=$ac_default_prefix
16328# Let make expand exec_prefix.
16329test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016331DEFS=-DHAVE_CONFIG_H
16332
Skip Montanaro6dead952003-09-25 14:50:04 +000016333ac_libobjs=
16334ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016335U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016336for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16337 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016339 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16341 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016342 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16343 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016344done
16345LIBOBJS=$ac_libobjs
16346
16347LTLIBOBJS=$ac_ltlibobjs
16348
16349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350
Matthias Kloseb9621712010-04-24 17:59:49 +000016351
Victor Stinnere0be4232011-10-25 13:06:09 +020016352: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016353ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016354ac_clean_files_save=$ac_clean_files
16355ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016356{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16357$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16358as_write_fail=0
16359cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016360#! $SHELL
16361# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016362# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016363# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016364# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016365
Martin v. Löwis11437992002-04-12 09:54:03 +000016366debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016367ac_cs_recheck=false
16368ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016369
Matthias Kloseb9621712010-04-24 17:59:49 +000016370SHELL=\${CONFIG_SHELL-$SHELL}
16371export SHELL
16372_ASEOF
16373cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16374## -------------------- ##
16375## M4sh Initialization. ##
16376## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378# Be more Bourne compatible
16379DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016380if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 emulate sh
16382 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016383 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016384 # is contrary to our usage. Disable this feature.
16385 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016386 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016387else
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 case `(set -o) 2>/dev/null` in #(
16389 *posix*) :
16390 set -o posix ;; #(
16391 *) :
16392 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016393esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016394fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016395
16396
Matthias Kloseb9621712010-04-24 17:59:49 +000016397as_nl='
16398'
16399export as_nl
16400# Printing a long string crashes Solaris 7 /usr/bin/printf.
16401as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16402as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16403as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16404# Prefer a ksh shell builtin over an external printf program on Solaris,
16405# but without wasting forks for bash or zsh.
16406if test -z "$BASH_VERSION$ZSH_VERSION" \
16407 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16408 as_echo='print -r --'
16409 as_echo_n='print -rn --'
16410elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16411 as_echo='printf %s\n'
16412 as_echo_n='printf %s'
16413else
16414 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16415 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16416 as_echo_n='/usr/ucb/echo -n'
16417 else
16418 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16419 as_echo_n_body='eval
16420 arg=$1;
16421 case $arg in #(
16422 *"$as_nl"*)
16423 expr "X$arg" : "X\\(.*\\)$as_nl";
16424 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16425 esac;
16426 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16427 '
16428 export as_echo_n_body
16429 as_echo_n='sh -c $as_echo_n_body as_echo'
16430 fi
16431 export as_echo_body
16432 as_echo='sh -c $as_echo_body as_echo'
16433fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016434
16435# The user is always right.
16436if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016437 PATH_SEPARATOR=:
16438 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16439 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16440 PATH_SEPARATOR=';'
16441 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444
16445# IFS
16446# We need space, tab and new line, in precisely that order. Quoting is
16447# there to prevent editors from complaining about space-tab.
16448# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16449# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450IFS=" "" $as_nl"
16451
16452# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016453as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016454case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455 *[\\/]* ) as_myself=$0 ;;
16456 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016457for as_dir in $PATH
16458do
16459 IFS=$as_save_IFS
16460 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016461 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16462 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016463IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016465 ;;
16466esac
16467# We did not find ourselves, most probably we were run as `sh COMMAND'
16468# in which case we are not to be found in the path.
16469if test "x$as_myself" = x; then
16470 as_myself=$0
16471fi
16472if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016473 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16474 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475fi
16476
Matthias Kloseb9621712010-04-24 17:59:49 +000016477# Unset variables that we do not need and which cause bugs (e.g. in
16478# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16479# suppresses any "Segmentation fault" message there. '((' could
16480# trigger a bug in pdksh 5.2.14.
16481for as_var in BASH_ENV ENV MAIL MAILPATH
16482do eval test x\${$as_var+set} = xset \
16483 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484done
16485PS1='$ '
16486PS2='> '
16487PS4='+ '
16488
16489# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016490LC_ALL=C
16491export LC_ALL
16492LANGUAGE=C
16493export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494
Matthias Kloseb9621712010-04-24 17:59:49 +000016495# CDPATH.
16496(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16497
16498
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016499# as_fn_error STATUS ERROR [LINENO LOG_FD]
16500# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016501# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16502# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016503# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016504as_fn_error ()
16505{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016506 as_status=$1; test $as_status -eq 0 && as_status=1
16507 if test "$4"; then
16508 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16509 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016510 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016511 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016512 as_fn_exit $as_status
16513} # as_fn_error
16514
16515
16516# as_fn_set_status STATUS
16517# -----------------------
16518# Set $? to STATUS, without forking.
16519as_fn_set_status ()
16520{
16521 return $1
16522} # as_fn_set_status
16523
16524# as_fn_exit STATUS
16525# -----------------
16526# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16527as_fn_exit ()
16528{
16529 set +e
16530 as_fn_set_status $1
16531 exit $1
16532} # as_fn_exit
16533
16534# as_fn_unset VAR
16535# ---------------
16536# Portably unset VAR.
16537as_fn_unset ()
16538{
16539 { eval $1=; unset $1;}
16540}
16541as_unset=as_fn_unset
16542# as_fn_append VAR VALUE
16543# ----------------------
16544# Append the text in VALUE to the end of the definition contained in VAR. Take
16545# advantage of any shell optimizations that allow amortized linear growth over
16546# repeated appends, instead of the typical quadratic growth present in naive
16547# implementations.
16548if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16549 eval 'as_fn_append ()
16550 {
16551 eval $1+=\$2
16552 }'
16553else
16554 as_fn_append ()
16555 {
16556 eval $1=\$$1\$2
16557 }
16558fi # as_fn_append
16559
16560# as_fn_arith ARG...
16561# ------------------
16562# Perform arithmetic evaluation on the ARGs, and store the result in the
16563# global $as_val. Take advantage of shells that can avoid forks. The arguments
16564# must be portable across $(()) and expr.
16565if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16566 eval 'as_fn_arith ()
16567 {
16568 as_val=$(( $* ))
16569 }'
16570else
16571 as_fn_arith ()
16572 {
16573 as_val=`expr "$@" || test $? -eq 1`
16574 }
16575fi # as_fn_arith
16576
16577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578if expr a : '\(a\)' >/dev/null 2>&1 &&
16579 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16580 as_expr=expr
16581else
16582 as_expr=false
16583fi
16584
16585if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16586 as_basename=basename
16587else
16588 as_basename=false
16589fi
16590
Matthias Kloseb9621712010-04-24 17:59:49 +000016591if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16592 as_dirname=dirname
16593else
16594 as_dirname=false
16595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597as_me=`$as_basename -- "$0" ||
16598$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16599 X"$0" : 'X\(//\)$' \| \
16600 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016601$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016602 sed '/^.*\/\([^/][^/]*\)\/*$/{
16603 s//\1/
16604 q
16605 }
16606 /^X\/\(\/\/\)$/{
16607 s//\1/
16608 q
16609 }
16610 /^X\/\(\/\).*/{
16611 s//\1/
16612 q
16613 }
16614 s/.*/./; q'`
16615
Matthias Kloseb9621712010-04-24 17:59:49 +000016616# Avoid depending upon Character Ranges.
16617as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16618as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16619as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16620as_cr_digits='0123456789'
16621as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016622
16623ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016624case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016626 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016628 xy) ECHO_C='\c';;
16629 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16630 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 esac;;
16632*)
16633 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016634esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016635
Martin v. Löwis11437992002-04-12 09:54:03 +000016636rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637if test -d conf$$.dir; then
16638 rm -f conf$$.dir/conf$$.file
16639else
16640 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016641 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016643if (echo >conf$$.file) 2>/dev/null; then
16644 if ln -s conf$$.file conf$$ 2>/dev/null; then
16645 as_ln_s='ln -s'
16646 # ... but there are two gotchas:
16647 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16648 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016649 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016650 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016651 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016652 elif ln conf$$.file conf$$ 2>/dev/null; then
16653 as_ln_s=ln
16654 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016655 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016657else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016658 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16661rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016662
Matthias Kloseb9621712010-04-24 17:59:49 +000016663
16664# as_fn_mkdir_p
16665# -------------
16666# Create "$as_dir" as a directory, including parents if necessary.
16667as_fn_mkdir_p ()
16668{
16669
16670 case $as_dir in #(
16671 -*) as_dir=./$as_dir;;
16672 esac
16673 test -d "$as_dir" || eval $as_mkdir_p || {
16674 as_dirs=
16675 while :; do
16676 case $as_dir in #(
16677 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16678 *) as_qdir=$as_dir;;
16679 esac
16680 as_dirs="'$as_qdir' $as_dirs"
16681 as_dir=`$as_dirname -- "$as_dir" ||
16682$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16683 X"$as_dir" : 'X\(//\)[^/]' \| \
16684 X"$as_dir" : 'X\(//\)$' \| \
16685 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16686$as_echo X"$as_dir" |
16687 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16688 s//\1/
16689 q
16690 }
16691 /^X\(\/\/\)[^/].*/{
16692 s//\1/
16693 q
16694 }
16695 /^X\(\/\/\)$/{
16696 s//\1/
16697 q
16698 }
16699 /^X\(\/\).*/{
16700 s//\1/
16701 q
16702 }
16703 s/.*/./; q'`
16704 test -d "$as_dir" && break
16705 done
16706 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016707 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016708
16709
16710} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016711if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016712 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016713else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016714 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016715 as_mkdir_p=false
16716fi
16717
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016718
16719# as_fn_executable_p FILE
16720# -----------------------
16721# Test if FILE is an executable regular file.
16722as_fn_executable_p ()
16723{
16724 test -f "$1" && test -x "$1"
16725} # as_fn_executable_p
16726as_test_x='test -x'
16727as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
16729# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016730as_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 +000016731
16732# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016733as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016734
16735
Martin v. Löwis11437992002-04-12 09:54:03 +000016736exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016737## ----------------------------------- ##
16738## Main body of $CONFIG_STATUS script. ##
16739## ----------------------------------- ##
16740_ASEOF
16741test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016742
Matthias Kloseb9621712010-04-24 17:59:49 +000016743cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16744# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016745# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746# values after options handling.
16747ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016748This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016749generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016750
16751 CONFIG_FILES = $CONFIG_FILES
16752 CONFIG_HEADERS = $CONFIG_HEADERS
16753 CONFIG_LINKS = $CONFIG_LINKS
16754 CONFIG_COMMANDS = $CONFIG_COMMANDS
16755 $ $0 $@
16756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757on `(hostname || uname -n) 2>/dev/null | sed 1q`
16758"
16759
Martin v. Löwis11437992002-04-12 09:54:03 +000016760_ACEOF
16761
Matthias Kloseb9621712010-04-24 17:59:49 +000016762case $ac_config_files in *"
16763"*) set x $ac_config_files; shift; ac_config_files=$*;;
16764esac
16765
16766case $ac_config_headers in *"
16767"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16768esac
16769
16770
16771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016772# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016773config_files="$ac_config_files"
16774config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016779ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016780\`$as_me' instantiates files and other configuration actions
16781from templates according to the current configuration. Unless the files
16782and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016783
Matthias Kloseb9621712010-04-24 17:59:49 +000016784Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
16786 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016788 --config print configuration, then exit
16789 -q, --quiet, --silent
16790 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 -d, --debug don't remove temporary files
16792 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016793 --file=FILE[:TEMPLATE]
16794 instantiate the configuration file FILE
16795 --header=FILE[:TEMPLATE]
16796 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016797
16798Configuration files:
16799$config_files
16800
16801Configuration headers:
16802$config_headers
16803
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016804Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016807cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16808ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016809ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016810python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016811configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016812 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016813
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016814Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016815This config.status script is free software; the Free Software Foundation
16816gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817
16818ac_pwd='$ac_pwd'
16819srcdir='$srcdir'
16820INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016821MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016822test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
16824
Matthias Kloseb9621712010-04-24 17:59:49 +000016825cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16826# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016827ac_need_defaults=:
16828while test $# != 0
16829do
16830 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016831 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16833 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016834 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016836 --*=)
16837 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16838 ac_optarg=
16839 ac_shift=:
16840 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016841 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016842 ac_option=$1
16843 ac_optarg=$2
16844 ac_shift=shift
16845 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 esac
16847
Skip Montanaro6dead952003-09-25 14:50:04 +000016848 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016849 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016850 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16851 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016852 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016853 $as_echo "$ac_cs_version"; exit ;;
16854 --config | --confi | --conf | --con | --co | --c )
16855 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016856 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016857 debug=: ;;
16858 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016859 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016860 case $ac_optarg in
16861 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016862 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016863 esac
16864 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016865 ac_need_defaults=false;;
16866 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016867 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016868 case $ac_optarg in
16869 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16870 esac
16871 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873 --he | --h)
16874 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016875 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016876Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016877 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016879 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16880 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16881 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016882
16883 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016884 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016885Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016886
Matthias Kloseb9621712010-04-24 17:59:49 +000016887 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016889
16890 esac
16891 shift
16892done
16893
Skip Montanaro6dead952003-09-25 14:50:04 +000016894ac_configure_extra_args=
16895
16896if $ac_cs_silent; then
16897 exec 6>/dev/null
16898 ac_configure_extra_args="$ac_configure_extra_args --silent"
16899fi
16900
16901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016903if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016904 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016905 shift
16906 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16907 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016909 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016910fi
16911
Martin v. Löwis11437992002-04-12 09:54:03 +000016912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914exec 5>>config.log
16915{
16916 echo
16917 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16918## Running $as_me. ##
16919_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016920 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016921} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016924cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016925_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016926
Matthias Kloseb9621712010-04-24 17:59:49 +000016927cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016928
16929# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016930for ac_config_target in $ac_config_targets
16931do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932 case $ac_config_target in
16933 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16934 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16935 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016936 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16937 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016938 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16939 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016940 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016941 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016942 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943
Victor Stinnere0be4232011-10-25 13:06:09 +020016944 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016945 esac
16946done
16947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948
Martin v. Löwis11437992002-04-12 09:54:03 +000016949# If the user did not use the arguments to specify the items to instantiate,
16950# then the envvar interface is used. Set only those that are not.
16951# We use the long form for the default assignment because of an extremely
16952# bizarre bug on SunOS 4.1.3.
16953if $ac_need_defaults; then
16954 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16955 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16956fi
16957
Skip Montanaro6dead952003-09-25 14:50:04 +000016958# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016960# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961# Hook for its removal unless debugging.
16962# Note that there is a small window in which the directory will not be cleaned:
16963# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016964$debug ||
16965{
Victor Stinnere0be4232011-10-25 13:06:09 +020016966 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016968 : "${ac_tmp:=$tmp}"
16969 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016970' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016971 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016972}
Martin v. Löwis11437992002-04-12 09:54:03 +000016973# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016974
Martin v. Löwis11437992002-04-12 09:54:03 +000016975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016977 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016978} ||
16979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016980 tmp=./conf$$-$RANDOM
16981 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016982} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016983ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016984
Matthias Kloseb9621712010-04-24 17:59:49 +000016985# Set up the scripts for CONFIG_FILES section.
16986# No need to generate them if there are no CONFIG_FILES.
16987# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016989
Matthias Kloseb9621712010-04-24 17:59:49 +000016990
16991ac_cr=`echo X | tr X '\015'`
16992# On cygwin, bash can eat \r inside `` if the user requested igncr.
16993# But we know of no other shell where ac_cr would be empty at this
16994# point, so we can use a bashism as a fallback.
16995if test "x$ac_cr" = x; then
16996 eval ac_cr=\$\'\\r\'
16997fi
16998ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16999if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017000 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017001else
17002 ac_cs_awk_cr=$ac_cr
17003fi
17004
Victor Stinnere0be4232011-10-25 13:06:09 +020017005echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017006_ACEOF
17007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008
Matthias Kloseb9621712010-04-24 17:59:49 +000017009{
17010 echo "cat >conf$$subs.awk <<_ACEOF" &&
17011 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17012 echo "_ACEOF"
17013} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017014 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17015ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016ac_delim='%!_!# '
17017for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017018 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017019 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17022 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023 break
17024 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017025 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026 else
17027 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029done
Matthias Kloseb9621712010-04-24 17:59:49 +000017030rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031
Matthias Kloseb9621712010-04-24 17:59:49 +000017032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017033cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017035sed -n '
17036h
17037s/^/S["/; s/!.*/"]=/
17038p
17039g
17040s/^[^!]*!//
17041:repl
17042t repl
17043s/'"$ac_delim"'$//
17044t delim
17045:nl
17046h
17047s/\(.\{148\}\)..*/\1/
17048t more1
17049s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17050p
17051n
17052b repl
17053:more1
17054s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17055p
17056g
17057s/.\{148\}//
17058t nl
17059:delim
17060h
17061s/\(.\{148\}\)..*/\1/
17062t more2
17063s/["\\]/\\&/g; s/^/"/; s/$/"/
17064p
17065b
17066:more2
17067s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17068p
17069g
17070s/.\{148\}//
17071t delim
17072' <conf$$subs.awk | sed '
17073/^[^""]/{
17074 N
17075 s/\n//
17076}
17077' >>$CONFIG_STATUS || ac_write_fail=1
17078rm -f conf$$subs.awk
17079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17080_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017081cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 for (key in S) S_is_set[key] = 1
17083 FS = ""
17084
17085}
17086{
17087 line = $ 0
17088 nfields = split(line, field, "@")
17089 substed = 0
17090 len = length(field[1])
17091 for (i = 2; i < nfields; i++) {
17092 key = field[i]
17093 keylen = length(key)
17094 if (S_is_set[key]) {
17095 value = S[key]
17096 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17097 len += length(value) + length(field[++i])
17098 substed = 1
17099 } else
17100 len += 1 + keylen
17101 }
17102
17103 print line
17104}
17105
17106_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17109if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17110 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17111else
17112 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017113fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017114 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017115_ACEOF
17116
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017117# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17118# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119# trailing colons and then remove the whole line if VPATH becomes empty
17120# (actually we leave an empty line to preserve line numbers).
17121if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017122 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17123h
17124s///
17125s/^/:/
17126s/[ ]*$/:/
17127s/:\$(srcdir):/:/g
17128s/:\${srcdir}:/:/g
17129s/:@srcdir@:/:/g
17130s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017131s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017132x
17133s/\(=[ ]*\).*/\1/
17134G
17135s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136s/^[^=]*=[ ]*$//
17137}'
17138fi
17139
Matthias Kloseb9621712010-04-24 17:59:49 +000017140cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017141fi # test -n "$CONFIG_FILES"
17142
Matthias Kloseb9621712010-04-24 17:59:49 +000017143# Set up the scripts for CONFIG_HEADERS section.
17144# No need to generate them if there are no CONFIG_HEADERS.
17145# This happens for instance with `./config.status Makefile'.
17146if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017147cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017148BEGIN {
17149_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150
Matthias Kloseb9621712010-04-24 17:59:49 +000017151# Transform confdefs.h into an awk script `defines.awk', embedded as
17152# here-document in config.status, that substitutes the proper values into
17153# config.h.in to produce config.h.
17154
17155# Create a delimiter string that does not exist in confdefs.h, to ease
17156# handling of long lines.
17157ac_delim='%!_!# '
17158for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017159 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17160 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017161 break
17162 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017163 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017164 else
17165 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17166 fi
17167done
17168
17169# For the awk script, D is an array of macro values keyed by name,
17170# likewise P contains macro parameters if any. Preserve backslash
17171# newline sequences.
17172
17173ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17174sed -n '
17175s/.\{148\}/&'"$ac_delim"'/g
17176t rset
17177:rset
17178s/^[ ]*#[ ]*define[ ][ ]*/ /
17179t def
17180d
17181:def
17182s/\\$//
17183t bsnl
17184s/["\\]/\\&/g
17185s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17186D["\1"]=" \3"/p
17187s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17188d
17189:bsnl
17190s/["\\]/\\&/g
17191s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17192D["\1"]=" \3\\\\\\n"\\/p
17193t cont
17194s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17195t cont
17196d
17197:cont
17198n
17199s/.\{148\}/&'"$ac_delim"'/g
17200t clear
17201:clear
17202s/\\$//
17203t bsnlc
17204s/["\\]/\\&/g; s/^/"/; s/$/"/p
17205d
17206:bsnlc
17207s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17208b cont
17209' <confdefs.h | sed '
17210s/'"$ac_delim"'/"\\\
17211"/g' >>$CONFIG_STATUS || ac_write_fail=1
17212
17213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17214 for (key in D) D_is_set[key] = 1
17215 FS = ""
17216}
17217/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17218 line = \$ 0
17219 split(line, arg, " ")
17220 if (arg[1] == "#") {
17221 defundef = arg[2]
17222 mac1 = arg[3]
17223 } else {
17224 defundef = substr(arg[1], 2)
17225 mac1 = arg[2]
17226 }
17227 split(mac1, mac2, "(") #)
17228 macro = mac2[1]
17229 prefix = substr(line, 1, index(line, defundef) - 1)
17230 if (D_is_set[macro]) {
17231 # Preserve the white space surrounding the "#".
17232 print prefix "define", macro P[macro] D[macro]
17233 next
17234 } else {
17235 # Replace #undef with comments. This is necessary, for example,
17236 # in the case of _POSIX_SOURCE, which is predefined and required
17237 # on some systems where configure will not decide to define it.
17238 if (defundef == "undef") {
17239 print "/*", prefix defundef, macro, "*/"
17240 next
17241 }
17242 }
17243}
17244{ print }
17245_ACAWK
17246_ACEOF
17247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017248 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017249fi # test -n "$CONFIG_HEADERS"
17250
17251
17252eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17253shift
17254for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017255do
17256 case $ac_tag in
17257 :[FHLC]) ac_mode=$ac_tag; continue;;
17258 esac
17259 case $ac_mode$ac_tag in
17260 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017261 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262 :[FH]-) ac_tag=-:-;;
17263 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17264 esac
17265 ac_save_IFS=$IFS
17266 IFS=:
17267 set x $ac_tag
17268 IFS=$ac_save_IFS
17269 shift
17270 ac_file=$1
17271 shift
17272
17273 case $ac_mode in
17274 :L) ac_source=$1;;
17275 :[FH])
17276 ac_file_inputs=
17277 for ac_f
17278 do
17279 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017280 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 *) # Look for the file first in the build tree, then in the source tree
17282 # (if the path is not absolute). The absolute path cannot be DOS-style,
17283 # because $ac_f cannot contain `:'.
17284 test -f "$ac_f" ||
17285 case $ac_f in
17286 [\\/$]*) false;;
17287 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17288 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017289 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017291 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17292 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 done
17294
17295 # Let's still pretend it is `configure' which instantiates (i.e., don't
17296 # use $as_me), people would be surprised to read:
17297 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017298 configure_input='Generated from '`
17299 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17300 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 if test x"$ac_file" != x-; then
17302 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017303 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17304$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017306 # Neutralize special characters interpreted by sed in replacement strings.
17307 case $configure_input in #(
17308 *\&* | *\|* | *\\* )
17309 ac_sed_conf_input=`$as_echo "$configure_input" |
17310 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17311 *) ac_sed_conf_input=$configure_input;;
17312 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313
17314 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017315 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17316 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017317 esac
17318 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017319 esac
17320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017322$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017323 X"$ac_file" : 'X\(//\)[^/]' \| \
17324 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017326$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17328 s//\1/
17329 q
17330 }
17331 /^X\(\/\/\)[^/].*/{
17332 s//\1/
17333 q
17334 }
17335 /^X\(\/\/\)$/{
17336 s//\1/
17337 q
17338 }
17339 /^X\(\/\).*/{
17340 s//\1/
17341 q
17342 }
17343 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017344 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 ac_builddir=.
17346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347case "$ac_dir" in
17348.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17349*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017352 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353 case $ac_top_builddir_sub in
17354 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17355 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17356 esac ;;
17357esac
17358ac_abs_top_builddir=$ac_pwd
17359ac_abs_builddir=$ac_pwd$ac_dir_suffix
17360# for backward compatibility:
17361ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017362
17363case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017365 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366 ac_top_srcdir=$ac_top_builddir_sub
17367 ac_abs_top_srcdir=$ac_pwd ;;
17368 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017369 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370 ac_top_srcdir=$srcdir
17371 ac_abs_top_srcdir=$srcdir ;;
17372 *) # Relative name.
17373 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17374 ac_top_srcdir=$ac_top_build_prefix$srcdir
17375 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017376esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017378
Martin v. Löwis11437992002-04-12 09:54:03 +000017379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 case $ac_mode in
17381 :F)
17382 #
17383 # CONFIG_FILE
17384 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017385
17386 case $INSTALL in
17387 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017390 ac_MKDIR_P=$MKDIR_P
17391 case $MKDIR_P in
17392 [\\/$]* | ?:[\\/]* ) ;;
17393 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17394 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017395_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396
Matthias Kloseb9621712010-04-24 17:59:49 +000017397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398# If the template does not know about datarootdir, expand it.
17399# FIXME: This hack should be removed a few years after 2.60.
17400ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017401ac_sed_dataroot='
17402/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403 p
17404 q
17405}
17406/@datadir@/p
17407/@docdir@/p
17408/@infodir@/p
17409/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017410/@mandir@/p'
17411case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412*datarootdir*) ac_datarootdir_seen=yes;;
17413*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017414 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17415$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 ac_datarootdir_hack='
17419 s&@datadir@&$datadir&g
17420 s&@docdir@&$docdir&g
17421 s&@infodir@&$infodir&g
17422 s&@localedir@&$localedir&g
17423 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017424 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425esac
17426_ACEOF
17427
17428# Neutralize VPATH when `$srcdir' = `.'.
17429# Shell code in configure.ac might set extrasub.
17430# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017431cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17432ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017433$extrasub
17434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017436:t
17437/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017438s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017440s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441s&@srcdir@&$ac_srcdir&;t t
17442s&@abs_srcdir@&$ac_abs_srcdir&;t t
17443s&@top_srcdir@&$ac_top_srcdir&;t t
17444s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17445s&@builddir@&$ac_builddir&;t t
17446s&@abs_builddir@&$ac_abs_builddir&;t t
17447s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17448s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017449s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017450$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017451"
Victor Stinnere0be4232011-10-25 13:06:09 +020017452eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17453 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017456 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17457 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17458 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017460which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017461$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017462which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017463
Victor Stinnere0be4232011-10-25 13:06:09 +020017464 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017466 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17467 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017468 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017469 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470 ;;
17471 :H)
17472 #
17473 # CONFIG_HEADER
17474 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017476 {
17477 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017478 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17479 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017480 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017481 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17483$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017484 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017486 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017487 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 fi
17489 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017491 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017492 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017494 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496
17497 esac
17498
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017499
17500 case $ac_file$ac_mode in
17501 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17502
17503 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017504done # for ac_tag
17505
Guido van Rossum627b2d71993-12-24 10:39:16 +000017506
Matthias Kloseb9621712010-04-24 17:59:49 +000017507as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017508_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017509ac_clean_files=$ac_clean_files_save
17510
Matthias Kloseb9621712010-04-24 17:59:49 +000017511test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017512 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017513
Martin v. Löwis11437992002-04-12 09:54:03 +000017514
17515# configure is writing to config.log, and then calls config.status.
17516# config.status does its own redirection, appending to config.log.
17517# Unfortunately, on DOS this fails, as config.log is still kept open
17518# by configure, so config.status won't be able to write to it; its
17519# output is simply discarded. So we exec the FD to /dev/null,
17520# effectively closing config.log, so it can be properly (re)opened and
17521# appended to by config.status. When coming back to configure, we
17522# need to make the FD available again.
17523if test "$no_create" != yes; then
17524 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017525 ac_config_status_args=
17526 test "$silent" = yes &&
17527 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017528 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017529 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017530 exec 5>>config.log
17531 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17532 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017533 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017534fi
17535if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17537$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017538fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017539
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017540
Christian Heimes75ed8902013-11-20 01:11:18 +010017541echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017542if test ! -f Modules/Setup
17543then
17544 cp $srcdir/Modules/Setup.dist Modules/Setup
17545fi
17546
Christian Heimes75ed8902013-11-20 01:11:18 +010017547echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017548if test ! -f Modules/Setup.local
17549then
17550 echo "# Edit this file for local setup changes" >Modules/Setup.local
17551fi
17552
Christian Heimes75ed8902013-11-20 01:11:18 +010017553echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017554$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17555 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017556 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017557mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017558
17559if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17560 echo "" >&6
17561 echo "" >&6
17562 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17563 echo "please run ./configure --with-optimizations" >&6
17564 echo "" >&6
17565 echo "" >&6
17566fi
17567